diff --git a/stock_inventory_discrepancy/README.rst b/stock_inventory_discrepancy/README.rst index c411aeacf..c2cbf8bac 100644 --- a/stock_inventory_discrepancy/README.rst +++ b/stock_inventory_discrepancy/README.rst @@ -14,13 +14,13 @@ Stock Inventory Discrepancy :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--warehouse-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_inventory_discrepancy + :target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_inventory_discrepancy :alt: OCA/stock-logistics-warehouse .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_inventory_discrepancy + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_inventory_discrepancy :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/153/12.0 + :target: https://runbot.odoo-community.org/runbot/153/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -66,7 +66,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -76,14 +76,15 @@ Credits Authors ~~~~~~~ -* Eficent +* ForgeFlow Contributors ~~~~~~~~~~~~ -* Lois Rilo +* Lois Rilo * Andreas Dian Sukarno Putro * Bhavesh Odedra +* Héctor Villarreal Maintainers ~~~~~~~~~~~ @@ -98,6 +99,6 @@ 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-warehouse `_ project on GitHub. +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_inventory_discrepancy/__init__.py b/stock_inventory_discrepancy/__init__.py index 4b76c7b2d..e3bed0638 100644 --- a/stock_inventory_discrepancy/__init__.py +++ b/stock_inventory_discrepancy/__init__.py @@ -1,3 +1,4 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import models +from .hooks import post_load_hook diff --git a/stock_inventory_discrepancy/__manifest__.py b/stock_inventory_discrepancy/__manifest__.py index 619e4cf29..951c3df47 100644 --- a/stock_inventory_discrepancy/__manifest__.py +++ b/stock_inventory_discrepancy/__manifest__.py @@ -5,18 +5,20 @@ "summary": "Adds the capability to show the discrepancy of every line in " "an inventory and to block the inventory validation when the " "discrepancy is over a user defined threshold.", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "author": "ForgeFlow, Odoo Community Association (OCA)", "website": "https://github.com/OCA/stock-logistics-warehouse", - "category": "Warehouse Management", + "category": "Warehouse", "depends": ["stock"], "data": [ "security/stock_inventory_discrepancy_security.xml", + "views/assets_backend.xml", "views/stock_inventory_view.xml", "views/stock_warehouse_view.xml", "views/stock_location_view.xml", ], "license": "AGPL-3", + "post_load": "post_load_hook", "installable": True, "application": False, } diff --git a/stock_inventory_discrepancy/hooks.py b/stock_inventory_discrepancy/hooks.py new file mode 100644 index 000000000..3a4356c77 --- /dev/null +++ b/stock_inventory_discrepancy/hooks.py @@ -0,0 +1,79 @@ +# Copyright 2019 Eficent Business and IT Consulting Services S.L. +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + + +from odoo import _ +from odoo.exceptions import UserError +from odoo.tools.float_utils import float_compare + +from odoo.addons.stock.models.stock_inventory import Inventory + + +def post_load_hook(): + def action_validate_discrepancy(self): + """Override method to avoid inline group validation""" + if not self.exists(): + return + self.ensure_one() + # START HOOK: - Allow specific group to validate inventory + # - Allow validate on pending status + if ( + not self.user_has_groups("stock.group_stock_manager") + and not self.user_has_groups( + "stock_inventory_discrepancy.group_stock_inventory_validation" + ) + and not self.user_has_groups( + "stock_inventory_discrepancy.group_stock_inventory_validation_always" + ) + ): + raise UserError( + _("Only a stock manager can validate an inventory adjustment.") + ) + if self.state not in ["confirm", "pending"]: + raise UserError( + _( + "You can't validate the inventory '%s', maybe this inventory " + + "has been already validated or isn't ready." + ) + % (self.name) + ) + # END HOOK + inventory_lines = self.line_ids.filtered( + lambda l: l.product_id.tracking in ["lot", "serial"] + and not l.prod_lot_id + and l.theoretical_qty != l.product_qty + ) + lines = self.line_ids.filtered( + lambda l: float_compare( + l.product_qty, 1, precision_rounding=l.product_uom_id.rounding + ) + > 0 + and l.product_id.tracking == "serial" + and l.prod_lot_id + ) + if inventory_lines and not lines: + wiz_lines = [ + (0, 0, {"product_id": product.id, "tracking": product.tracking}) + for product in inventory_lines.mapped("product_id") + ] + wiz = self.env["stock.track.confirmation"].create( + {"inventory_id": self.id, "tracking_line_ids": wiz_lines} + ) + return { + "name": _("Tracked Products in Inventory Adjustment"), + "type": "ir.actions.act_window", + "view_mode": "form", + "views": [(False, "form")], + "res_model": "stock.track.confirmation", + "target": "new", + "res_id": wiz.id, + } + self._action_done() + self.line_ids._check_company() + self._check_company() + return True + + if not hasattr(Inventory, "action_validate_original"): + Inventory.action_validate_original = Inventory.action_validate + + Inventory._patch_method("action_validate", action_validate_discrepancy) diff --git a/stock_inventory_discrepancy/i18n/cs_CZ.po b/stock_inventory_discrepancy/i18n/cs_CZ.po index b4da70938..37218a71f 100644 --- a/stock_inventory_discrepancy/i18n/cs_CZ.po +++ b/stock_inventory_discrepancy/i18n/cs_CZ.po @@ -19,11 +19,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/de.po b/stock_inventory_discrepancy/i18n/de.po index 3bf6f3023..683d86ba3 100644 --- a/stock_inventory_discrepancy/i18n/de.po +++ b/stock_inventory_discrepancy/i18n/de.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -33,21 +28,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -91,10 +76,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -112,7 +116,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -131,11 +135,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -146,12 +163,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Lager" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/es.po b/stock_inventory_discrepancy/i18n/es.po index 8880340e4..1ab5076d9 100644 --- a/stock_inventory_discrepancy/i18n/es.po +++ b/stock_inventory_discrepancy/i18n/es.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -33,21 +28,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -91,10 +76,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -112,7 +116,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -131,11 +135,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -146,12 +163,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Almacén" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/es_ES.po b/stock_inventory_discrepancy/i18n/es_ES.po index 1ec51d420..977d8e610 100644 --- a/stock_inventory_discrepancy/i18n/es_ES.po +++ b/stock_inventory_discrepancy/i18n/es_ES.po @@ -20,11 +20,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -35,21 +30,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -93,10 +78,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -114,7 +118,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -133,11 +137,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -148,12 +165,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Almacén" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/fr.po b/stock_inventory_discrepancy/i18n/fr.po index 760f9695a..90696e80f 100644 --- a/stock_inventory_discrepancy/i18n/fr.po +++ b/stock_inventory_discrepancy/i18n/fr.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -33,21 +28,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -91,10 +76,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -112,7 +116,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -131,11 +135,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -146,12 +163,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Entrepôt" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/fr_FR.po b/stock_inventory_discrepancy/i18n/fr_FR.po index 407a2b4e1..30cdfd2fb 100644 --- a/stock_inventory_discrepancy/i18n/fr_FR.po +++ b/stock_inventory_discrepancy/i18n/fr_FR.po @@ -19,11 +19,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Entrepôt " + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/hr.po b/stock_inventory_discrepancy/i18n/hr.po index 027f59360..662b43c7f 100644 --- a/stock_inventory_discrepancy/i18n/hr.po +++ b/stock_inventory_discrepancy/i18n/hr.po @@ -19,11 +19,6 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Skladište" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/it.po b/stock_inventory_discrepancy/i18n/it.po index 0e5ff1cb6..51a2a084f 100644 --- a/stock_inventory_discrepancy/i18n/it.po +++ b/stock_inventory_discrepancy/i18n/it.po @@ -19,11 +19,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Magazzino" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/nl.po b/stock_inventory_discrepancy/i18n/nl.po index 2cca957e9..7c66e25b2 100644 --- a/stock_inventory_discrepancy/i18n/nl.po +++ b/stock_inventory_discrepancy/i18n/nl.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -33,21 +28,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -91,10 +76,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -112,7 +116,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -131,11 +135,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -146,12 +163,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Magazijn" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/nl_NL.po b/stock_inventory_discrepancy/i18n/nl_NL.po index b448f8113..a97cbf1ec 100644 --- a/stock_inventory_discrepancy/i18n/nl_NL.po +++ b/stock_inventory_discrepancy/i18n/nl_NL.po @@ -19,11 +19,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Magazijn" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/pt_BR.po b/stock_inventory_discrepancy/i18n/pt_BR.po index ce446d495..343ca9843 100644 --- a/stock_inventory_discrepancy/i18n/pt_BR.po +++ b/stock_inventory_discrepancy/i18n/pt_BR.po @@ -20,11 +20,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -35,21 +30,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -93,10 +78,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -114,7 +118,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -133,11 +137,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -148,12 +165,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Armazém" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/sl.po b/stock_inventory_discrepancy/i18n/sl.po index 8da206145..374dd3f1c 100644 --- a/stock_inventory_discrepancy/i18n/sl.po +++ b/stock_inventory_discrepancy/i18n/sl.po @@ -19,11 +19,6 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" "%100==4 ? 2 : 3);\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Skladišče" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/stock_inventory_discrepancy.pot b/stock_inventory_discrepancy/i18n/stock_inventory_discrepancy.pot index fa26d0ebc..bd17bbe61 100644 --- a/stock_inventory_discrepancy/i18n/stock_inventory_discrepancy.pot +++ b/stock_inventory_discrepancy/i18n/stock_inventory_discrepancy.pot @@ -1,23 +1,18 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * stock_inventory_discrepancy +# * stock_inventory_discrepancy # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\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_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -28,21 +23,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -67,12 +52,17 @@ msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_warehouse__discrepancy_threshold -msgid "Maximum Discrepancy Rate allowed for any product when doing an Inventory Adjustment. Threshold defined in involved Location has preference." +msgid "" +"Maximum Discrepancy Rate allowed for any product when doing an Inventory " +"Adjustment. Threshold defined in involved Location has preference." msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__discrepancy_threshold -msgid "Maximum Discrepancy Rate allowed for any product when doing an Inventory Adjustment. Thresholds defined in Locations have preference over Warehouse's ones." +msgid "" +"Maximum Discrepancy Rate allowed for any product when doing an Inventory " +"Adjustment. Thresholds defined in Locations have preference over Warehouse's" +" ones." msgstr "" #. module: stock_inventory_discrepancy @@ -81,13 +71,33 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state -msgid "States of the Inventory Adjustment:\n" +msgid "" +"States of the Inventory Adjustment:\n" "- Draft: Inventory not started.\n" "- In Progress: Inventory in execution.\n" "- Pending to Approve: Inventory have some discrepancies greater than the predefined threshold and it's waiting for the Control Manager approval.\n" @@ -100,20 +110,31 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format -msgid "The Qty Update is over the Discrepancy Threshold.\n" +msgid "" +"The Qty Update is over the Discrepancy Threshold.\n" " Please, contact a user with rights to perform this action." msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty -msgid "The difference between the actual qty counted and the theoretical quantity on hand." +msgid "" +"The difference between the actual qty counted and the theoretical quantity " +"on hand." msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_percent -msgid "The discrepancy expressed in percent with theoretical quantity as basis" +msgid "" +"The discrepancy expressed in percent with theoretical quantity as basis" +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" msgstr "" #. module: stock_inventory_discrepancy @@ -121,6 +142,12 @@ msgstr "" msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -131,13 +158,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already" +" validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/tr_TR.po b/stock_inventory_discrepancy/i18n/tr_TR.po index 4f738e65a..233fc226e 100644 --- a/stock_inventory_discrepancy/i18n/tr_TR.po +++ b/stock_inventory_discrepancy/i18n/tr_TR.po @@ -19,11 +19,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=1; plural=0;\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -34,21 +29,11 @@ msgstr "" msgid "Discrepancy percent (%)" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -92,10 +77,29 @@ msgid "Number of Discrepancies Over Threshold" msgstr "" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +msgid "Propagate discrepancy threshold" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state msgid "" @@ -113,7 +117,7 @@ msgid "Status" msgstr "" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format msgid "" "The Qty Update is over the Discrepancy Threshold.\n" @@ -132,11 +136,24 @@ msgstr "" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -147,12 +164,15 @@ msgstr "" msgid "Validate Inventory Adjustments Under Threshold" msgstr "" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "Depo" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/zh_CN.po b/stock_inventory_discrepancy/i18n/zh_CN.po index ab8a927dd..f78d3ce56 100644 --- a/stock_inventory_discrepancy/i18n/zh_CN.po +++ b/stock_inventory_discrepancy/i18n/zh_CN.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * stock_inventory_discrepancy +# * stock_inventory_discrepancy # msgid "" msgstr "" @@ -16,11 +16,6 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Weblate 3.8\n" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Cancelled" -msgstr "已取消" - #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty msgid "Discrepancy" @@ -31,21 +26,11 @@ msgstr "差异" msgid "Discrepancy percent (%)" msgstr "差异百分比(%)" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Draft" -msgstr "草稿" - #. module: stock_inventory_discrepancy #: model_terms:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" msgstr "强制验证" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "In Progress" -msgstr "进行中" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory msgid "Inventory" @@ -70,13 +55,22 @@ msgstr "最大差异率阈值" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_warehouse__discrepancy_threshold -msgid "Maximum Discrepancy Rate allowed for any product when doing an Inventory Adjustment. Threshold defined in involved Location has preference." -msgstr "进行库存调整时,任何产品所允许的最大差异率。在所涉及的位置中定义的阈值具有优先级。" +msgid "" +"Maximum Discrepancy Rate allowed for any product when doing an Inventory " +"Adjustment. Threshold defined in involved Location has preference." +msgstr "" +"进行库存调整时,任何产品所允许的最大差异率。在所涉及的位置中定义的阈值具有优" +"先级。" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__discrepancy_threshold -msgid "Maximum Discrepancy Rate allowed for any product when doing an Inventory Adjustment. Thresholds defined in Locations have preference over Warehouse's ones." -msgstr "进行库存调整时,任何产品所允许的最大差异率。在“位置”中定义的阈值优先于“仓库”的阈值。" +msgid "" +"Maximum Discrepancy Rate allowed for any product when doing an Inventory " +"Adjustment. Thresholds defined in Locations have preference over Warehouse's " +"ones." +msgstr "" +"进行库存调整时,任何产品所允许的最大差异率。在“位置”中定义的阈值优先于“仓" +"库”的阈值。" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory__over_discrepancy_line_count @@ -84,16 +78,39 @@ msgid "Number of Discrepancies Over Threshold" msgstr "超过阈值的差异数量" #. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, fuzzy, python-format +msgid "Only a stock manager can validate an inventory adjustment." +msgstr "验证所有库存调整" + +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#: model:ir.model.fields.selection,name:stock_inventory_discrepancy.selection__stock_inventory__state__pending +#, python-format msgid "Pending to Approve" msgstr "待批准" +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +#, fuzzy +msgid "Propagate Maximum Discrepancy Rate Threshold to child locations" +msgstr "最大差异率阈值" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location__propagate_discrepancy_threshold +#, fuzzy +msgid "Propagate discrepancy threshold" +msgstr "最大差异率阈值" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory__state -msgid "States of the Inventory Adjustment:\n" +msgid "" +"States of the Inventory Adjustment:\n" "- Draft: Inventory not started.\n" "- In Progress: Inventory in execution.\n" -"- Pending to Approve: Inventory have some discrepancies greater than the predefined threshold and it's waiting for the Control Manager approval.\n" +"- Pending to Approve: Inventory have some discrepancies greater than the " +"predefined threshold and it's waiting for the Control Manager approval.\n" "- Validated: Inventory Approved." msgstr "" "库存调整的状态:\n" @@ -108,9 +125,10 @@ msgid "Status" msgstr "状态" #. module: stock_inventory_discrepancy -#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:56 +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:0 #, python-format -msgid "The Qty Update is over the Discrepancy Threshold.\n" +msgid "" +"The Qty Update is over the Discrepancy Threshold.\n" " Please, contact a user with rights to perform this action." msgstr "" "数量更新超过差异阈值。\n" @@ -118,7 +136,9 @@ msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_qty -msgid "The difference between the actual qty counted and the theoretical quantity on hand." +msgid "" +"The difference between the actual qty counted and the theoretical quantity " +"on hand." msgstr "计算的实际数量与现有理论数量之间的差。" #. module: stock_inventory_discrepancy @@ -126,11 +146,24 @@ msgstr "计算的实际数量与现有理论数量之间的差。" msgid "The discrepancy expressed in percent with theoretical quantity as basis" msgstr "差异以理论量为基础的百分比表示" +#. module: stock_inventory_discrepancy +#. openerp-web +#: code:addons/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js:0 +#, python-format +msgid "The inventory needs to be approved" +msgstr "" + #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line__discrepancy_threshold msgid "Threshold (%)" msgstr "阈值(%)" +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, fuzzy, python-format +msgid "Tracked Products in Inventory Adjustment" +msgstr "验证所有库存调整" + #. module: stock_inventory_discrepancy #: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always msgid "Validate All inventory Adjustments" @@ -141,12 +174,27 @@ msgstr "验证所有库存调整" msgid "Validate Inventory Adjustments Under Threshold" msgstr "验证阈值下的库存调整" -#. module: stock_inventory_discrepancy -#: selection:stock.inventory,state:0 -msgid "Validated" -msgstr "已验证" - #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse msgid "Warehouse" msgstr "仓库" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/hooks.py:0 +#, python-format +msgid "" +"You can't validate the inventory '%s', maybe this inventory has been already " +"validated or isn't ready." +msgstr "" + +#~ msgid "Cancelled" +#~ msgstr "已取消" + +#~ msgid "Draft" +#~ msgstr "草稿" + +#~ msgid "In Progress" +#~ msgstr "进行中" + +#~ msgid "Validated" +#~ msgstr "已验证" diff --git a/stock_inventory_discrepancy/models/stock_inventory.py b/stock_inventory_discrepancy/models/stock_inventory.py index d2c39234f..fe44f56f7 100644 --- a/stock_inventory_discrepancy/models/stock_inventory.py +++ b/stock_inventory_discrepancy/models/stock_inventory.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow S.L. -# (http://www.eficent.com) +# (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import _, api, fields, models @@ -9,16 +9,8 @@ from odoo.exceptions import UserError class StockInventory(models.Model): _inherit = "stock.inventory" - INVENTORY_STATE_SELECTION = [ - ("draft", "Draft"), - ("cancel", "Cancelled"), - ("confirm", "In Progress"), - ("pending", "Pending to Approve"), - ("done", "Validated"), - ] - state = fields.Selection( - selection=INVENTORY_STATE_SELECTION, + selection_add=[("pending", "Pending to Approve"), ("done",)], string="Status", readonly=True, index=True, @@ -37,7 +29,6 @@ class StockInventory(models.Model): store=True, ) - @api.multi @api.depends("line_ids.product_qty", "line_ids.theoretical_qty") def _compute_over_discrepancy_line_count(self): for inventory in self: @@ -46,13 +37,12 @@ class StockInventory(models.Model): ) inventory.over_discrepancy_line_count = len(lines) - @api.multi def action_over_discrepancies(self): self.write({"state": "pending"}) def _check_group_inventory_validation_always(self): grp_inv_val = self.env.ref( - "stock_inventory_discrepancy.group_" "stock_inventory_validation_always" + "stock_inventory_discrepancy.group_stock_inventory_validation_always" ) if grp_inv_val in self.env.user.groups_id: return True @@ -70,13 +60,17 @@ class StockInventory(models.Model): if inventory.over_discrepancy_line_count and inventory.line_ids.filtered( lambda t: t.discrepancy_threshold > 0.0 ): - if inventory.env.context.get("normal_view", False): + if self.user_has_groups( + "stock_inventory_discrepancy.group_stock_inventory_validation" + ) and not self.user_has_groups( + "stock_inventory_discrepancy." + "group_stock_inventory_validation_always" + ): inventory.action_over_discrepancies() return True else: inventory._check_group_inventory_validation_always() return super(StockInventory, self)._action_done() - @api.multi def action_force_done(self): return super(StockInventory, self)._action_done() diff --git a/stock_inventory_discrepancy/models/stock_inventory_line.py b/stock_inventory_discrepancy/models/stock_inventory_line.py index 456200849..a1a0fceda 100644 --- a/stock_inventory_discrepancy/models/stock_inventory_line.py +++ b/stock_inventory_discrepancy/models/stock_inventory_line.py @@ -1,11 +1,9 @@ # Copyright 2017-2020 ForgeFlow S.L. -# (http://www.eficent.com) +# (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models -from odoo.addons import decimal_precision as dp - class StockInventoryLine(models.Model): _inherit = "stock.inventory.line" @@ -15,7 +13,7 @@ class StockInventoryLine(models.Model): compute="_compute_discrepancy", help="The difference between the actual qty counted and the " "theoretical quantity on hand.", - digits=dp.get_precision("Product Unit of Measure"), + digits="Product Unit of Measure", default=0, ) discrepancy_percent = fields.Float( @@ -32,7 +30,6 @@ class StockInventoryLine(models.Model): compute="_compute_discrepancy_threshold", ) - @api.multi @api.depends("theoretical_qty", "product_qty") def _compute_discrepancy(self): for line in self: @@ -43,8 +40,9 @@ class StockInventoryLine(models.Model): ) elif not line.theoretical_qty and line.product_qty: line.discrepancy_percent = 100.0 + else: + line.discrepancy_percent = 0.0 - @api.multi def _compute_discrepancy_threshold(self): for line in self: whs = line.location_id.get_warehouse() diff --git a/stock_inventory_discrepancy/models/stock_location.py b/stock_inventory_discrepancy/models/stock_location.py index 9da29738d..96f927673 100644 --- a/stock_inventory_discrepancy/models/stock_location.py +++ b/stock_inventory_discrepancy/models/stock_location.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow S.L. -# (http://www.eficent.com) +# (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models @@ -15,3 +15,22 @@ class StockLocation(models.Model): "an Inventory Adjustment. Thresholds defined in Locations have " "preference over Warehouse's ones.", ) + propagate_discrepancy_threshold = fields.Boolean( + string="Propagate discrepancy threshold", + help="Propagate Maximum Discrepancy Rate Threshold to child locations", + ) + + def write(self, values): + res = super().write(values) + # Set the discrepancy threshold for all child locations + if values.get("discrepancy_threshold", False): + for location in self.filtered( + lambda loc: loc.propagate_discrepancy_threshold and loc.child_ids + ): + location.child_ids.write( + { + "discrepancy_threshold": values["discrepancy_threshold"], + "propagate_discrepancy_threshold": True, + } + ) + return res diff --git a/stock_inventory_discrepancy/models/stock_warehouse.py b/stock_inventory_discrepancy/models/stock_warehouse.py index 7284603e1..6f1f4ec31 100644 --- a/stock_inventory_discrepancy/models/stock_warehouse.py +++ b/stock_inventory_discrepancy/models/stock_warehouse.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow S.L. -# (http://www.eficent.com) +# (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models diff --git a/stock_inventory_discrepancy/readme/CONTRIBUTORS.rst b/stock_inventory_discrepancy/readme/CONTRIBUTORS.rst index 43adb24a7..0fea89874 100644 --- a/stock_inventory_discrepancy/readme/CONTRIBUTORS.rst +++ b/stock_inventory_discrepancy/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Lois Rilo * Andreas Dian Sukarno Putro * Bhavesh Odedra +* Héctor Villarreal diff --git a/stock_inventory_discrepancy/security/stock_inventory_discrepancy_security.xml b/stock_inventory_discrepancy/security/stock_inventory_discrepancy_security.xml index b0f079de9..b9d941028 100644 --- a/stock_inventory_discrepancy/security/stock_inventory_discrepancy_security.xml +++ b/stock_inventory_discrepancy/security/stock_inventory_discrepancy_security.xml @@ -1,29 +1,30 @@ - + - - Validate Inventory Adjustments Under Threshold - + Validate All inventory Adjustments - - - + + + - - + - - + - diff --git a/stock_inventory_discrepancy/static/description/index.html b/stock_inventory_discrepancy/static/description/index.html index bcc1058a8..8046f1f27 100644 --- a/stock_inventory_discrepancy/static/description/index.html +++ b/stock_inventory_discrepancy/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

