-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][ADD] internal_stock_quant_package
- Loading branch information
Showing
21 changed files
with
1,200 additions
and
0 deletions.
There are no files selected for viewing
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,78 @@ | ||
============================ | ||
Internal Stock Quant Package | ||
============================ | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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-OCA%2Fstock--logistics--tracking-lightgray.png?logo=github | ||
:target: https://github.com/OCA/stock-logistics-tracking/tree/16.0/internal_stock_quant_package | ||
:alt: OCA/stock-logistics-tracking | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/stock-logistics-tracking-16-0/stock-logistics-tracking-16-0-internal_stock_quant_package | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/stock-logistics-tracking&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows to declare internal stock quant package. | ||
|
||
An internal stock quant package will never leave the warehouse. It's | ||
a package used in the picking process and is emptied when a 'put | ||
in pack' operation occurs or when the picking is validated (except | ||
if configured to not do it on the picking type). | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-tracking/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/OCA/stock-logistics-tracking/issues/new?body=module:%20internal_stock_quant_package%0Aversion:%2016.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 | ||
~~~~~~~ | ||
|
||
* ACSONE SA/NV | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Hughes Damry <[email protected]> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/stock-logistics-tracking <https://github.com/OCA/stock-logistics-tracking/tree/16.0/internal_stock_quant_package>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/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,18 @@ | ||
# Copyright 2021 ACSONE SA/NV | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Internal Stock Quant Package", | ||
"summary": "This module allows to declare internal stock quant package", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "ACSONE SA/NV, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/stock-logistics-tracking", | ||
"depends": ["stock", "delivery"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"views/stock_quant_package_views.xml", | ||
"views/stock_picking_type_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,116 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * internal_stock_quant_package | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-02-09 12:56+0000\n" | ||
"PO-Revision-Date: 2023-02-09 12:56+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: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__create_uid | ||
msgid "Created by" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__create_date | ||
msgid "Created on" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__delivery_carrier_id | ||
msgid "Delivery Carrier" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__empty | ||
msgid "Empty" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_picking__empty_internal_package_on_transfer | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_picking_type__empty_internal_package_on_transfer | ||
msgid "Empty Internal Package On Transfer" | ||
msgstr "Vider les colis internes lors du transfert?" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,help:internal_stock_quant_package.field_stock_picking_type__empty_internal_package_on_transfer | ||
msgid "" | ||
"If set internal packages are emptied after the transfer or when products are" | ||
" put in pack." | ||
msgstr "" | ||
"Si coché, les colis internes sont vidés une fois la préparation terminée ou " | ||
"lorsqu'on fait la mise en colis." | ||
|
||
#. module: internal_stock_quant_package | ||
#: model_terms:ir.ui.view,arch_db:internal_stock_quant_package.stock_quant_package_search_view | ||
msgid "Internal" | ||
msgstr "Interne" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_internal_package_config_line | ||
msgid "Internal Package Configuration Line" | ||
msgstr "Vider les colis internes lors du transfert?" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_quant_package__is_internal | ||
msgid "Internal use?" | ||
msgstr "Usage interne?" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__write_uid | ||
msgid "Last Updated by" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__write_date | ||
msgid "Last Updated on" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_quant_package | ||
msgid "Packages" | ||
msgstr "Colis" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_picking_type | ||
msgid "Picking Type" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_picking_type__stock_internal_package_config_line_ids | ||
msgid "Stock Internal Package Config Line" | ||
msgstr "Vider les colis internes lors du transfert?" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__stock_picking_type_id | ||
msgid "Stock Picking Type" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_picking | ||
msgid "Transfer" | ||
msgstr "Transfert" |
114 changes: 114 additions & 0 deletions
114
internal_stock_quant_package/i18n/internal_stock_quant_package.pot
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,114 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * internal_stock_quant_package | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-02-09 12:56+0000\n" | ||
"PO-Revision-Date: 2023-02-09 12:56+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: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__create_uid | ||
msgid "Created by" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__create_date | ||
msgid "Created on" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__delivery_carrier_id | ||
msgid "Delivery Carrier" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__empty | ||
msgid "Empty" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_picking__empty_internal_package_on_transfer | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_picking_type__empty_internal_package_on_transfer | ||
msgid "Empty Internal Package On Transfer" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,help:internal_stock_quant_package.field_stock_picking_type__empty_internal_package_on_transfer | ||
msgid "" | ||
"If set internal packages are emptied after the transfer or when products are" | ||
" put in pack." | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model_terms:ir.ui.view,arch_db:internal_stock_quant_package.stock_quant_package_search_view | ||
msgid "Internal" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_internal_package_config_line | ||
msgid "Internal Package Configuration Line" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_quant_package__is_internal | ||
msgid "Internal use?" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__write_uid | ||
msgid "Last Updated by" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__write_date | ||
msgid "Last Updated on" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_quant_package | ||
msgid "Packages" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.model_stock_picking_type | ||
msgid "Picking Type" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_picking_type__stock_internal_package_config_line_ids | ||
msgid "Stock Internal Package Config Line" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model.fields,field_description:internal_stock_quant_package.field_stock_internal_package_config_line__stock_picking_type_id | ||
msgid "Stock Picking Type" | ||
msgstr "" | ||
|
||
#. module: internal_stock_quant_package | ||
#: model:ir.model,name:internal_stock_quant_package.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,4 @@ | ||
from . import stock_internal_package_config_line | ||
from . import stock_picking_type | ||
from . import stock_picking | ||
from . import stock_quant_package |
33 changes: 33 additions & 0 deletions
33
internal_stock_quant_package/models/stock_internal_package_config_line.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,33 @@ | ||
# Copyright 2022 ACSONE SA/NV | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class StockInternalPackageConfigLine(models.Model): | ||
_name = "stock.internal.package.config.line" | ||
_description = "Internal Package Configuration Line" | ||
|
||
empty = fields.Boolean() | ||
delivery_carrier_id = fields.Many2one( | ||
"delivery.carrier", | ||
required=True, | ||
ondelete="cascade", | ||
) | ||
stock_picking_type_id = fields.Many2one( | ||
"stock.picking.type", | ||
required=True, | ||
readonly=True, | ||
ondelete="cascade", | ||
) | ||
|
||
def write(self, vals): | ||
res = super().write(vals) | ||
self._invalidate_empty_internal_package_on_transfer_cache() | ||
return res | ||
|
||
def _invalidate_empty_internal_package_on_transfer_cache(self): | ||
domain = [("stock_internal_package_config_line_ids", "in", self.ids)] | ||
picking_types = self.env["stock.picking.type"].search(domain) | ||
picking_types.clear_caches() | ||
self.env["stock.picking"].invalidate_model() |
Oops, something went wrong.