-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[12.0][4320][ADD] stock_picking_delivery_slip_required (#217)
[ADD] stock_picking_delivery_slip_required
- Loading branch information
1 parent
a06b126
commit 412d67a
Showing
13 changed files
with
594 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
setup/stock_picking_delivery_slip_required/odoo/addons/stock_picking_delivery_slip_required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../stock_picking_delivery_slip_required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
==================================== | ||
Stock Picking Delivery Slip Required | ||
==================================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Fhls--custom-lightgray.png?logo=github | ||
:target: https://github.com/qrtl/hls-custom/tree/12.0/stock_picking_delivery_slip_required | ||
:alt: qrtl/hls-custom | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
This module adds the is_delivery_slip_required field for both partner and picking. | ||
It determines the necessity of a delivery slip for each picking based on the associated partner. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/qrtl/hls-custom/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/qrtl/hls-custom/issues/new?body=module:%20stock_picking_delivery_slip_required%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Quartile Limited | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `qrtl/hls-custom <https://github.com/qrtl/hls-custom/tree/12.0/stock_picking_delivery_slip_required>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2024 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Stock Picking Delivery Slip Required", | ||
"version": "12.0.1.0.0", | ||
"author": "Quartile Limited", | ||
"website": "https://www.quartile.co", | ||
"category": "Stock", | ||
"license": "AGPL-3", | ||
"depends": ["sale_stock"], | ||
"data": ["views/res_partner_views.xml", "views/stock_picking_views.xml"], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_delivery_slip_required | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-04-17 02:58+0000\n" | ||
"PO-Revision-Date: 2024-04-17 02:58+0000\n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: stock_picking_delivery_slip_required | ||
#: model:ir.model,name:stock_picking_delivery_slip_required.model_res_partner | ||
msgid "Contact" | ||
msgstr "連絡先" | ||
|
||
#. module: stock_picking_delivery_slip_required | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_delivery_slip_required.view_picking_internal_search | ||
msgid "Delivery Slip Not Required" | ||
msgstr "納品書不要" | ||
|
||
#. module: stock_picking_delivery_slip_required | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_delivery_slip_required.view_picking_internal_search | ||
msgid "Delivery Slip Required" | ||
msgstr "納品書必要" | ||
|
||
#. module: stock_picking_delivery_slip_required | ||
#: model:ir.model.fields,field_description:stock_picking_delivery_slip_required.field_res_partner__is_delivery_slip_required | ||
#: model:ir.model.fields,field_description:stock_picking_delivery_slip_required.field_res_users__is_delivery_slip_required | ||
#: model:ir.model.fields,field_description:stock_picking_delivery_slip_required.field_stock_picking__is_delivery_slip_required | ||
msgid "Is Delivery Slip Required" | ||
msgstr "要納品書" | ||
|
||
#. module: stock_picking_delivery_slip_required | ||
#: model:ir.model,name:stock_picking_delivery_slip_required.model_stock_picking | ||
msgid "Transfer" | ||
msgstr "運送" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import res_partner | ||
from . import stock_picking |
10 changes: 10 additions & 0 deletions
10
stock_picking_delivery_slip_required/models/res_partner.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright 2024 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResPartner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
is_delivery_slip_required = fields.Boolean() |
27 changes: 27 additions & 0 deletions
27
stock_picking_delivery_slip_required/models/stock_picking.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2024 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class StockPicking(models.Model): | ||
_inherit = "stock.picking" | ||
|
||
is_delivery_slip_required = fields.Boolean() | ||
|
||
@api.model | ||
def create(self, vals): | ||
res = super(StockPicking, self).create(vals) | ||
if res.partner_id: | ||
res.is_delivery_slip_required = res.partner_id.is_delivery_slip_required | ||
return res | ||
|
||
@api.multi | ||
def write(self, vals): | ||
partner_id = vals.get("partner_id") | ||
if partner_id: | ||
partner = self.env["res.partner"].browse(partner_id) | ||
vals.update( | ||
{"is_delivery_slip_required": partner.is_delivery_slip_required} | ||
) | ||
return super(StockPicking, self).write(vals) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module adds the is_delivery_slip_required field for both partner and picking. | ||
It determines the necessity of a delivery slip for each picking based on the associated partner. |
Oops, something went wrong.