diff --git a/stock_auto_move/README.rst b/stock_auto_move/README.rst new file mode 100644 index 000000000000..8774efe175a4 --- /dev/null +++ b/stock_auto_move/README.rst @@ -0,0 +1,112 @@ +========================= +Automatic Move Processing +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:93e8ddfa51bd90ea80d63e24819bbead6fd8d99268329d5805b8d6efb2b3c52f + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-workflow/tree/17.0/stock_auto_move + :alt: OCA/stock-logistics-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-17-0/stock-logistics-workflow-17-0-stock_auto_move + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-workflow&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +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. + +**Table of contents** + +.. contents:: + :local: + +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 stock rule. + +Usage +===== + + + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* NDP Systèmes +* ACSONE SA/NV + +Contributors +------------ + +- Nicolas Piganeau +- Cédric Pigeon +- Denis Roussel +- Souheil Bejaoui + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/stock-logistics-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. 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..7e7cab5763e5 --- /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": "17.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_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_route.xml b/stock_auto_move/demo/stock_route.xml new file mode 100644 index 000000000000..94fc6e6b0a77 --- /dev/null +++ b/stock_auto_move/demo/stock_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..2f7e19914df6 --- /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..0ec53157c32e --- /dev/null +++ b/stock_auto_move/i18n/ca.po @@ -0,0 +1,90 @@ +# 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: 2022-01-26 17:40+0000\n" +"Last-Translator: Jaume Planas \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" +"X-Generator: Weblate 4.3.2\n" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.stock_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1 => 2 amb auto_move" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Moviment automàtic" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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 seleccioneu aquesta opció, el moviment generat es processarà " +"automàticament tan bon punt estiguin disponibles els productes. Això pot ser " +"útil en situacions amb moviments encadenats on no es vulgui una acció de " +"l'operador." + +#. 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 seleccioneu aquesta opciño, el moviment es processarà automàticament tan " +"bon punt estiguin disponibles els productes." + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Moviment d'estoc" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Ruta de prova" + +#~ msgid "Location 1" +#~ msgstr "Ubicació 1" + +#~ msgid "Location 2" +#~ msgstr "Ubicació 2" + +#~ msgid "Location 3" +#~ msgstr "Ubicació 3" + +#~ msgid "Procurement" +#~ msgstr "Aprovisionament" + +#~ msgid "Procurement Rule" +#~ msgstr "Regla d'aprovisionament" + +#~ msgid "Pushed Flow" +#~ msgstr "Flux empès" diff --git a/stock_auto_move/i18n/de.po b/stock_auto_move/i18n/de.po new file mode 100644 index 000000000000..83cbf20891b1 --- /dev/null +++ b/stock_auto_move/i18n/de.po @@ -0,0 +1,71 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Lagerbuchung" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + +#~ msgid "Procurement" +#~ msgstr "Beschaffung" + +#~ msgid "Procurement Rule" +#~ msgstr "Beschaffungsregel" diff --git a/stock_auto_move/i18n/es.po b/stock_auto_move/i18n/es.po new file mode 100644 index 000000000000..3347e0ebd312 --- /dev/null +++ b/stock_auto_move/i18n/es.po @@ -0,0 +1,81 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimiento de existencias" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Comprobar ruta" + +#~ msgid "Location 1" +#~ msgstr "Ubicación 1" + +#~ msgid "Location 2" +#~ msgstr "Ubicación 2" + +#~ msgid "Location 3" +#~ msgstr "Ubicación 3" + +#~ msgid "Procurement" +#~ msgstr "Abastecimiento" + +#~ msgid "Procurement Rule" +#~ msgstr "Regla de abastecimiento" diff --git a/stock_auto_move/i18n/es_MX.po b/stock_auto_move/i18n/es_MX.po new file mode 100644 index 000000000000..f4ec1cb1342e --- /dev/null +++ b/stock_auto_move/i18n/es_MX.po @@ -0,0 +1,69 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimiento bursátil" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + +#~ msgid "Procurement" +#~ msgstr "Contratación" diff --git a/stock_auto_move/i18n/fi.po b/stock_auto_move/i18n/fi.po new file mode 100644 index 000000000000..b7524b627481 --- /dev/null +++ b/stock_auto_move/i18n/fi.po @@ -0,0 +1,65 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Varastosiirto" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.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..3abb5ecd7bd5 --- /dev/null +++ b/stock_auto_move/i18n/fr.po @@ -0,0 +1,90 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Mouvement automatique" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Mouvement de stock" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Route d'essai" + +#~ msgid "Location 1" +#~ msgstr "Emplacement 1" + +#~ msgid "Location 2" +#~ msgstr "Emplacement 2" + +#~ msgid "Location 3" +#~ msgstr "Emplacement 3" + +#~ msgid "Procurement" +#~ msgstr "Approvisionnement" + +#~ msgid "Procurement Rule" +#~ msgstr "Règle d'approvisionnement" + +#~ msgid "Pushed Flow" +#~ msgstr "Flux poussé" diff --git a/stock_auto_move/i18n/hr.po b/stock_auto_move/i18n/hr.po new file mode 100644 index 000000000000..34341c0d4017 --- /dev/null +++ b/stock_auto_move/i18n/hr.po @@ -0,0 +1,90 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Automatski prenos" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Skladišni prenos" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Test rute" + +#~ msgid "Location 1" +#~ msgstr "Lokacija 1" + +#~ msgid "Location 2" +#~ msgstr "Lokacija 2" + +#~ msgid "Location 3" +#~ msgstr "Lokacija 3" + +#~ msgid "Procurement" +#~ msgstr "Nabava" + +#~ msgid "Procurement Rule" +#~ msgstr "Pravilo nabave" + +#~ msgid "Pushed Flow" +#~ msgstr "Tijek guranja" diff --git a/stock_auto_move/i18n/it.po b/stock_auto_move/i18n/it.po new file mode 100644 index 000000000000..1bc44b4dd3cd --- /dev/null +++ b/stock_auto_move/i18n/it.po @@ -0,0 +1,81 @@ +# 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: 2023-12-26 14:33+0000\n" +"Last-Translator: mymage \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" +"X-Generator: Weblate 4.17\n" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.stock_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1 => 2 con auto_move" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Movimento automatico" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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 "" +"Se questa opzione è selezionata, il movimento generato verrà elaborato " +"automaticamente appena i prodotti sono disponibili. Questo è utile per " +"situazioni con movimenti concatenati dove non si vuole l'intervento di un " +"operatore." + +#. 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 "" +"Se questa opzione è selezionata, il movimento verrà elaborato " +"automaticamente appena i prodotti sono disponibili." + +#. 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:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "Regola di giacenza" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "Test forza percorso 3=>1" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Test percorso" + +#~ msgid "Display Name" +#~ msgstr "Nome visualizzato" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/stock_auto_move/i18n/nl_NL.po b/stock_auto_move/i18n/nl_NL.po new file mode 100644 index 000000000000..09cbe6c10e07 --- /dev/null +++ b/stock_auto_move/i18n/nl_NL.po @@ -0,0 +1,75 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Automatische mutatie" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Voorraadmutatie" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + +#~ msgid "Location 1" +#~ msgstr "Locatie 1" + +#~ msgid "Location 2" +#~ msgstr "Locatie 2" + +#~ msgid "Location 3" +#~ msgstr "Locatie 3" diff --git a/stock_auto_move/i18n/pt.po b/stock_auto_move/i18n/pt.po new file mode 100644 index 000000000000..5c1f77f24a8a --- /dev/null +++ b/stock_auto_move/i18n/pt.po @@ -0,0 +1,65 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Movimento Stock" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.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..21f681258aa3 --- /dev/null +++ b/stock_auto_move/i18n/pt_BR.po @@ -0,0 +1,77 @@ +# 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: 2024-05-29 14:35+0000\n" +"Last-Translator: Rodrigo Macedo \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" +"X-Generator: Weblate 4.17\n" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.stock_rule_a_to_b +msgid "1 => 2 with auto_move" +msgstr "1 => 2 com auto_move" + +#. module: stock_auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Movimentação automática" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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 "" +"Se esta opção for selecionada, a movimentação gerada será processada " +"automaticamente assim que os produtos estiverem disponíveis. Isto pode ser " +"útil para situações com movimentos encadeados onde não queremos uma ação do " +"operador." + +#. 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 "" +"Se esta opção for selecionada, a movimentação será processada " +"automaticamente assim que os produtos estiverem disponíveis." + +#. 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:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "Regra do estoque" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "Testar rota push 3=>1" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Rota de teste" + +#~ msgid "Procurement" +#~ msgstr "Aprovisionamento" diff --git a/stock_auto_move/i18n/pt_PT.po b/stock_auto_move/i18n/pt_PT.po new file mode 100644 index 000000000000..4ac29ff3d168 --- /dev/null +++ b/stock_auto_move/i18n/pt_PT.po @@ -0,0 +1,69 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + +#~ msgid "Procurement" +#~ msgstr "Aquisições" diff --git a/stock_auto_move/i18n/sl.po b/stock_auto_move/i18n/sl.po new file mode 100644 index 000000000000..71e9ee3e65bb --- /dev/null +++ b/stock_auto_move/i18n/sl.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 +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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "Samodejni premik" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Premik zaloge" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "Testna proga" + +#~ msgid "Location 1" +#~ msgstr "Lokacija 1" + +#~ msgid "Location 2" +#~ msgstr "Lokacija 2" + +#~ msgid "Location 3" +#~ msgstr "Lokacija 3" + +#~ msgid "Procurement" +#~ msgstr "Oskrbovanje" + +#~ msgid "Procurement Rule" +#~ msgstr "Oskrbovalno pravilo" 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..021464e49a94 --- /dev/null +++ b/stock_auto_move/i18n/stock_auto_move.pot @@ -0,0 +1,60 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.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..16bf7cebda30 --- /dev/null +++ b/stock_auto_move/i18n/tr.po @@ -0,0 +1,65 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Stok Taşı" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.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..fe8b4d063c73 --- /dev/null +++ b/stock_auto_move/i18n/tr_TR.po @@ -0,0 +1,69 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "Stok hareketi" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + +#~ msgid "Procurement" +#~ msgstr "Satın alma" diff --git a/stock_auto_move/i18n/zh_CN.po b/stock_auto_move/i18n/zh_CN.po new file mode 100644 index 000000000000..7f2dde6fcd7e --- /dev/null +++ b/stock_auto_move/i18n/zh_CN.po @@ -0,0 +1,69 @@ +# 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:stock.rule,name:stock_auto_move.stock_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_stock_move__auto_move +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__auto_move +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model.fields,help:stock_auto_move.field_stock_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:ir.model,name:stock_auto_move.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_auto_move +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" +msgstr "" + +#. module: stock_auto_move +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" +msgstr "" + +#. module: stock_auto_move +#: model:stock.route,name:stock_auto_move.test_route +msgid "Test route" +msgstr "" + +#~ msgid "Procurement" +#~ 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..6c1e4946b417 --- /dev/null +++ b/stock_auto_move/models/stock_move.py @@ -0,0 +1,44 @@ +# 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 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.picked = True + + def _action_assign(self, force_qty=False): + res = super()._action_assign(force_qty=force_qty) + # Transfer all pickings which have an auto move assigned + moves = self.filtered( + lambda m: m.state in ("assigned", "partially_available") and m.auto_move + ) + if moves: + 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 + + 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()._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/pyproject.toml b/stock_auto_move/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/stock_auto_move/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_auto_move/readme/CONFIGURE.md b/stock_auto_move/readme/CONFIGURE.md new file mode 100644 index 000000000000..60b7010e7d35 --- /dev/null +++ b/stock_auto_move/readme/CONFIGURE.md @@ -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.md b/stock_auto_move/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..ba709fae60f2 --- /dev/null +++ b/stock_auto_move/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Nicolas Piganeau \<\> +- Cédric Pigeon \<\> +- Denis Roussel \<\> +- Souheil Bejaoui \<\> diff --git a/stock_auto_move/readme/DESCRIPTION.md b/stock_auto_move/readme/DESCRIPTION.md new file mode 100644 index 000000000000..4f2197a47086 --- /dev/null +++ b/stock_auto_move/readme/DESCRIPTION.md @@ -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.md b/stock_auto_move/readme/INSTALL.md new file mode 100644 index 000000000000..41cf20e6ad63 --- /dev/null +++ b/stock_auto_move/readme/INSTALL.md @@ -0,0 +1,3 @@ +To install this module, you need to: + +- Click on install button diff --git a/stock_auto_move/readme/USAGE.md b/stock_auto_move/readme/USAGE.md new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/stock_auto_move/readme/USAGE.md @@ -0,0 +1 @@ + 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/static/description/index.html b/stock_auto_move/static/description/index.html new file mode 100644 index 000000000000..828b1139cfbd --- /dev/null +++ b/stock_auto_move/static/description/index.html @@ -0,0 +1,453 @@ + + + + + +Automatic Move Processing + + + +
+

