From e009516fbe01e2c57de2bab519042fc6c47e2ade Mon Sep 17 00:00:00 2001 From: lreficent Date: Wed, 23 Aug 2017 11:54:21 +0200 Subject: [PATCH] [10.0][MIG] stock_inventory_discrepancy --- stock_inventory_discrepancy/README.rst | 8 +- stock_inventory_discrepancy/__init__.py | 2 - .../{__openerp__.py => __manifest__.py} | 4 +- stock_inventory_discrepancy/i18n/cs_CZ.po | 117 ++++++++++++++++++ stock_inventory_discrepancy/i18n/de.po | 19 ++- stock_inventory_discrepancy/i18n/es.po | 11 +- stock_inventory_discrepancy/i18n/fr.po | 8 +- stock_inventory_discrepancy/i18n/hr.po | 117 ++++++++++++++++++ stock_inventory_discrepancy/i18n/nl_NL.po | 117 ++++++++++++++++++ stock_inventory_discrepancy/i18n/sl.po | 12 +- .../models/__init__.py | 2 - .../models/stock_inventory.py | 4 +- .../models/stock_inventory_line.py | 41 +++--- .../models/stock_location.py | 2 +- .../models/stock_warehouse.py | 2 +- stock_inventory_discrepancy/tests/__init__.py | 2 - .../tests/test_inventory_discrepancy.py | 4 +- 17 files changed, 408 insertions(+), 64 deletions(-) rename stock_inventory_discrepancy/{__openerp__.py => __manifest__.py} (90%) create mode 100644 stock_inventory_discrepancy/i18n/cs_CZ.po create mode 100644 stock_inventory_discrepancy/i18n/hr.po create mode 100644 stock_inventory_discrepancy/i18n/nl_NL.po diff --git a/stock_inventory_discrepancy/README.rst b/stock_inventory_discrepancy/README.rst index d08a07a18..349f9ab31 100644 --- a/stock_inventory_discrepancy/README.rst +++ b/stock_inventory_discrepancy/README.rst @@ -8,10 +8,10 @@ Stock Inventory Discrepancy 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 a user defined threshold. +discrepancy is greater than an user defined threshold. Only new group "Validate All inventory Adjustments" will be able to force the -validation of those blocked inventories. By default Stock manager will belong +validation of those blocked inventories. By default, Stock manager will belong to this group. In addition, Stock Users can validate inventories under the threshold now. @@ -24,7 +24,7 @@ You can configure the threshold as described below: #. Go to "Inventory > Warehouse Management" > Warehouses" or to "Inventory > Warehouse Management" > Locations". #. Modify the "Maximum Discrepancy Rate Threshold" either in a Warehouse or - in a location. If set to 0.0 the threshold is disabled. + in a location. If set to 0.0 in both the threshold is disabled. Usage ===== @@ -42,7 +42,7 @@ If you configured a "Maximum Discrepancy Rate Threshold". .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/153/9.0 + :target: https://runbot.odoo-community.org/runbot/153/10.0 Bug Tracker diff --git a/stock_inventory_discrepancy/__init__.py b/stock_inventory_discrepancy/__init__.py index e50f9b656..149f4e4fd 100644 --- a/stock_inventory_discrepancy/__init__.py +++ b/stock_inventory_discrepancy/__init__.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import models diff --git a/stock_inventory_discrepancy/__openerp__.py b/stock_inventory_discrepancy/__manifest__.py similarity index 90% rename from stock_inventory_discrepancy/__openerp__.py rename to stock_inventory_discrepancy/__manifest__.py index ef00174d8..9adf7f942 100644 --- a/stock_inventory_discrepancy/__openerp__.py +++ b/stock_inventory_discrepancy/__manifest__.py @@ -7,7 +7,7 @@ "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": "9.0.1.0.0", + "version": "10.0.1.0.0", "author": "Eficent, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/stock-logistics-warehouse", @@ -17,7 +17,7 @@ 'views/stock_inventory_view.xml', 'views/stock_warehouse_view.xml', 'views/stock_location_view.xml', - 'security/stock_inventory_discrepancy_security.xml' + 'security/stock_inventory_discrepancy_security.xml', ], "license": "AGPL-3", 'installable': True, diff --git a/stock_inventory_discrepancy/i18n/cs_CZ.po b/stock_inventory_discrepancy/i18n/cs_CZ.po new file mode 100644 index 000000000..78e4c210b --- /dev/null +++ b/stock_inventory_discrepancy/i18n/cs_CZ.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_inventory_discrepancy +# +# Translators: +# Lukáš Spurný , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-27 11:37+0000\n" +"PO-Revision-Date: 2018-02-27 11:37+0000\n" +"Last-Translator: Lukáš Spurný , 2018\n" +"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/teams/23907/cs_CZ/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: cs_CZ\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_qty +msgid "Discrepancy" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_percent +msgid "Discrepancy percent (%)" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form +msgid "Force Validation" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory +msgid "Inventory" +msgstr "Inventář" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory_line +msgid "Inventory Line" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_location +msgid "Inventory Locations" +msgstr "Umístění inventáře" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_warehouse_discrepancy_threshold +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_threshold +msgid "Maximum Discrepancy Rate Threshold" +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 "" + +#. 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 "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_over_discrepancy_line_count +msgid "Number of Discrepancies Over Threshold" +msgstr "" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:55 +#, python-format +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." +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" +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 +#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always +msgid "Validate All inventory Adjustments" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation +msgid "Validate Inventory Adjustments Under Threshold" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse +msgid "Warehouse" +msgstr "" diff --git a/stock_inventory_discrepancy/i18n/de.po b/stock_inventory_discrepancy/i18n/de.po index 36fbf6a61..43ba40648 100644 --- a/stock_inventory_discrepancy/i18n/de.po +++ b/stock_inventory_discrepancy/i18n/de.po @@ -4,14 +4,13 @@ # # Translators: # OCA Transbot , 2017 -# Rudolf Schnapka , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-29 13:12+0000\n" -"PO-Revision-Date: 2017-06-29 13:12+0000\n" -"Last-Translator: Rudolf Schnapka , 2017\n" +"POT-Creation-Date: 2017-11-30 03:53+0000\n" +"PO-Revision-Date: 2017-11-30 03:53+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,17 +21,17 @@ msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_qty msgid "Discrepancy" -msgstr "Abweichung" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_percent msgid "Discrepancy percent (%)" -msgstr "Abweichung (%)" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form msgid "Force Validation" -msgstr "Erzwinge Freigabe" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory @@ -47,14 +46,14 @@ msgstr "Inventurposition" #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_location msgid "Inventory Locations" -msgstr "Bestandslagerorte" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_warehouse_discrepancy_threshold #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_threshold msgid "Maximum Discrepancy Rate Threshold" -msgstr "Obergrenze für hinnehmbare Abweichung" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_warehouse_discrepancy_threshold diff --git a/stock_inventory_discrepancy/i18n/es.po b/stock_inventory_discrepancy/i18n/es.po index 727a3ddb7..439e29c38 100644 --- a/stock_inventory_discrepancy/i18n/es.po +++ b/stock_inventory_discrepancy/i18n/es.po @@ -4,14 +4,13 @@ # # Translators: # OCA Transbot , 2017 -# Antonio Trueba , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-18 04:05+0000\n" -"PO-Revision-Date: 2017-02-18 04:05+0000\n" -"Last-Translator: Antonio Trueba , 2017\n" +"POT-Creation-Date: 2017-11-30 03:53+0000\n" +"PO-Revision-Date: 2017-11-30 03:53+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -47,7 +46,7 @@ msgstr "Línea inventario" #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_location msgid "Inventory Locations" -msgstr "Ubicaciones de inventario" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold diff --git a/stock_inventory_discrepancy/i18n/fr.po b/stock_inventory_discrepancy/i18n/fr.po index 1ab873b1f..acb623494 100644 --- a/stock_inventory_discrepancy/i18n/fr.po +++ b/stock_inventory_discrepancy/i18n/fr.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-18 04:05+0000\n" -"PO-Revision-Date: 2017-02-18 04:05+0000\n" +"POT-Creation-Date: 2017-11-30 03:53+0000\n" +"PO-Revision-Date: 2017-11-30 03:53+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" @@ -46,7 +46,7 @@ msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_location msgid "Inventory Locations" -msgstr "Emplacements d'inventaire" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold diff --git a/stock_inventory_discrepancy/i18n/hr.po b/stock_inventory_discrepancy/i18n/hr.po new file mode 100644 index 000000000..695dcfddc --- /dev/null +++ b/stock_inventory_discrepancy/i18n/hr.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_inventory_discrepancy +# +# Translators: +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-27 11:37+0000\n" +"PO-Revision-Date: 2018-02-27 11:37+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"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 +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_qty +msgid "Discrepancy" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_percent +msgid "Discrepancy percent (%)" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form +msgid "Force Validation" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory +msgid "Inventory" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory_line +msgid "Inventory Line" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_location +msgid "Inventory Locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_warehouse_discrepancy_threshold +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_threshold +msgid "Maximum Discrepancy Rate Threshold" +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 "" + +#. 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 "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_over_discrepancy_line_count +msgid "Number of Discrepancies Over Threshold" +msgstr "" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:55 +#, python-format +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." +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" +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 +#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always +msgid "Validate All inventory Adjustments" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation +msgid "Validate Inventory Adjustments Under Threshold" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse +msgid "Warehouse" +msgstr "Skladište" diff --git a/stock_inventory_discrepancy/i18n/nl_NL.po b/stock_inventory_discrepancy/i18n/nl_NL.po new file mode 100644 index 000000000..c04bafc0a --- /dev/null +++ b/stock_inventory_discrepancy/i18n/nl_NL.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_inventory_discrepancy +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-30 03:53+0000\n" +"PO-Revision-Date: 2017-11-30 03:53+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_qty +msgid "Discrepancy" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_percent +msgid "Discrepancy percent (%)" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.ui.view,arch_db:stock_inventory_discrepancy.view_inventory_form +msgid "Force Validation" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory +msgid "Inventory" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_inventory_line +msgid "Inventory Line" +msgstr "Voorraadregel" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_location +msgid "Inventory Locations" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_warehouse_discrepancy_threshold +#: model:ir.model.fields,help:stock_inventory_discrepancy.field_stock_inventory_line_discrepancy_threshold +msgid "Maximum Discrepancy Rate Threshold" +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 "" + +#. 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 "" + +#. module: stock_inventory_discrepancy +#: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_inventory_over_discrepancy_line_count +msgid "Number of Discrepancies Over Threshold" +msgstr "" + +#. module: stock_inventory_discrepancy +#: code:addons/stock_inventory_discrepancy/models/stock_inventory.py:55 +#, python-format +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." +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" +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 +#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation_always +msgid "Validate All inventory Adjustments" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:res.groups,name:stock_inventory_discrepancy.group_stock_inventory_validation +msgid "Validate Inventory Adjustments Under Threshold" +msgstr "" + +#. module: stock_inventory_discrepancy +#: model:ir.model,name:stock_inventory_discrepancy.model_stock_warehouse +msgid "Warehouse" +msgstr "Magazijn" diff --git a/stock_inventory_discrepancy/i18n/sl.po b/stock_inventory_discrepancy/i18n/sl.po index 64c493211..e7f87e42f 100644 --- a/stock_inventory_discrepancy/i18n/sl.po +++ b/stock_inventory_discrepancy/i18n/sl.po @@ -3,14 +3,14 @@ # * stock_inventory_discrepancy # # Translators: -# Matjaž Mozetič , 2017 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-18 04:05+0000\n" -"PO-Revision-Date: 2017-02-18 04:05+0000\n" -"Last-Translator: Matjaž Mozetič , 2017\n" +"POT-Creation-Date: 2017-11-30 03:53+0000\n" +"PO-Revision-Date: 2017-11-30 03:53+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -46,7 +46,7 @@ msgstr "Postavka inventarja" #. module: stock_inventory_discrepancy #: model:ir.model,name:stock_inventory_discrepancy.model_stock_location msgid "Inventory Locations" -msgstr "Lokacije inventarja" +msgstr "" #. module: stock_inventory_discrepancy #: model:ir.model.fields,field_description:stock_inventory_discrepancy.field_stock_location_discrepancy_threshold diff --git a/stock_inventory_discrepancy/models/__init__.py b/stock_inventory_discrepancy/models/__init__.py index 0a01a2d36..6cf0c1ba8 100644 --- a/stock_inventory_discrepancy/models/__init__.py +++ b/stock_inventory_discrepancy/models/__init__.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import stock_inventory diff --git a/stock_inventory_discrepancy/models/stock_inventory.py b/stock_inventory_discrepancy/models/stock_inventory.py index 28af0aea9..c9e73d955 100644 --- a/stock_inventory_discrepancy/models/stock_inventory.py +++ b/stock_inventory_discrepancy/models/stock_inventory.py @@ -3,8 +3,8 @@ # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import _, api, fields, models -from openerp.exceptions import UserError +from odoo import _, api, fields, models +from odoo.exceptions import UserError class StockInventory(models.Model): diff --git a/stock_inventory_discrepancy/models/stock_inventory_line.py b/stock_inventory_discrepancy/models/stock_inventory_line.py index b13e99d43..68289c767 100644 --- a/stock_inventory_discrepancy/models/stock_inventory_line.py +++ b/stock_inventory_discrepancy/models/stock_inventory_line.py @@ -3,32 +3,33 @@ # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import api, fields, models +from odoo import api, fields, models class StockInventoryLine(models.Model): _inherit = 'stock.inventory.line' - @api.one + @api.multi def _compute_discrepancy(self): - self.discrepancy_qty = self.product_qty - self.theoretical_qty - if self.theoretical_qty: - self.discrepancy_percent = 100 * abs( - (self.product_qty - self.theoretical_qty) / - self.theoretical_qty) - elif not self.theoretical_qty and self.product_qty: - self.discrepancy_percent = 100.0 + for l in self: + l.discrepancy_qty = l.product_qty - l.theoretical_qty + if l.theoretical_qty: + l.discrepancy_percent = 100 * abs( + (l.product_qty - l.theoretical_qty) / + l.theoretical_qty) + elif not l.theoretical_qty and l.product_qty: + l.discrepancy_percent = 100.0 - @api.one - def _get_discrepancy_threshold(self): - wh_id = self.location_id.get_warehouse(self.location_id) - wh = self.env['stock.warehouse'].browse(wh_id) - if self.location_id.discrepancy_threshold > 0.0: - self.discrepancy_threshold = self.location_id.discrepancy_threshold - elif wh.discrepancy_threshold > 0.0: - self.discrepancy_threshold = wh.discrepancy_threshold - else: - self.discrepancy_threshold = False + @api.multi + def _compute_discrepancy_threshold(self): + for l in self: + wh = l.location_id.get_warehouse() + if l.location_id.discrepancy_threshold > 0.0: + l.discrepancy_threshold = l.location_id.discrepancy_threshold + elif wh.discrepancy_threshold > 0.0: + l.discrepancy_threshold = wh.discrepancy_threshold + else: + l.discrepancy_threshold = False discrepancy_qty = fields.Float( string='Discrepancy', @@ -45,4 +46,4 @@ class StockInventoryLine(models.Model): string='Threshold (%)', digits=(3, 2), help="Maximum Discrepancy Rate Threshold", - compute=_get_discrepancy_threshold) + compute=_compute_discrepancy_threshold) diff --git a/stock_inventory_discrepancy/models/stock_location.py b/stock_inventory_discrepancy/models/stock_location.py index d040ecbd4..366396188 100644 --- a/stock_inventory_discrepancy/models/stock_location.py +++ b/stock_inventory_discrepancy/models/stock_location.py @@ -3,7 +3,7 @@ # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import fields, models +from odoo import fields, models class StockLocation(models.Model): diff --git a/stock_inventory_discrepancy/models/stock_warehouse.py b/stock_inventory_discrepancy/models/stock_warehouse.py index 717c79cf3..8a2f61299 100644 --- a/stock_inventory_discrepancy/models/stock_warehouse.py +++ b/stock_inventory_discrepancy/models/stock_warehouse.py @@ -3,7 +3,7 @@ # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import fields, models +from odoo import fields, models class StockWarehouse(models.Model): diff --git a/stock_inventory_discrepancy/tests/__init__.py b/stock_inventory_discrepancy/tests/__init__.py index 51849fb70..aa61d2772 100644 --- a/stock_inventory_discrepancy/tests/__init__.py +++ b/stock_inventory_discrepancy/tests/__init__.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import test_inventory_discrepancy diff --git a/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py b/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py index 4dd9c2cff..e42ee88fd 100644 --- a/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py +++ b/stock_inventory_discrepancy/tests/test_inventory_discrepancy.py @@ -3,8 +3,8 @@ # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp.tests.common import TransactionCase -from openerp.exceptions import UserError +from odoo.tests.common import TransactionCase +from odoo.exceptions import UserError class TestInventoryDiscrepancy(TransactionCase):