diff --git a/setup/stock_auto_move/odoo/addons/stock_auto_move b/setup/stock_auto_move/odoo/addons/stock_auto_move new file mode 120000 index 000000000000..e1d54873d3d1 --- /dev/null +++ b/setup/stock_auto_move/odoo/addons/stock_auto_move @@ -0,0 +1 @@ +../../../../stock_auto_move \ No newline at end of file diff --git a/setup/stock_auto_move/setup.py b/setup/stock_auto_move/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/stock_auto_move/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_auto_move/README.rst b/stock_auto_move/README.rst new file mode 100644 index 000000000000..25beef58cf27 --- /dev/null +++ b/stock_auto_move/README.rst @@ -0,0 +1,82 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================= +Automatic Move Processing +========================= + +This modules adds the possibility to have move automatically processed as soon +as the products are available in the move source location. + +It also adds the possibility to define the move as being automatic in +a procurement rule. + +Automatic moves are triggered by previous move when the move is chained +or by the scheduler otherwise. + +Note that automatic moves are given a procurement group name "Automatic", +whatever the user or the procurement rule selects. + +Installation +============ + +To install this module, you need to: + +* Click on install button + +Configuration +============= + +To configure this module, you need to: + +* Set the flag "Automatic" on procurement rule + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/154/8.0 + +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 +`_. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Nicolas Piganeau +* Cédric Pigeon + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/stock_auto_move/__init__.py b/stock_auto_move/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/stock_auto_move/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_auto_move/__manifest__.py b/stock_auto_move/__manifest__.py new file mode 100644 index 000000000000..f1b52cce1c57 --- /dev/null +++ b/stock_auto_move/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2014 NDP Systèmes () +# Copyright 2020 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Automatic Move Processing", + "version": "13.0.1.0.0", + "author": "NDP Systèmes, ACSONE SA/NV, Odoo Community Association (OCA)", + "category": "Warehouse", + "development_status": "Production/Stable", + "website": "https://github.com/OCA/stock-logistics-workflow", + "depends": ["stock"], + "data": [ + "data/procurement_group.xml", + "views/stock_move.xml", + "views/stock_rule.xml", + ], + "demo": [ + "demo/stock_location.xml", + "demo/stock_location_route.xml", + "demo/stock_rule.xml", + ], + "installable": True, + "license": "AGPL-3", +} diff --git a/stock_auto_move/data/procurement_group.xml b/stock_auto_move/data/procurement_group.xml new file mode 100644 index 000000000000..d6d0abc8fd29 --- /dev/null +++ b/stock_auto_move/data/procurement_group.xml @@ -0,0 +1,9 @@ + + + + + Automatic + direct + + diff --git a/stock_auto_move/demo/stock_location.xml b/stock_auto_move/demo/stock_location.xml new file mode 100644 index 000000000000..d59720d1dc2c --- /dev/null +++ b/stock_auto_move/demo/stock_location.xml @@ -0,0 +1,23 @@ + + + + + Location 1 + + 1 + internal + + + Location 2 + + 1 + internal + + + Location 3 + + 1 + internal + + diff --git a/stock_auto_move/demo/stock_location_route.xml b/stock_auto_move/demo/stock_location_route.xml new file mode 100644 index 000000000000..8a8cd923ba41 --- /dev/null +++ b/stock_auto_move/demo/stock_location_route.xml @@ -0,0 +1,13 @@ + + + + + Test route + 1 + 20 + + 1 + + + diff --git a/stock_auto_move/demo/stock_rule.xml b/stock_auto_move/demo/stock_rule.xml new file mode 100644 index 000000000000..e7b9e58e16d6 --- /dev/null +++ b/stock_auto_move/demo/stock_rule.xml @@ -0,0 +1,27 @@ + + + + + 1 => 2 with auto_move + pull + + + + propagate + + + make_to_stock + + + + + Test push route 3=>1 + + + + transparent + + push + + diff --git a/stock_auto_move/i18n/ca.po b/stock_auto_move/i18n/ca.po new file mode 100644 index 000000000000..fb7e32ca6905 --- /dev/null +++ b/stock_auto_move/i18n/ca.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Carles Antoli , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-14 08:48+0000\n" +"PO-Revision-Date: 2017-01-14 08:48+0000\n" +"Last-Translator: Carles Antoli , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Moure l'estoc" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/de.po b/stock_auto_move/i18n/de.po new file mode 100644 index 000000000000..b4a8b2fcf80d --- /dev/null +++ b/stock_auto_move/i18n/de.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-18 01:44+0000\n" +"PO-Revision-Date: 2016-11-18 01:44+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Beschaffung" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "Beschaffungsregel" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Lagerbuchung" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/es.po b/stock_auto_move/i18n/es.po new file mode 100644 index 000000000000..07bea4626b8a --- /dev/null +++ b/stock_auto_move/i18n/es.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2017 +# enjolras , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-28 03:51+0000\n" +"PO-Revision-Date: 2018-02-28 03:51+0000\n" +"Last-Translator: enjolras , 2018\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "Ubicación 1" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "Ubicación 2" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "Ubicación 3" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Abastecimiento" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "Regla de abastecimiento" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de existencias" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Comprobar ruta" diff --git a/stock_auto_move/i18n/es_MX.po b/stock_auto_move/i18n/es_MX.po new file mode 100644 index 000000000000..b65afd8705ce --- /dev/null +++ b/stock_auto_move/i18n/es_MX.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Juan González , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-03 06:09+0000\n" +"PO-Revision-Date: 2016-12-03 06:09+0000\n" +"Last-Translator: Juan González , 2016\n" +"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/" +"es_MX/)\n" +"Language: es_MX\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Contratación" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimiento bursátil" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/fi.po b/stock_auto_move/i18n/fi.po new file mode 100644 index 000000000000..7e682bb3b68a --- /dev/null +++ b/stock_auto_move/i18n/fi.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Jarmo Kortetjärvi , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-09-13 22:01+0000\n" +"PO-Revision-Date: 2016-09-13 22:01+0000\n" +"Last-Translator: Jarmo Kortetjärvi , 2016\n" +"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Varastosiirto" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/fr.po b/stock_auto_move/i18n/fr.po new file mode 100644 index 000000000000..4d0a19d21cef --- /dev/null +++ b/stock_auto_move/i18n/fr.po @@ -0,0 +1,92 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2017 +# Lixon Jean-Yves , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-01 02:08+0000\n" +"PO-Revision-Date: 2017-06-01 02:08+0000\n" +"Last-Translator: Lixon Jean-Yves , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1 => 2 avec mouvement automatique" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "Mouvement automatique" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" +"Si cette option est sélectionnée, le mouvement généré sera traité " +"automatiquement dès que les articles seront disponible. Cela peut être utile " +"dans des situations avec des mouvements chainés où l'on ne souhaite pas " +"d'action de l'opérateur." + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" +"Si cette option est sélectionnée, le mouvement sera traité automatiquement " +"dès que les articles seront disponible" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "Emplacement 1" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "Emplacement 2" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "Emplacement 3" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Approvisionnement" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "Règle d'approvisionnement" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "Flux poussé" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Mouvement de stock" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Route d'essai" diff --git a/stock_auto_move/i18n/hr.po b/stock_auto_move/i18n/hr.po new file mode 100644 index 000000000000..a6eec55fecb3 --- /dev/null +++ b/stock_auto_move/i18n/hr.po @@ -0,0 +1,92 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2017 +# Bole , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-28 03:51+0000\n" +"PO-Revision-Date: 2018-02-28 03:51+0000\n" +"Last-Translator: Bole , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \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_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1 => 2 sa auto prenosom" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "Automatski prenos" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" +"Ako je ova opcija uključena, generirani prenos će automatski biti obrađen " +"čim proizvodi budu raspoloživi. Ovo je korisno u situacijama sa ulančanim " +"kretanjima gdje ne želimo interakciju operatera." + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" +"Ako je opcija uključena, kretanje će automatski biti obrađeno čim proizvodi " +"budu raspoloživi." + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "Lokacija 1" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "Lokacija 2" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "Lokacija 3" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Nabava" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "Pravilo nabave" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "Tijek guranja" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Skladišni prenos" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Test rute" diff --git a/stock_auto_move/i18n/it.po b/stock_auto_move/i18n/it.po new file mode 100644 index 000000000000..6f7a273e9951 --- /dev/null +++ b/stock_auto_move/i18n/it.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-01 02:08+0000\n" +"PO-Revision-Date: 2017-06-01 02:08+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimento di magazzino" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/nl_NL.po b/stock_auto_move/i18n/nl_NL.po new file mode 100644 index 000000000000..248d444663ef --- /dev/null +++ b/stock_auto_move/i18n/nl_NL.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-17 01:29+0000\n" +"PO-Revision-Date: 2017-06-17 01:29+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1=> 2 met auto_move" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "Automatische mutatie" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "Locatie 1" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "Locatie 2" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "Locatie 3" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Voorraadmutatie" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/pt.po b/stock_auto_move/i18n/pt.po new file mode 100644 index 000000000000..2f2cdd334c1a --- /dev/null +++ b/stock_auto_move/i18n/pt.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-07 07:49+0000\n" +"PO-Revision-Date: 2017-01-07 07:49+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimento Stock" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/pt_BR.po b/stock_auto_move/i18n/pt_BR.po new file mode 100644 index 000000000000..cb3573584c8d --- /dev/null +++ b/stock_auto_move/i18n/pt_BR.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-07 07:49+0000\n" +"PO-Revision-Date: 2017-01-07 07:49+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Aprovisionamento" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimentação de estoque" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/pt_PT.po b/stock_auto_move/i18n/pt_PT.po new file mode 100644 index 000000000000..b177935de5d9 --- /dev/null +++ b/stock_auto_move/i18n/pt_PT.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Pedro Castro Silva , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-07 07:49+0000\n" +"PO-Revision-Date: 2017-01-07 07:49+0000\n" +"Last-Translator: Pedro Castro Silva , 2017\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/" +"teams/23907/pt_PT/)\n" +"Language: pt_PT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Aquisições" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/sl.po b/stock_auto_move/i18n/sl.po new file mode 100644 index 000000000000..3e3374571dac --- /dev/null +++ b/stock_auto_move/i18n/sl.po @@ -0,0 +1,91 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-01 02:08+0000\n" +"PO-Revision-Date: 2017-06-01 02:08+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1 => 2 z auto_move" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "Samodejni premik" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" +"Ko je ta opcija izbrana, se ustvarjeni premiki samodejno obdelajo takoj, ko " +"so proizvodi na voljo. To je lahko koristno v situacijah z verižnimi " +"premiki, kjer ne želimo ukrepov operaterja." + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" +"Ko je ta opcija izbrana, se ustvarjeni premik samodejno obdela takoj, ko so " +"proizvodi na voljo." + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "Lokacija 1" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "Lokacija 2" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "Lokacija 3" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Oskrbovanje" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "Oskrbovalno pravilo" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Premik zaloge" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Testna proga" diff --git a/stock_auto_move/i18n/stock_auto_move.pot b/stock_auto_move/i18n/stock_auto_move.pot new file mode 100644 index 000000000000..b5f1a9b23387 --- /dev/null +++ b/stock_auto_move/i18n/stock_auto_move.pot @@ -0,0 +1,76 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \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_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "If this option is selected, the generated move will be automatically processed as soon as the products are available. This can be useful for situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "If this option is selected, the move will be automatically processed as soon as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + diff --git a/stock_auto_move/i18n/tr.po b/stock_auto_move/i18n/tr.po new file mode 100644 index 000000000000..afd9d064abef --- /dev/null +++ b/stock_auto_move/i18n/tr.po @@ -0,0 +1,85 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Ivan BARAYEV , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-07 07:49+0000\n" +"PO-Revision-Date: 2017-01-07 07:49+0000\n" +"Last-Translator: Ivan BARAYEV , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Stok Taşı" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/tr_TR.po b/stock_auto_move/i18n/tr_TR.po new file mode 100644 index 000000000000..95ed8bb904df --- /dev/null +++ b/stock_auto_move/i18n/tr_TR.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Ozge Altinisik , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-31 09:52+0000\n" +"PO-Revision-Date: 2016-12-31 09:52+0000\n" +"Last-Translator: Ozge Altinisik , 2017\n" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/" +"tr_TR/)\n" +"Language: tr_TR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "Satın alma" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Stok hareketi" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/i18n/zh_CN.po b/stock_auto_move/i18n/zh_CN.po new file mode 100644 index 000000000000..9467c098ce2e --- /dev/null +++ b/stock_auto_move/i18n/zh_CN.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-17 06:25+0000\n" +"PO-Revision-Date: 2016-12-17 06:25+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/" +"zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: stock_auto_move +#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_procurement_rule_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move_auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move +msgid "" +"If this option is selected, the generated move will be automatically " +"processed as soon as the products are available. This can be useful for " +"situations with chained moves where we do not want an operator action." +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_move_auto_move +msgid "" +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_a +msgid "Location 1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_b +msgid "Location 2" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location,name:stock_auto_move.stock_location_c +msgid "Location 3" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_order +msgid "Procurement" +msgstr "补货" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_procurement_rule +msgid "Procurement Rule" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_location_path +msgid "Pushed Flow" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_auto_move +#: model:stock.location.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" diff --git a/stock_auto_move/models/__init__.py b/stock_auto_move/models/__init__.py new file mode 100644 index 000000000000..144c5d760cf7 --- /dev/null +++ b/stock_auto_move/models/__init__.py @@ -0,0 +1,2 @@ +from . import stock_move +from . import stock_rule diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py new file mode 100644 index 000000000000..99216ad90fc1 --- /dev/null +++ b/stock_auto_move/models/stock_move.py @@ -0,0 +1,61 @@ +# Copyright 2014-2015 NDP Systèmes () +# Copyright 2020 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + auto_move = fields.Boolean( + "Automatic move", + help="If this option is selected, the move will be automatically " + "processed as soon as the products are available.", + ) + + def _auto_assign_quantities(self): + for move in self: + move.quantity_done = move.reserved_availability + + def _action_assign(self): + res = super(StockMove, self)._action_assign() + # Transfer all pickings which have an auto move assigned + moves = self.filtered( + lambda m: m.state in ("assigned", "partially_available") and m.auto_move + ) + moves._auto_assign_quantities() + # In case of no backorder on the first move and cancel propagation + # we need to propagate cancel_backorder to action_done + moves._action_done( + cancel_backorder=self.env.context.get("cancel_backorder", False) + ) + # We need to create backorder if there are mixed moves (auto and manual) + moves.mapped("picking_id")._create_backorder() + + return res + + @api.model + def _get_auto_moves_by_pickings(self, auto_moves): + """ Group moves by picking. + @param auto_moves: stock.move data set + @return dict dict of moves grouped by pickings + {stock.picking(id): stock.move(id1, id2, id3 ...), ...} + """ + auto_moves_by_pickings = dict() + for move in auto_moves: + if move.picking_id in auto_moves_by_pickings: + auto_moves_by_pickings[move.picking_id] |= move + else: + auto_moves_by_pickings.update({move.picking_id: move}) + return auto_moves_by_pickings + + def _change_procurement_group(self): + automatic_group = self.env.ref("stock_auto_move.automatic_group") + moves = self.filtered(lambda m: m.auto_move and not m.group_id) + moves.write({"group_id": automatic_group.id}) + + def _action_confirm(self, merge=True, merge_into=False): + self._change_procurement_group() + return super(StockMove, self)._action_confirm( + merge=merge, merge_into=merge_into + ) diff --git a/stock_auto_move/models/stock_rule.py b/stock_auto_move/models/stock_rule.py new file mode 100644 index 000000000000..3fc3a4d4c01e --- /dev/null +++ b/stock_auto_move/models/stock_rule.py @@ -0,0 +1,28 @@ +# Copyright 2014-2015 NDP Systèmes () +# Copyright 2020 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class StockRule(models.Model): + _inherit = "stock.rule" + + auto_move = fields.Boolean( + "Automatic move", + help="If this option is selected, the generated move will be " + "automatically processed as soon as the products are available. " + "This can be useful for situations with chained moves where we " + "do not want an operator action.", + ) + + def _push_prepare_move_copy_values(self, move_to_copy, new_date): + res = super()._push_prepare_move_copy_values( + move_to_copy=move_to_copy, new_date=new_date + ) + res.update({"auto_move": self.auto_move}) + return res + + def _get_stock_move_values(self, *procurement): + res = super()._get_stock_move_values(*procurement) + res.update({"auto_move": self.auto_move}) + return res diff --git a/stock_auto_move/readme/CONFIGURE.rst b/stock_auto_move/readme/CONFIGURE.rst new file mode 100644 index 000000000000..70fd00397159 --- /dev/null +++ b/stock_auto_move/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +To configure this module, you need to: + +* Set the flag "Automatic" on stock rule. diff --git a/stock_auto_move/readme/CONTRIBUTORS.rst b/stock_auto_move/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..b85157eccaa7 --- /dev/null +++ b/stock_auto_move/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Nicolas Piganeau +* Cédric Pigeon +* Denis Roussel diff --git a/stock_auto_move/readme/DESCRIPTION.rst b/stock_auto_move/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..a823d8c4fbc7 --- /dev/null +++ b/stock_auto_move/readme/DESCRIPTION.rst @@ -0,0 +1,14 @@ +This modules adds the possibility to have move automatically processed as soon +as the products are available in the move source location. + +It also adds the possibility to define the move as being automatic in +a procurement rule. + +Automatic moves are triggered by previous move when the move is chained +or by the scheduler otherwise. + +Note that automatic moves are given a procurement group name "Automatic", +whatever the user or the procurement rule selects. + +It's different than the standard 'Automatic No step added' option in stock +rules as it does not merge first and second chained move. diff --git a/stock_auto_move/readme/INSTALL.rst b/stock_auto_move/readme/INSTALL.rst new file mode 100644 index 000000000000..e90899f4a92f --- /dev/null +++ b/stock_auto_move/readme/INSTALL.rst @@ -0,0 +1,3 @@ +To install this module, you need to: + +* Click on install button diff --git a/stock_auto_move/readme/USAGE.rst b/stock_auto_move/readme/USAGE.rst new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/stock_auto_move/static/description/icon.png b/stock_auto_move/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/stock_auto_move/static/description/icon.png differ diff --git a/stock_auto_move/tests/__init__.py b/stock_auto_move/tests/__init__.py new file mode 100644 index 000000000000..f76290928ec4 --- /dev/null +++ b/stock_auto_move/tests/__init__.py @@ -0,0 +1 @@ +from . import test_stock_auto_move diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py new file mode 100644 index 000000000000..6dd2254d3096 --- /dev/null +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -0,0 +1,662 @@ +# Copyright 2014 NDP Systèmes () +# Copyright 2020 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests.common import SavepointCase + + +class TestStockAutoMove(SavepointCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + cls.product_a1232 = cls.env.ref("product.product_product_6") + cls.product_2 = cls.env.ref("product.product_product_9") + cls.location_shelf = cls.env.ref("stock.stock_location_components") + cls.location_1 = cls.env.ref("stock_auto_move.stock_location_a") + cls.location_2 = cls.env.ref("stock_auto_move.stock_location_b") + cls.location_3 = cls.env.ref("stock_auto_move.stock_location_c") + cls.product_uom_unit_id = cls.env.ref("uom.product_uom_unit").id + cls.uom_dozen = cls.env.ref("uom.product_uom_dozen") + cls.picking_type_id = cls.env.ref("stock.picking_type_internal").id + cls.auto_group = cls.env.ref("stock_auto_move.automatic_group") + cls.move_obj = cls.env["stock.move"] + cls.procurement_group_obj = cls.env["procurement.group"] + + def test_10_auto_move(self): + """Check automatic processing of move with auto_move set.""" + move = self.move_obj.create( + { + "name": "Test Auto", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 12, + "location_id": self.location_1.id, + "location_dest_id": self.location_2.id, + "picking_type_id": self.picking_type_id, + "auto_move": True, + } + ) + move2 = self.move_obj.create( + { + "name": "Test Manual", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 3, + "location_id": self.location_1.id, + "location_dest_id": self.location_2.id, + "picking_type_id": self.picking_type_id, + "auto_move": False, + } + ) + move._action_confirm() + self.assertTrue(move.picking_id) + self.assertEqual(move.group_id, self.auto_group) + move2._action_confirm() + self.assertTrue(move2.picking_id) + self.assertFalse(move2.group_id) + self.assertEqual(move.state, "confirmed") + self.assertEqual(move2.state, "confirmed") + move3 = self.move_obj.create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 25, + "location_id": self.location_shelf.id, + "location_dest_id": self.location_1.id, + "auto_move": False, + } + ) + move3._action_confirm() + move3._action_assign() + move3.quantity_done = move3.product_qty + move3._action_done() + move._action_assign() + move2._action_assign() + self.assertEqual(move3.state, "done") + self.assertEqual(move2.state, "assigned") + self.assertEqual(move.state, "done") + + def test_20_procurement_auto_move(self): + """Check that move generated with procurement rule + have auto_move set.""" + self.product_a1232.route_ids = [(4, self.ref("stock_auto_move.test_route"))] + moves_before = self.move_obj.search([]) + self.env["procurement.group"].run( + [ + self.env["procurement.group"].Procurement( + self.product_a1232, + 1, + self.env.ref("uom.product_uom_unit"), + self.location_2, + "Test Procurement with auto_move", + "Test Procurement with auto_move", + self.env.company, + { + "warehouse_id": self.env.ref("stock.warehouse0"), + "date_planned": "2015-02-02 00:00:00", + }, + ) + ] + ) + moves_after = self.move_obj.search([]) - moves_before + self.assertEqual( + moves_after.rule_id.id, self.ref("stock_auto_move.stock_rule_a_to_b"), + ) + + self.assertTrue(moves_after.auto_move) + self.assertEqual(moves_after.state, "confirmed") + self.assertEquals(moves_after.group_id, self.auto_group) + + def test_30_push_rule_auto(self): + """Checks that push rule with auto set leads to an auto_move.""" + self.product_a1232.route_ids = [(4, self.ref("stock_auto_move.test_route"))] + move3 = self.move_obj.create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 7, + "location_id": self.location_shelf.id, + "location_dest_id": self.location_3.id, + "auto_move": False, + } + ) + move3._action_confirm() + move3._action_assign() + move3._auto_assign_quantities() + move3._action_done() + quants_in_3 = self.env["stock.quant"].search( + [ + ("product_id", "=", self.product_a1232.id), + ("location_id", "=", self.location_3.id), + ] + ) + quants_in_1 = self.env["stock.quant"].search( + [ + ("product_id", "=", self.product_a1232.id), + ("location_id", "=", self.location_1.id), + ] + ) + self.assertEqual(len(quants_in_3), 0) + self.assertGreater(len(quants_in_1), 0) + + def test_40_chained_auto_move(self): + """ + Test case: + - product with tracking set to serial. + - warehouse reception steps set to two steps. + - the push rule on the reception route set to auto move. + - create movement using the reception picking type. + Expected Result: + The second step movement should be processed automatically + after processing the first movement. + """ + warehouse = self.env.ref("stock.warehouse0") + warehouse.reception_steps = "two_steps" + warehouse.reception_route_id.rule_ids.auto_move = True + warehouse.int_type_id.use_create_lots = False + warehouse.int_type_id.use_existing_lots = True + + picking = ( + self.env["stock.picking"] + .with_context(default_picking_type_id=warehouse.in_type_id.id) + .create( + { + "partner_id": self.env.ref("base.res_partner_1").id, + "picking_type_id": warehouse.in_type_id.id, + "group_id": self.auto_group.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + } + ) + ) + + move1 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + } + ) + picking.action_confirm() + self.assertTrue(picking.move_line_ids) + self.assertEqual(len(picking.move_line_ids), 1) + picking.move_line_ids.qty_done = 2 + picking.action_done() + self.assertTrue(move1.move_dest_ids) + + self.assertTrue(move1.move_dest_ids.auto_move) + self.assertEqual(move1.move_dest_ids.state, "done") + + def test_50_partial_chained_auto_move(self): + """ + Test case: + - product with tracking set to serial. + - warehouse reception steps set to two steps. + - the push rule on the reception route set to auto move. + - create picking using the reception picking type. + - do partial reception on first step + Expected Result: + The second step movement should be processed automatically + and a back order is created. + """ + warehouse = self.env.ref("stock.warehouse0") + warehouse.reception_steps = "two_steps" + warehouse.reception_route_id.rule_ids.auto_move = True + warehouse.int_type_id.use_create_lots = False + warehouse.int_type_id.use_existing_lots = True + + picking = ( + self.env["stock.picking"] + .with_context(default_picking_type_id=warehouse.in_type_id.id) + .create( + { + "partner_id": self.env.ref("base.res_partner_1").id, + "picking_type_id": warehouse.in_type_id.id, + "group_id": self.auto_group.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + } + ) + ) + + move1 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + } + ) + picking.action_confirm() + self.assertTrue(picking.move_line_ids) + self.assertEqual(len(picking.move_line_ids), 1) + picking.move_line_ids.qty_done = 1 + picking.move_line_ids.product_uom_qty = 1 + picking.action_done() + + # As move_dest_ids include backorders + self.assertEqual(len(move1.move_dest_ids), 2) + + self.assertTrue(move1.move_dest_ids.mapped("auto_move")) + move_done = move1.move_dest_ids.filtered( + lambda m: not m.picking_id.backorder_id + ) + self.assertEqual(move_done.state, "done") + + move_back = move1.move_dest_ids.filtered("picking_id.backorder_id") + self.assertEqual(move_back.state, "waiting") + + # look up for the back order created + back_order = self.env["stock.picking"].search( + [("backorder_id", "=", picking.id)] + ) + self.assertTrue(back_order) + self.assertEqual(len(back_order), 1) + + back_order.move_line_ids.qty_done = 1 + back_order.action_done() + + move2 = back_order.move_lines + self.assertEqual(len(move2.move_dest_ids), 2) + + self.assertEquals(move2.move_dest_ids.mapped("auto_move"), [True, True]) + self.assertEqual(move2.move_dest_ids.mapped("state"), ["done", "done"]) + + def test_60_partial_chained_auto_move(self): + """ + Test case: + - product with tracking set to serial. + - warehouse reception steps set to two steps. + - create picking with two move lines. + - set one of the move on the second step picking to be an auto + move. + - do partial reception on first step + Expected Result: + The second step movement should be processed automatically + and a back order is created with the product that is not set as an + auto move. + """ + warehouse = self.env.ref("stock.warehouse0") + warehouse.reception_steps = "two_steps" + warehouse.reception_route_id.rule_ids.auto_move = True + warehouse.int_type_id.use_create_lots = False + warehouse.int_type_id.use_existing_lots = True + + picking = ( + self.env["stock.picking"] + .with_context(default_picking_type_id=warehouse.in_type_id.id) + .create( + { + "partner_id": self.env.ref("base.res_partner_1").id, + "picking_type_id": warehouse.in_type_id.id, + "group_id": self.auto_group.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + } + ) + ) + + move1 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + } + ) + + move2 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_2.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + } + ) + + picking.action_confirm() + self.assertTrue(move1.move_dest_ids.auto_move) + self.assertTrue(move2.move_dest_ids.auto_move) + second_step_picking = move2.move_dest_ids.picking_id + move2.move_dest_ids.auto_move = False + + # do partial reception of the first picking + move1.move_line_ids.qty_done = 2 + move1.move_line_ids.product_uom_qty = 2 + + move2.move_line_ids.qty_done = 1 + move2.move_line_ids.product_uom_qty = 1 + + picking.action_done() + + second_step_back_order = self.env["stock.picking"].search( + [("backorder_id", "=", second_step_picking.id)] + ) + + self.assertEqual(second_step_picking.state, "done") + self.assertEqual(len(second_step_picking.move_lines), 1) + self.assertEqual(len(second_step_picking.move_line_ids), 1) + + self.assertEqual(len(second_step_back_order.move_lines), 1) + self.assertTrue( + second_step_back_order.move_lines.filtered( + lambda m: m.state == "partially_available" + ) + ) + + def test_70_procurement_auto_move_keep_group(self): + """Check that move generated with procurement rule + have auto_move set.""" + self.product_a1232.route_ids = [(4, self.ref("stock_auto_move.test_route"))] + moves_before = self.move_obj.search([]) + group_manual = self.env["procurement.group"].create({"name": "TEST MANUAL"}) + self.env["procurement.group"].run( + [ + self.env["procurement.group"].Procurement( + self.product_a1232, + 1, + self.env.ref("uom.product_uom_unit"), + self.location_2, + "Test Procurement with auto_move", + "Test Procurement with auto_move", + self.env.company, + { + "warehouse_id": self.env.ref("stock.warehouse0"), + "date_planned": "2015-02-02 00:00:00", + "group_id": group_manual, + }, + ) + ] + ) + moves_after = self.move_obj.search([]) - moves_before + self.assertEqual( + moves_after.rule_id.id, self.ref("stock_auto_move.stock_rule_a_to_b"), + ) + + self.assertTrue(moves_after.auto_move) + self.assertEqual(moves_after.state, "confirmed") + self.assertEquals(moves_after.group_id, group_manual) + + def test_80_chained_auto_move_uom(self): + """ + Test case: + - product with tracking set to serial. + - warehouse reception steps set to two steps. + - the push rule on the reception route set to auto move. + - create movement using the reception picking type. + - Use the unit dozen => 24.0 total quantity + Expected Result: + The second step movement should be processed automatically + after processing the first movement. + """ + warehouse = self.env.ref("stock.warehouse0") + warehouse.reception_steps = "two_steps" + warehouse.reception_route_id.rule_ids.auto_move = True + warehouse.int_type_id.use_create_lots = False + warehouse.int_type_id.use_existing_lots = True + + picking = ( + self.env["stock.picking"] + .with_context(default_picking_type_id=warehouse.in_type_id.id) + .create( + { + "partner_id": self.env.ref("base.res_partner_1").id, + "picking_type_id": warehouse.in_type_id.id, + "group_id": self.auto_group.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + } + ) + ) + + move1 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.uom_dozen.id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + } + ) + picking.action_confirm() + self.assertTrue(picking.move_line_ids) + self.assertEqual(len(picking.move_line_ids), 1) + picking.move_line_ids.qty_done = 2 + picking.action_done() + self.assertTrue(move1.move_dest_ids) + + self.assertTrue(move1.move_dest_ids.auto_move) + self.assertEqual(move1.move_dest_ids.state, "done") + self.assertEqual(move1.move_dest_ids.quantity_done, 2.0) + self.assertEqual(move1.move_dest_ids.product_qty, 24.0) + + def test_90_partial_chained_auto_move_no_backorder(self): + """ + Test case: + - product with tracking set to serial. + - warehouse reception steps set to two steps. + - create picking with two move lines. + - do partial reception on first step with no backorder + Expected Result: + The second step movement should be processed automatically + and the actual first quantity should be done + """ + warehouse = self.env.ref("stock.warehouse0") + warehouse.reception_steps = "two_steps" + warehouse.reception_route_id.rule_ids.auto_move = True + warehouse.int_type_id.use_create_lots = False + warehouse.int_type_id.use_existing_lots = True + + picking = ( + self.env["stock.picking"] + .with_context(default_picking_type_id=warehouse.in_type_id.id) + .create( + { + "partner_id": self.env.ref("base.res_partner_1").id, + "picking_type_id": warehouse.in_type_id.id, + "group_id": self.auto_group.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + } + ) + ) + + move1 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + "propagate_cancel": True, + } + ) + + move2 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_2.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 2, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + "propagate_cancel": True, + } + ) + + picking.action_confirm() + self.assertTrue(move1.move_dest_ids.auto_move) + self.assertTrue(move2.move_dest_ids.auto_move) + second_step_picking = move2.move_dest_ids.picking_id + + # do partial reception of the first picking + move1.move_line_ids.qty_done = 2 + move1.move_line_ids.product_uom_qty = 2 + + move2.move_line_ids.qty_done = 1 + move2.move_line_ids.product_uom_qty = 1 + + res = picking.button_validate() + self.assertDictContainsSubset( + {"res_model": "stock.backorder.confirmation"}, res, + ) + wizard = self.env["stock.backorder.confirmation"].browse(res["res_id"]) + wizard.process_cancel_backorder() + + second_step_back_order = self.env["stock.picking"].search( + [("backorder_id", "=", second_step_picking.id)] + ) + + self.assertFalse(second_step_back_order) + + self.assertEquals("done", move1.move_dest_ids.state) + self.assertEquals("done", move2.move_dest_ids.state) + self.assertEquals(2.0, move1.move_dest_ids.quantity_done) + self.assertEquals(1.0, move2.move_dest_ids.quantity_done) + + def test_100_partial_chained_auto_move_mixed_no_backorder(self): + """ + Test case: + We do a two steps picking flow mixing products with auto move + and no auto move. + The procurement group is the same to simulate a picking flow + for a purchase for instance. + We transfer the first picking with partial quantities for both + products and do not require backorder. + Expected Result: + The second step picking should be done for the auto move product + and a backorder should have been generated for not yet transfered + products. Indeed, a picking should not contain done movements with + not yet done ones (and not cancelled). + + PICKING 1 PICKING 2 + PRODUCT 1 (AUTO): 10 (5 done) => PRODUCT 1 (AUTO): 10 + (5 done, 5 cancelled) + ^ + | (backorder) + PICKING 3 + PRODUCT 2: 10 (5 done) => PRODUCT 2: 10 (5 partially ready) + """ + vals = {"name": "PROCUREMENT PURCHASE TEST"} + self.procurement = self.procurement_group_obj.create(vals) + warehouse = self.env.ref("stock.warehouse0") + warehouse.reception_steps = "two_steps" + warehouse.reception_route_id.rule_ids.action = "push" + warehouse.reception_route_id.rule_ids.auto_move = True + warehouse.int_type_id.use_create_lots = False + warehouse.int_type_id.use_existing_lots = True + + # Create a second route for non automatic products + route_manual = warehouse.reception_route_id.copy() + route_manual.rule_ids.auto_move = False + + # Set product_2 to manual + self.product_2.route_ids -= warehouse.reception_route_id + self.product_2.route_ids |= route_manual + + picking = ( + self.env["stock.picking"] + .with_context(default_picking_type_id=warehouse.in_type_id.id) + .create( + { + "partner_id": self.env.ref("base.res_partner_1").id, + "picking_type_id": warehouse.in_type_id.id, + "group_id": self.procurement.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + } + ) + ) + + move1 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 10, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + "propagate_cancel": True, + "group_id": self.procurement.id, + } + ) + + move2 = self.env["stock.move"].create( + { + "name": "Supply source location for test", + "product_id": self.product_2.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 10, + "picking_id": picking.id, + "location_id": self.env.ref("stock.stock_location_suppliers").id, + "location_dest_id": warehouse.wh_input_stock_loc_id.id, + "picking_type_id": warehouse.in_type_id.id, + "propagate_cancel": True, + "group_id": self.procurement.id, + } + ) + + picking.action_confirm() + self.assertTrue(move1.move_dest_ids.auto_move) + self.assertFalse(move2.move_dest_ids.auto_move) + second_step_picking = move2.move_dest_ids.picking_id + + # do partial reception of the first picking + move1.move_line_ids.qty_done = 5 + move1.move_line_ids.product_uom_qty = 5 + + move2.move_line_ids.qty_done = 5 + move2.move_line_ids.product_uom_qty = 5 + + res = picking.button_validate() + self.assertDictContainsSubset( + {"res_model": "stock.backorder.confirmation"}, res, + ) + wizard = self.env["stock.backorder.confirmation"].browse(res["res_id"]) + wizard.process_cancel_backorder() + + # We need to ensure that all moves are done or cancelled in the + # second picking + self.assertItemsEqual( + ["done", "cancel"], + list(set(second_step_picking.move_lines.mapped("state"))), + ) + + # The second step picking should have a backorder for the + # manual products + second_step_back_order = self.env["stock.picking"].search( + [("backorder_id", "=", second_step_picking.id)] + ) + + self.assertTrue(second_step_back_order) + # If https://github.com/odoo/odoo/pull/66124 is integrated, + # this should become assigned as remaining quantity should be cancelled + # and quantities should be 5.0 + self.assertEquals( + "partially_available", second_step_back_order.move_lines.state + ) + self.assertEquals(10.0, second_step_back_order.move_lines.product_uom_qty) diff --git a/stock_auto_move/views/stock_move.xml b/stock_auto_move/views/stock_move.xml new file mode 100644 index 000000000000..db1bdb076118 --- /dev/null +++ b/stock_auto_move/views/stock_move.xml @@ -0,0 +1,16 @@ + + + + + stock.move.form.view (in stock_auto_move) + stock.move + + + + + + + + + diff --git a/stock_auto_move/views/stock_rule.xml b/stock_auto_move/views/stock_rule.xml new file mode 100644 index 000000000000..a04dd5de85b1 --- /dev/null +++ b/stock_auto_move/views/stock_rule.xml @@ -0,0 +1,18 @@ + + + + + stock.rule.form.view (in stock_auto_move) + stock.rule + + + + + + + + + + +