Automatic Move Processing

+ + +

Production/Stable License: AGPL-3 OCA/stock-logistics-workflow Translate me on Weblate Try me on Runboat

+

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.

+

Table of contents

+ +
+

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 stock rule.
  • +
+
+
+

Usage

+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • NDP Systèmes
  • +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

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

+

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

+
+
+
+ + 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..1af316acac9b --- /dev/null +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -0,0 +1,674 @@ +# 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 TransactionCase + + +class TestStockAutoMove(TransactionCase): + @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() + self.env["stock.quant"]._update_available_quantity( + self.product_a1232, self.location_shelf, 25, 0 + ) + move3._action_assign() + move3.picked = True + 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.assertEqual(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"))] + self.env["stock.quant"].create( + { + "product_id": self.product_a1232.id, + "location_id": self.location_shelf.id, + "quantity": 10, + } + ) + 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.picked = True + 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.write({"picked": True, "quantity": 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.move_line_ids.picked = True + back_order._action_done() + + self.assertEqual(len(back_order.move_ids.move_dest_ids), 2) + + self.assertEqual( + back_order.move_ids.move_dest_ids.mapped("auto_move"), [True, True] + ) + self.assertEqual( + back_order.move_ids.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.write({"picked": True, "quantity": 2}) + + move2.move_line_ids.write({"picked": True, "quantity": 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_line_ids), 1) + self.assertEqual(len(second_step_picking.move_line_ids), 1) + + self.assertEqual(len(second_step_back_order.move_line_ids), 1) + self.assertTrue( + second_step_back_order.move_line_ids.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.assertEqual(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.picked = True + 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, 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.write({"picked": True, "quantity": 2}) + + move2.move_line_ids.write({"picked": True, "quantity": 1}) + + res = picking.button_validate() + self.assertEqual(res.get("res_model"), "stock.backorder.confirmation") + wizard = ( + self.env["stock.backorder.confirmation"] + .with_context(**res.get("context", {})) + .create({}) + ) + 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.assertEqual("done", move1.move_dest_ids.state) + self.assertEqual("done", move2.move_dest_ids.state) + self.assertEqual(2.0, move1.move_dest_ids.quantity) + self.assertEqual(1.0, move2.move_dest_ids.quantity) + + 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.write({"picked": True, "quantity": 5}) + + move2.move_line_ids.write({"picked": True, "quantity": 5}) + + res = picking.button_validate() + self.assertEqual(res.get("res_model"), "stock.backorder.confirmation") + wizard = ( + self.env["stock.backorder.confirmation"] + .with_context(**res.get("context", {})) + .create({}) + ) + wizard.process_cancel_backorder() + + # We need to ensure that all moves are done or cancelled in the + # second picking + self.assertTrue( + all( + move_line.state in ("done", "cancel") + for move_line in second_step_picking.move_line_ids + ), + ) + + # 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) + self.assertEqual( + "partially_available", second_step_back_order.move_line_ids.state + ) + self.assertEqual(5.0, second_step_back_order.move_line_ids.quantity) diff --git a/stock_auto_move/views/stock_move.xml b/stock_auto_move/views/stock_move.xml new file mode 100644 index 000000000000..83efdb4ebb71 --- /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 + + + + + + + + + + +