Adds the capability to show the discrepancy of every line in an inventory and to block the inventory validation (setting it as ‘Pending to Approve’) when the discrepancy is greater than an user defined threshold.

@@ -416,7 +416,7 @@ validation of an inventory pending to approve.

Bugs are tracked on GitHub 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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -424,15 +424,16 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

Authors

    -
  • Eficent
  • +
  • ForgeFlow

Contributors

@@ -442,7 +443,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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-warehouse project on GitHub.

+

This module is part of the OCA/stock-logistics-warehouse project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js b/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js new file mode 100644 index 000000000..57b0e6be4 --- /dev/null +++ b/stock_inventory_discrepancy/static/src/js/inventory_validate_button_controller.js @@ -0,0 +1,42 @@ +odoo.define("stock_inventory_discrepancy.InventoryValidationController", function( + require +) { + "use strict"; + + var core = require("web.core"); + var InventoryValidationController = require("stock.InventoryValidationController"); + + var _t = core._t; + + InventoryValidationController.include({ + /** + * @override + * @see displayNotification + */ + do_notify: function(title, message, sticky, className) { + var self = this; + if (this.modelName === "stock.inventory.line") { + this._rpc({ + model: "stock.inventory", + method: "read", + args: [this.inventory_id, ["state"]], + }) + .then(function(res) { + if (res[0].state === "pending") { + title = _t("Pending to Approve"); + message = _t("The inventory needs to be approved"); + } + }) + .finally(function() { + return self.displayNotification({ + type: "warning", + title: title, + message: message, + sticky: sticky, + className: className, + }); + }); + } + }, + }); +}); diff --git a/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py b/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py index c48da0460..07b894086 100644 --- a/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py +++ b/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py @@ -1,5 +1,5 @@ # Copyright 2017-2020 ForgeFlow S.L. -# (http://www.eficent.com) +# (http://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.exceptions import UserError @@ -14,7 +14,6 @@ class TestInventoryDiscrepancy(TransactionCase): self.obj_inventory = self.env["stock.inventory"] self.obj_product = self.env["product.product"] self.obj_warehouse = self.env["stock.warehouse"] - self.obj_upd_qty_wizard = self.env["stock.change.product.qty"] self.product1 = self.obj_product.create( {"name": "Test Product 1", "type": "product", "default_code": "PROD1"} @@ -33,8 +32,10 @@ class TestInventoryDiscrepancy(TransactionCase): # Create Stock manager able to force validation on inventories. group_stock_man = self.env.ref("stock.group_stock_manager") group_inventory_all = self.env.ref( - "stock_inventory_discrepancy." "group_stock_inventory_validation_always" + "stock_inventory_discrepancy.group_stock_inventory_validation_always" ) + group_employee = self.env.ref("base.group_user") + self.manager = self.env["res.users"].create( { "name": "Test Manager", @@ -53,10 +54,27 @@ class TestInventoryDiscrepancy(TransactionCase): } ) + self.user_2 = self.env["res.users"].create( + { + "name": "Test User 2", + "login": "user_2", + "email": "test2.user@example.com", + "groups_id": [(6, 0, [group_stock_user.id, group_inventory_all.id])], + } + ) + + self.no_user = self.env["res.users"].create( + { + "name": "No User", + "login": "no_user", + "email": "test.no_user@example.com", + "groups_id": [(6, 0, [group_employee.id])], + } + ) + starting_inv = self.obj_inventory.create( { "name": "Starting inventory", - "filter": "product", "line_ids": [ ( 0, @@ -89,8 +107,7 @@ class TestInventoryDiscrepancy(TransactionCase): inventory = self.obj_inventory.create( { "name": "Test Discrepancy Computation", - "location_id": self.test_loc.id, - "filter": "none", + "location_ids": [(4, self.test_loc.id)], "line_ids": [ ( 0, @@ -131,8 +148,7 @@ class TestInventoryDiscrepancy(TransactionCase): inventory = self.obj_inventory.create( { "name": "Test Forcing Validation Method", - "location_id": self.test_loc.id, - "filter": "none", + "location_ids": [(4, self.test_loc.id)], "line_ids": [ ( 0, @@ -155,7 +171,8 @@ class TestInventoryDiscrepancy(TransactionCase): 0.1, "Threshold wrongly computed in Inventory Line.", ) - inventory.with_context({"normal_view": True}).action_validate() + inventory.with_user(self.user).action_start() + inventory.with_user(self.user).action_validate() self.assertEqual( inventory.over_discrepancy_line_count, 1, @@ -166,7 +183,7 @@ class TestInventoryDiscrepancy(TransactionCase): "pending", "Inventory Adjustment not changing to Pending to " "Approve.", ) - inventory.sudo(self.manager).action_force_done() + inventory.with_user(self.manager).action_force_done() self.assertEqual( inventory.state, "done", @@ -174,13 +191,56 @@ class TestInventoryDiscrepancy(TransactionCase): "not working properly.", ) + def test_discrepancy_validation_always(self): + """Tests the new workflow""" + inventory = self.obj_inventory.create( + { + "name": "Test Forcing Validation Method", + "location_ids": [(4, self.test_loc.id)], + "line_ids": [ + ( + 0, + 0, + { + "product_id": self.product1.id, + "product_uom_id": self.env.ref("uom.product_uom_unit").id, + "product_qty": 3.0, + "location_id": self.test_loc.id, + }, + ) + ], + } + ) + self.assertEqual( + inventory.state, "draft", "Testing Inventory wrongly configurated" + ) + self.assertEqual( + inventory.line_ids.discrepancy_threshold, + 0.1, + "Threshold wrongly computed in Inventory Line.", + ) + inventory.with_user(self.user_2).action_start() + # User with no privileges can't validate a Inventory Adjustment. + with self.assertRaises(UserError): + inventory.with_user(self.no_user).action_validate() + inventory.with_user(self.user_2).action_validate() + self.assertEqual( + inventory.over_discrepancy_line_count, + 1, + "Computation of over-discrepancies failed.", + ) + self.assertEqual( + inventory.state, + "done", + "Stock Managers belongs to group Validate All inventory Adjustments", + ) + def test_warehouse_threshold(self): """Tests the behaviour if the threshold is set on the WH.""" inventory = self.obj_inventory.create( { "name": "Test Threshold Defined in WH", - "location_id": self.test_wh.view_location_id.id, - "filter": "none", + "location_ids": [(4, self.test_wh.view_location_id.id)], "line_ids": [ ( 0, @@ -201,17 +261,23 @@ class TestInventoryDiscrepancy(TransactionCase): "Threshold wrongly computed in Inventory Line.", ) - def test_update_qty_user_error(self): - """Test if a user error raises when a stock user tries to update the - qty for a product and the correction is a discrepancy over the - threshold.""" - upd_qty = self.obj_upd_qty_wizard.sudo(self.user).create( + def test_propagate_discrepancy_threshold(self): + view_test_loc = self.obj_location.create( + {"name": "Test Location", "usage": "view", "discrepancy_threshold": 0.1} + ) + child_test_loc = self.obj_location.create( { - "product_id": self.product1.id, - "product_tmpl_id": self.product1.product_tmpl_id.id, - "new_quantity": 10.0, - "location_id": self.test_loc.id, + "name": "Child Test Location", + "usage": "internal", + "discrepancy_threshold": 0.2, + "location_id": view_test_loc.id, } ) - with self.assertRaises(UserError): - upd_qty.change_product_qty() + view_test_loc.write( + {"discrepancy_threshold": 0.3, "propagate_discrepancy_threshold": True} + ) + self.assertEqual( + child_test_loc.discrepancy_threshold, + 0.3, + "Threshold Discrepancy wrongly propagated", + ) diff --git a/stock_inventory_discrepancy/views/assets_backend.xml b/stock_inventory_discrepancy/views/assets_backend.xml new file mode 100644 index 000000000..829e9efef --- /dev/null +++ b/stock_inventory_discrepancy/views/assets_backend.xml @@ -0,0 +1,15 @@ + + +