From 1b64e313a47d7829442a09832b335f6bcc68c2b9 Mon Sep 17 00:00:00 2001 From: Nicolas Piganeau Date: Fri, 20 Nov 2015 19:00:25 +0100 Subject: [PATCH 01/40] Added stock_auto_move module --- stock_auto_move/__init__.py | 20 +++ stock_auto_move/__openerp__.py | 54 +++++++ stock_auto_move/i18n/fr.po | 93 ++++++++++++ stock_auto_move/static/description/icon.png | Bin 0 -> 8355 bytes stock_auto_move/stock_auto_move.py | 78 ++++++++++ stock_auto_move/stock_auto_move_data.xml | 11 ++ stock_auto_move/stock_auto_move_demo.xml | 71 +++++++++ stock_auto_move/stock_auto_move_view.xml | 49 +++++++ stock_auto_move/tests/__init__.py | 20 +++ stock_auto_move/tests/test_stock_auto_move.py | 137 ++++++++++++++++++ 10 files changed, 533 insertions(+) create mode 100644 stock_auto_move/__init__.py create mode 100644 stock_auto_move/__openerp__.py create mode 100644 stock_auto_move/i18n/fr.po create mode 100644 stock_auto_move/static/description/icon.png create mode 100644 stock_auto_move/stock_auto_move.py create mode 100644 stock_auto_move/stock_auto_move_data.xml create mode 100644 stock_auto_move/stock_auto_move_demo.xml create mode 100644 stock_auto_move/stock_auto_move_view.xml create mode 100644 stock_auto_move/tests/__init__.py create mode 100644 stock_auto_move/tests/test_stock_auto_move.py diff --git a/stock_auto_move/__init__.py b/stock_auto_move/__init__.py new file mode 100644 index 000000000000..e509e5c12474 --- /dev/null +++ b/stock_auto_move/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 NDP Systèmes (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +import stock_auto_move diff --git a/stock_auto_move/__openerp__.py b/stock_auto_move/__openerp__.py new file mode 100644 index 000000000000..3073f74d5e2d --- /dev/null +++ b/stock_auto_move/__openerp__.py @@ -0,0 +1,54 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 NDP Systèmes (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +{ + 'name': 'Automatic Move Processing', + 'version': '0.1', + 'author': 'NDP Systèmes', + 'maintainer': 'NDP Systèmes', + 'category': 'Warehouse', + 'depends': ['stock'], + 'description': """ +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. +""", + 'website': 'http://www.ndp-systemes.fr', + 'data': [ + 'stock_auto_move_data.xml', + 'stock_auto_move_view.xml', + ], + 'demo': [ + 'stock_auto_move_demo.xml', + ], + 'test': [], + 'installable': True, + 'auto_install': False, + 'license': 'AGPL-3', + 'application': False, +} + diff --git a/stock_auto_move/i18n/fr.po b/stock_auto_move/i18n/fr.po new file mode 100644 index 000000000000..d663764e1eb5 --- /dev/null +++ b/stock_auto_move/i18n/fr.po @@ -0,0 +1,93 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-01-14 13:49+0000\n" +"PO-Revision-Date: 2015-01-14 14:52+0100\n" +"Last-Translator: Nicolas PIGANEAU \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"Language: fr\n" +"X-Generator: Poedit 1.7.3\n" + +#. module: base +#: model:ir.module.module,shortdesc:base.module_stock_auto_move +msgid "Automatic Move Processing" +msgstr "Mouvements automatiques" + +#. module: base +#: model:ir.module.module,description:base.module_stock_auto_move +msgid "" +"\n" +"Automatic Move Processing\n" +"=========================\n" +"This modules adds the possibility to have move automatically processed as soon as the products are available in the\n" +"move source location.\n" +"\n" +"It also adds the possibility to define the move as being automatic in a procurement rule.\n" +"\n" +"Automatic moves are triggered by previous move when the move is chained or by the scheduler otherwise.\n" +"\n" +"Note that automatic moves are given a procurement group name \"Automatic\", whatever the user or the procurement rule\n" +"selects.\n" +msgstr "" +"\n" +"Mouvements automatiques\n" +"=======================\n" +"Ce module ajoute la possibilité d'avoir des mouvements executés automatiquement dès que les articles sont \n" +"disponibles dans l'emplacement source du mouvement.\n" +"\n" +"Il ajoute également la possibilité de définir des mouvements automatiques dans les règles de réapprovisionnement.\n" +"\n" +"Les mouvements automatiques sont déclenchés par la réalisation du mouvement précédent si le mouvement est chainé \n" +"ou par le planificateur dans le cas contraire.\n" +"\n" +"Notez que les mouvements automatiques sont ajoutés au groupe d'approvisionnement \"Automatic\" quelque soit le \n" +"groupe que l'utilisateur ou la règle d'approvisionnement sélectionne.\n" + +#. module: stock_auto_move +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "Mouvement automatique" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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: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_move +msgid "Stock Move" +msgstr "Mouvement de stock" diff --git a/stock_auto_move/static/description/icon.png b/stock_auto_move/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..243a194d7a4004b554eac576da04e86b36be22a3 GIT binary patch literal 8355 zcmb_iRaYEL)7)JaXVKse!97Tj;O-DygS%VsEQ`An9D)RQg1aYZaCdjNATQ59_%6PS znm&Coebc9>y6Q~0ijp)0g$M-z06=7ABtE}I=zl;0y`2jBx0!DN==xb&3{W{na`2Xb zEkzYY0f3rV)F)&3w;b6?M#mKZK=1tzz(L1iGXQ{sS5`t)-P7>IAY4yPCne|ALXNV) zqN7TqFZurV!L627&llMJ`Gs;H<8x7G6D=ky`S8CZYJ3J*$|DTJoaFl$J)v`zseXuLIMNols_H&`%&r{wTRaEMU7sU$@iT)}esI>*R4uAW`V| z2ZPZM$pPW@*O3C7*!`R6duN-Pzt)ke?koNEp(ycAZn`Iy3Abq2xUdB3);B(C> z(M7`+yVxkX=bcLBqvMrFQG3)M3OYKyw|!G(rZH$uQtsdjI)2syn@vg093XF3pW>fN zT5lXS3i(w;dKnpk6)5;ytH(DY;_u?Q9B%0|xpnCPhRh7PMR)Wok#5;)IhI9S%#ekx zwCg>Qr9!kl)vj?vc>1@?m^R?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6Z^r3=6m5h>1EM_GjEC*x@b`D_@aaPj=WK0ADW@JUe# zp|m^zoBb@pfdkx&!~#rxtfR|J*#7EkhoXi!h@Sx9HO_^i8_Py<1DO-XTfRBN_lmUI z&^1vl`vhdCJt;r9bV*nLRKp#myTSngH@iqdAPOUp6f2T%Pzrzxl543rp524>Oi>9T zNrWPKY6f9b!oeE;GFoX>byG<}O1|6RpG)). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +from openerp import fields, models, api + +class stock_auto_move_move(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.") + + @api.multi + def action_assign(self): + super(stock_auto_move_move, self).action_assign() + # picking_env = self.env['stock.picking'] + # Transfer all pickings which have an auto move assigned + moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) + picking_ids = {m.picking_id.id for m in moves} + todo_pickings = self.env['stock.picking'].browse(picking_ids) + # We create packing operations to keep packing if any + todo_pickings.do_prepare_partial() + moves.action_done() + + + @api.multi + def action_confirm(self): + for move in self: + if move.auto_move and move.group_id != self.env.ref('stock_auto_move.automatic_group'): + move.group_id = self.env.ref('stock_auto_move.automatic_group') + return super(stock_auto_move_move, self).action_confirm() + + +class stock_auto_move_procurement_rule(models.Model): + _inherit = 'procurement.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.") + + +class stock_auto_move_procurement(models.Model): + _inherit = 'procurement.order' + + @api.model + def _run_move_create(self, procurement): + res = super(stock_auto_move_procurement, self)._run_move_create(procurement) + res.update({'auto_move': procurement.rule_id.auto_move}) + return res + + +class stock_auto_move_location_path(models.Model): + _inherit = 'stock.location.path' + + @api.model + def _prepare_push_apply(self, rule, move): + """Set auto move to the new move created by push rule.""" + res = super(stock_auto_move_location_path, self)._prepare_push_apply(rule, move) + res.update({ + 'auto_move': (rule.auto == 'auto'), + }) + return res diff --git a/stock_auto_move/stock_auto_move_data.xml b/stock_auto_move/stock_auto_move_data.xml new file mode 100644 index 000000000000..099ba2e5174a --- /dev/null +++ b/stock_auto_move/stock_auto_move_data.xml @@ -0,0 +1,11 @@ + + + + + + Automatic + direct + + + + \ No newline at end of file diff --git a/stock_auto_move/stock_auto_move_demo.xml b/stock_auto_move/stock_auto_move_demo.xml new file mode 100644 index 000000000000..e7a8836746a9 --- /dev/null +++ b/stock_auto_move/stock_auto_move_demo.xml @@ -0,0 +1,71 @@ + + + + + + 1 + 1 + + + + + + Location 1 + + 1 + internal + + + + Location 2 + + 1 + internal + + + + Location 3 + + 1 + internal + + + + Test route + 1 + 20 + + 1 + + + + + 1 => 2 with auto_move + 1 + move + + + + propagate + 1 + + make_to_stock + 0 + + + + + + Test push route 3=>1 + + + + auto + + + + + \ No newline at end of file diff --git a/stock_auto_move/stock_auto_move_view.xml b/stock_auto_move/stock_auto_move_view.xml new file mode 100644 index 000000000000..40be6a062d31 --- /dev/null +++ b/stock_auto_move/stock_auto_move_view.xml @@ -0,0 +1,49 @@ + + + + + + stock.auto.move.move.view + stock.move + + + + + + + + + + + + + stock.auto.move.move.form.picking.view + stock.move + + + + + + + + + + + + + stock.auto.move.procurement.rule.form.view + procurement.rule + + + + + + + + + + + + + + \ No newline at end of file diff --git a/stock_auto_move/tests/__init__.py b/stock_auto_move/tests/__init__.py new file mode 100644 index 000000000000..472e03352db7 --- /dev/null +++ b/stock_auto_move/tests/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 NDP Systèmes (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +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..365edd26874a --- /dev/null +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -0,0 +1,137 @@ +# -*- coding: utf8 -*- +# +# Copyright (C) 2014 NDP Systèmes (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +from openerp.tests import common + +class TestStockAutoMove(common.TransactionCase): + + def setUp(self): + super(TestStockAutoMove, self).setUp() + self.product_a1232 = self.browse_ref("product.product_product_6") + self.location_shelf = self.browse_ref("stock.stock_location_components") + self.location_1 = self.browse_ref("stock_auto_move.stock_location_a") + self.location_2 = self.browse_ref("stock_auto_move.stock_location_b") + self.location_3 = self.browse_ref("stock_auto_move.stock_location_c") + self.product_uom_unit_id = self.ref("product.product_uom_unit") + self.picking_type_id = self.ref("stock.picking_type_internal") + self.auto_group_id = self.ref("stock_auto_move.automatic_group") + + def test_10_auto_move(self): + """Check automatic processing of move with auto_move set.""" + move = self.env["stock.move"].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, + }) + move1 = self.env["stock.move"].create({ + 'name': "Test Auto 2", + 'product_id': self.product_a1232.id, + 'product_uom': self.product_uom_unit_id, + 'product_uom_qty': 9, + '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.env["stock.move"].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.id, self.auto_group_id) + move1.action_confirm() + self.assertTrue(move1.picking_id) + self.assertEqual(move1.group_id.id, self.auto_group_id) + move2.action_confirm() + self.assertTrue(move2.picking_id) + self.assertFalse(move2.group_id) + self.assertEqual(move.state, 'confirmed') + self.assertEqual(move1.state, 'confirmed') + self.assertEqual(move2.state, 'confirmed') + move3 = 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': 25, + 'location_id': self.location_shelf.id, + 'location_dest_id': self.location_1.id, + 'auto_move': False, + }) + move3.action_confirm() + move3.action_done() + move.action_assign() + move1.action_assign() + move2.action_assign() + self.assertEqual(move3.state, 'done') + self.assertEqual(move2.state, 'assigned') + self.assertEqual(move.state, 'done') + self.assertEqual(move1.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"))] + proc = self.env["procurement.order"].create({ + 'name': 'Test Procurement with auto_move', + 'date_planned': '2015-02-02 00:00:00', + 'product_id': self.product_a1232.id, + 'product_qty': 1, + 'product_uom': self.product_uom_unit_id, + 'warehouse_id': self.ref('stock.warehouse0'), + 'location_id': self.location_2.id, + }) + proc.check() + proc.run() + self.assertEqual(proc.rule_id.id, self.ref("stock_auto_move.procurement_rule_a_to_b")) + + for move in proc.move_ids: + self.assertEqual(move.auto_move, True) + self.assertEqual(move.state, 'confirmed') + + 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.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': 7, + 'location_id': self.location_shelf.id, + 'location_dest_id': self.location_3.id, + 'auto_move': False, + }) + move3.action_confirm() + 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) From abdbb53f8bfaf34bdc8ce5d502e9fab224c5a29b Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Mon, 23 Nov 2015 12:35:12 +0100 Subject: [PATCH 02/40] stock_auto_move : OCA compliant --- stock_auto_move/README.rst | 80 ++++++++++++++++++ stock_auto_move/__init__.py | 19 +---- stock_auto_move/__openerp__.py | 28 ++---- .../{ => data}/stock_auto_move_data.xml | 0 .../{ => demo}/stock_auto_move_demo.xml | 0 stock_auto_move/i18n/fr.po | 3 +- stock_auto_move/models/__init__.py | 3 + .../{ => models}/stock_auto_move.py | 31 ++++--- stock_auto_move/static/description/icon.png | Bin 8355 -> 0 bytes stock_auto_move/tests/test_stock_auto_move.py | 27 ++++-- .../{ => views}/stock_auto_move_view.xml | 0 11 files changed, 129 insertions(+), 62 deletions(-) create mode 100644 stock_auto_move/README.rst rename stock_auto_move/{ => data}/stock_auto_move_data.xml (100%) rename stock_auto_move/{ => demo}/stock_auto_move_demo.xml (100%) create mode 100644 stock_auto_move/models/__init__.py rename stock_auto_move/{ => models}/stock_auto_move.py (71%) delete mode 100644 stock_auto_move/static/description/icon.png rename stock_auto_move/{ => views}/stock_auto_move_view.xml (100%) diff --git a/stock_auto_move/README.rst b/stock_auto_move/README.rst new file mode 100644 index 000000000000..104956a3171a --- /dev/null +++ b/stock_auto_move/README.rst @@ -0,0 +1,80 @@ +.. 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 + +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 index e509e5c12474..3924b40df8ce 100644 --- a/stock_auto_move/__init__.py +++ b/stock_auto_move/__init__.py @@ -1,20 +1,3 @@ # -*- coding: utf8 -*- -# -# Copyright (C) 2014 NDP Systèmes (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -import stock_auto_move +from . import models diff --git a/stock_auto_move/__openerp__.py b/stock_auto_move/__openerp__.py index 3073f74d5e2d..f3f1905e47a1 100644 --- a/stock_auto_move/__openerp__.py +++ b/stock_auto_move/__openerp__.py @@ -19,36 +19,20 @@ { 'name': 'Automatic Move Processing', - 'version': '0.1', - 'author': 'NDP Systèmes', - 'maintainer': 'NDP Systèmes', + 'version': '8.0.1.0.0', + 'author': 'NDP Systèmes, Odoo Community Association (OCA)', 'category': 'Warehouse', - 'depends': ['stock'], - 'description': """ -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. -""", 'website': 'http://www.ndp-systemes.fr', + 'depends': ['stock'], 'data': [ - 'stock_auto_move_data.xml', - 'stock_auto_move_view.xml', + 'data/stock_auto_move_data.xml', + 'views/stock_auto_move_view.xml', ], 'demo': [ - 'stock_auto_move_demo.xml', + 'demo/stock_auto_move_demo.xml', ], - 'test': [], 'installable': True, 'auto_install': False, 'license': 'AGPL-3', 'application': False, } - diff --git a/stock_auto_move/stock_auto_move_data.xml b/stock_auto_move/data/stock_auto_move_data.xml similarity index 100% rename from stock_auto_move/stock_auto_move_data.xml rename to stock_auto_move/data/stock_auto_move_data.xml diff --git a/stock_auto_move/stock_auto_move_demo.xml b/stock_auto_move/demo/stock_auto_move_demo.xml similarity index 100% rename from stock_auto_move/stock_auto_move_demo.xml rename to stock_auto_move/demo/stock_auto_move_demo.xml diff --git a/stock_auto_move/i18n/fr.po b/stock_auto_move/i18n/fr.po index d663764e1eb5..085aa421bfe6 100644 --- a/stock_auto_move/i18n/fr.po +++ b/stock_auto_move/i18n/fr.po @@ -53,7 +53,8 @@ msgstr "" "groupe que l'utilisateur ou la règle d'approvisionnement sélectionne.\n" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: field:procurement.rule,auto_move:0 +#: field:stock.move,auto_move:0 msgid "Automatic move" msgstr "Mouvement automatique" diff --git a/stock_auto_move/models/__init__.py b/stock_auto_move/models/__init__.py new file mode 100644 index 000000000000..74d733aeca37 --- /dev/null +++ b/stock_auto_move/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf8 -*- + +from . import stock_auto_move diff --git a/stock_auto_move/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py similarity index 71% rename from stock_auto_move/stock_auto_move.py rename to stock_auto_move/models/stock_auto_move.py index 33d84b5642b7..eb28a9daa972 100644 --- a/stock_auto_move/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -17,13 +17,16 @@ # along with this program. If not, see . # -from openerp import fields, models, api +from openerp import api, fields, models + class stock_auto_move_move(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.") + 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.") @api.multi def action_assign(self): @@ -37,22 +40,24 @@ def action_assign(self): todo_pickings.do_prepare_partial() moves.action_done() - @api.multi def action_confirm(self): + automatic_group = self.env.ref('stock_auto_move.automatic_group') for move in self: - if move.auto_move and move.group_id != self.env.ref('stock_auto_move.automatic_group'): - move.group_id = self.env.ref('stock_auto_move.automatic_group') + if move.auto_move and move.group_id != automatic_group: + move.group_id = automatic_group return super(stock_auto_move_move, self).action_confirm() class stock_auto_move_procurement_rule(models.Model): _inherit = 'procurement.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.") + 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.") class stock_auto_move_procurement(models.Model): @@ -60,7 +65,8 @@ class stock_auto_move_procurement(models.Model): @api.model def _run_move_create(self, procurement): - res = super(stock_auto_move_procurement, self)._run_move_create(procurement) + res = super(stock_auto_move_procurement, self)._run_move_create( + procurement) res.update({'auto_move': procurement.rule_id.auto_move}) return res @@ -71,7 +77,8 @@ class stock_auto_move_location_path(models.Model): @api.model def _prepare_push_apply(self, rule, move): """Set auto move to the new move created by push rule.""" - res = super(stock_auto_move_location_path, self)._prepare_push_apply(rule, move) + res = super(stock_auto_move_location_path, self)._prepare_push_apply( + rule, move) res.update({ 'auto_move': (rule.auto == 'auto'), }) diff --git a/stock_auto_move/static/description/icon.png b/stock_auto_move/static/description/icon.png deleted file mode 100644 index 243a194d7a4004b554eac576da04e86b36be22a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8355 zcmb_iRaYEL)7)JaXVKse!97Tj;O-DygS%VsEQ`An9D)RQg1aYZaCdjNATQ59_%6PS znm&Coebc9>y6Q~0ijp)0g$M-z06=7ABtE}I=zl;0y`2jBx0!DN==xb&3{W{na`2Xb zEkzYY0f3rV)F)&3w;b6?M#mKZK=1tzz(L1iGXQ{sS5`t)-P7>IAY4yPCne|ALXNV) zqN7TqFZurV!L627&llMJ`Gs;H<8x7G6D=ky`S8CZYJ3J*$|DTJoaFl$J)v`zseXuLIMNols_H&`%&r{wTRaEMU7sU$@iT)}esI>*R4uAW`V| z2ZPZM$pPW@*O3C7*!`R6duN-Pzt)ke?koNEp(ycAZn`Iy3Abq2xUdB3);B(C> z(M7`+yVxkX=bcLBqvMrFQG3)M3OYKyw|!G(rZH$uQtsdjI)2syn@vg093XF3pW>fN z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=p>S4z$ zEY6|`w;^SWN+wd^!)B(;-K#iOY6=<5$qB25rxnQncK_&J`ZHCeCi-5)5ub39&j}jD zKreea-@^}yofuu*D=5lE5!6Z^r3=6m5h>1EM_GjEC*x@b`D_@aaPj=WK0ADW@JUe# zp|m^zoBb@pfdkx&!~#rxtfR|J*#7EkhoXi!h@Sx9HO_^i8_Py<1DO-XTfRBN_lmUI z&^1vl`vhdCJt;r9bV*nLRKp#myTSngH@iqdAPOUp6f2T%Pzrzxl543rp524>Oi>9T zNrWPKY6f9b!oeE;GFoX>byG<}O1|6RpG)). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# +# -*- coding: utf-8 -*- -import test_stock_auto_move +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 index 1597082eee8a..38c466a97940 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -1,4 +1,4 @@ -# -*- coding: utf8 -*- +# -*- coding: utf-8 -*- # # Copyright (C) 2014 NDP Systèmes (). # From 15ba43eae58e6510718c9d523a5b7beb9ecbf577 Mon Sep 17 00:00:00 2001 From: Nicolas Piganeau Date: Fri, 27 Nov 2015 15:20:07 +0100 Subject: [PATCH 04/40] Refactorings --- stock_auto_move/__init__.py | 1 - stock_auto_move/models/__init__.py | 1 - stock_auto_move/models/stock_auto_move.py | 18 +----------------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/stock_auto_move/__init__.py b/stock_auto_move/__init__.py index cde864bae21a..a0fdc10fe11b 100644 --- a/stock_auto_move/__init__.py +++ b/stock_auto_move/__init__.py @@ -1,3 +1,2 @@ # -*- coding: utf-8 -*- - from . import models diff --git a/stock_auto_move/models/__init__.py b/stock_auto_move/models/__init__.py index 0219ebe8b10f..fa3c2bedc2b7 100644 --- a/stock_auto_move/models/__init__.py +++ b/stock_auto_move/models/__init__.py @@ -1,3 +1,2 @@ # -*- coding: utf-8 -*- - from . import stock_auto_move diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index f725a1f02b82..0b1b61dd5b3a 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -1,21 +1,5 @@ # -*- coding: utf-8 -*- -# -# Copyright (C) 2014 NDP Systèmes (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# +# © 2014-2015 NDP Systèmes () from openerp import api, fields, models From 700bbc387f7567d3b35fb06ae6e05be289833417 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Fri, 4 Dec 2015 15:04:47 +0100 Subject: [PATCH 05/40] stock_auto_move: externalize change group to be able to overload it --- stock_auto_move/models/stock_auto_move.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index 0b1b61dd5b3a..e9a6328d346b 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -25,11 +25,15 @@ def action_assign(self): moves.action_done() @api.multi - def action_confirm(self): + def _change_procurement_group(self): automatic_group = self.env.ref('stock_auto_move.automatic_group') for move in self: if move.auto_move and move.group_id != automatic_group: move.group_id = automatic_group + + @api.multi + def action_confirm(self): + self._change_procurement_group() return super(StockMove, self).action_confirm() From e0e11ed485f962f2a702a6505f6a1184ea80f1d6 Mon Sep 17 00:00:00 2001 From: Nicolas Piganeau Date: Wed, 9 Dec 2015 09:10:54 +0100 Subject: [PATCH 06/40] Use new api mapped instead of ids list comprehension --- stock_auto_move/models/stock_auto_move.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index e9a6328d346b..41403b5c7580 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -18,8 +18,7 @@ def action_assign(self): # picking_env = self.env['stock.picking'] # Transfer all pickings which have an auto move assigned moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) - picking_ids = {m.picking_id.id for m in moves} - todo_pickings = self.env['stock.picking'].browse(picking_ids) + todo_pickings = moves.mapped('picking_id') # We create packing operations to keep packing if any todo_pickings.do_prepare_partial() moves.action_done() From 57fc2715de421f0804dbd2e3c81f4f4f9fd15971 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 3 Jul 2016 17:37:58 -0400 Subject: [PATCH 07/40] OCA Transbot updated translations from Transifex --- stock_auto_move/i18n/ca.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/de.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/es.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/es_MX.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/fi.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/fr.po | 95 +++++++++++++++++------------------ stock_auto_move/i18n/hr.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/it.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/pt.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/pt_BR.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/pt_PT.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/sl.po | 89 ++++++++++++++++++++++++++++++++ stock_auto_move/i18n/tr.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/tr_TR.po | 84 +++++++++++++++++++++++++++++++ stock_auto_move/i18n/zh_CN.po | 84 +++++++++++++++++++++++++++++++ 15 files changed, 1227 insertions(+), 49 deletions(-) create mode 100644 stock_auto_move/i18n/ca.po create mode 100644 stock_auto_move/i18n/de.po create mode 100644 stock_auto_move/i18n/es.po create mode 100644 stock_auto_move/i18n/es_MX.po create mode 100644 stock_auto_move/i18n/fi.po create mode 100644 stock_auto_move/i18n/hr.po create mode 100644 stock_auto_move/i18n/it.po create mode 100644 stock_auto_move/i18n/pt.po create mode 100644 stock_auto_move/i18n/pt_BR.po create mode 100644 stock_auto_move/i18n/pt_PT.po create mode 100644 stock_auto_move/i18n/sl.po create mode 100644 stock_auto_move/i18n/tr.po create mode 100644 stock_auto_move/i18n/tr_TR.po create mode 100644 stock_auto_move/i18n/zh_CN.po diff --git a/stock_auto_move/i18n/ca.po b/stock_auto_move/i18n/ca.po new file mode 100644 index 000000000000..40fdcf735be9 --- /dev/null +++ b/stock_auto_move/i18n/ca.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ca\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..56acae92a21c --- /dev/null +++ b/stock_auto_move/i18n/de.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..99cb2542f595 --- /dev/null +++ b/stock_auto_move/i18n/es.po @@ -0,0 +1,84 @@ +# 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: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 "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 Flows" +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 "" diff --git a/stock_auto_move/i18n/es_MX.po b/stock_auto_move/i18n/es_MX.po new file mode 100644 index 000000000000..975c8f1275e5 --- /dev/null +++ b/stock_auto_move/i18n/es_MX.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_MX\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..84c0727b745b --- /dev/null +++ b/stock_auto_move/i18n/fi.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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 index 085aa421bfe6..89e971bd3d01 100644 --- a/stock_auto_move/i18n/fr.po +++ b/stock_auto_move/i18n/fr.po @@ -1,72 +1,54 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * stock_auto_move -# +# * stock_auto_move +# +# Translators: +# OCA Transbot , 2016 +# Hosni Hadj Taher , 2017 msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-01-14 13:49+0000\n" -"PO-Revision-Date: 2015-01-14 14:52+0100\n" -"Last-Translator: Nicolas PIGANEAU \n" -"Language-Team: \n" +"POT-Creation-Date: 2017-02-18 08:44+0000\n" +"PO-Revision-Date: 2017-02-18 08:44+0000\n" +"Last-Translator: Hosni Hadj Taher , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" +"Content-Transfer-Encoding: \n" "Language: fr\n" -"X-Generator: Poedit 1.7.3\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: base -#: model:ir.module.module,shortdesc:base.module_stock_auto_move -msgid "Automatic Move Processing" -msgstr "Mouvements automatiques" - -#. module: base -#: model:ir.module.module,description:base.module_stock_auto_move -msgid "" -"\n" -"Automatic Move Processing\n" -"=========================\n" -"This modules adds the possibility to have move automatically processed as soon as the products are available in the\n" -"move source location.\n" -"\n" -"It also adds the possibility to define the move as being automatic in a procurement rule.\n" -"\n" -"Automatic moves are triggered by previous move when the move is chained or by the scheduler otherwise.\n" -"\n" -"Note that automatic moves are given a procurement group name \"Automatic\", whatever the user or the procurement rule\n" -"selects.\n" -msgstr "" -"\n" -"Mouvements automatiques\n" -"=======================\n" -"Ce module ajoute la possibilité d'avoir des mouvements executés automatiquement dès que les articles sont \n" -"disponibles dans l'emplacement source du mouvement.\n" -"\n" -"Il ajoute également la possibilité de définir des mouvements automatiques dans les règles de réapprovisionnement.\n" -"\n" -"Les mouvements automatiques sont déclenchés par la réalisation du mouvement précédent si le mouvement est chainé \n" -"ou par le planificateur dans le cas contraire.\n" -"\n" -"Notez que les mouvements automatiques sont ajoutés au groupe d'approvisionnement \"Automatic\" quelque soit le \n" -"groupe que l'utilisateur ou la règle d'approvisionnement sélectionne.\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 -#: field:procurement.rule,auto_move:0 -#: field:stock.move,auto_move:0 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 msgid "Automatic move" msgstr "Mouvement automatique" #. module: stock_auto_move #: help:procurement.rule,auto_move:0 -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." +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 #: help:stock.move,auto_move:0 -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" +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 @@ -78,6 +60,11 @@ msgstr "Emplacement 1" 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" @@ -88,7 +75,17 @@ msgstr "Approvisionnement" 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 Flows" +msgstr "Flux Poussés" + #. 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..d095dd9d1902 --- /dev/null +++ b/stock_auto_move/i18n/hr.po @@ -0,0 +1,84 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Bole , 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: Bole , 2016\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: stock_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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 "Nabava" + +#. 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 Flows" +msgstr "" + +#. 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 "" diff --git a/stock_auto_move/i18n/it.po b/stock_auto_move/i18n/it.po new file mode 100644 index 000000000000..07701cc1af4d --- /dev/null +++ b/stock_auto_move/i18n/it.po @@ -0,0 +1,84 @@ +# 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: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +msgstr "Pushed Flows" + +#. 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/pt.po b/stock_auto_move/i18n/pt.po new file mode 100644 index 000000000000..54c4d3d127ab --- /dev/null +++ b/stock_auto_move/i18n/pt.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..128e553a8624 --- /dev/null +++ b/stock_auto_move/i18n/pt_BR.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..480be3805612 --- /dev/null +++ b/stock_auto_move/i18n/pt_PT.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..63a06fce8c77 --- /dev/null +++ b/stock_auto_move/i18n/sl.po @@ -0,0 +1,89 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_auto_move +# +# Translators: +# Matjaž Mozetič , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-29 10:12+0000\n" +"PO-Revision-Date: 2016-06-29 10:12+0000\n" +"Last-Translator: Matjaž Mozetič , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "Samodejni premik" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +msgstr "Potisni tokovi" + +#. 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/tr.po b/stock_auto_move/i18n/tr.po new file mode 100644 index 000000000000..0802f65528cd --- /dev/null +++ b/stock_auto_move/i18n/tr.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..0720a63d95f9 --- /dev/null +++ b/stock_auto_move/i18n/tr_TR.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr_TR\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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..68ca09a7d1c2 --- /dev/null +++ b/stock_auto_move/i18n/zh_CN.po @@ -0,0 +1,84 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_CN\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 +#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +msgid "Automatic move" +msgstr "" + +#. module: stock_auto_move +#: help:procurement.rule,auto_move:0 +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 +#: help:stock.move,auto_move:0 +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 Flows" +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 "" From f4b3aa9dbd5f1d26aef884c452d6df39467e18cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pigeon?= Date: Mon, 15 May 2017 17:03:34 +0200 Subject: [PATCH 08/40] [10.0] port stock_auto_move to 10.0 --- stock_auto_move/README.rst | 4 +- stock_auto_move/__manifest__.py | 23 ++++ stock_auto_move/__openerp__.py | 38 ------ stock_auto_move/data/stock_auto_move_data.xml | 15 +-- stock_auto_move/demo/stock_auto_move_demo.xml | 126 ++++++++---------- stock_auto_move/models/stock_auto_move.py | 28 ++-- stock_auto_move/tests/test_stock_auto_move.py | 21 +-- .../views/stock_auto_move_view.xml | 87 ++++++------ 8 files changed, 144 insertions(+), 198 deletions(-) create mode 100644 stock_auto_move/__manifest__.py delete mode 100644 stock_auto_move/__openerp__.py diff --git a/stock_auto_move/README.rst b/stock_auto_move/README.rst index 104956a3171a..25beef58cf27 100644 --- a/stock_auto_move/README.rst +++ b/stock_auto_move/README.rst @@ -49,7 +49,8 @@ help us smashing it by providing a detailed and welcomed `feedback `_. +10.0%0A%0A**Steps%20to%20reproduce**%0A-%20.. +.%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. Credits ======= @@ -63,6 +64,7 @@ Contributors ------------ * Nicolas Piganeau +* Cédric Pigeon Maintainer ---------- diff --git a/stock_auto_move/__manifest__.py b/stock_auto_move/__manifest__.py new file mode 100644 index 000000000000..fbad88765f4d --- /dev/null +++ b/stock_auto_move/__manifest__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Copyright 2014 NDP Systèmes () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Automatic Move Processing', + 'version': '10.0.1.0.0', + 'author': 'NDP Systèmes, Odoo Community Association (OCA)', + 'category': 'Warehouse', + 'website': 'http://www.ndp-systemes.fr', + 'depends': ['stock'], + 'data': [ + 'data/stock_auto_move_data.xml', + 'views/stock_auto_move_view.xml', + ], + 'demo': [ + 'demo/stock_auto_move_demo.xml', + ], + 'installable': True, + 'auto_install': False, + 'license': 'AGPL-3', + 'application': False, +} diff --git a/stock_auto_move/__openerp__.py b/stock_auto_move/__openerp__.py deleted file mode 100644 index bf89dc2f3bb0..000000000000 --- a/stock_auto_move/__openerp__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2014 NDP Systèmes (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# - -{ - 'name': 'Automatic Move Processing', - 'version': '8.0.1.0.0', - 'author': 'NDP Systèmes, Odoo Community Association (OCA)', - 'category': 'Warehouse', - 'website': 'http://www.ndp-systemes.fr', - 'depends': ['stock'], - 'data': [ - 'data/stock_auto_move_data.xml', - 'views/stock_auto_move_view.xml', - ], - 'demo': [ - 'demo/stock_auto_move_demo.xml', - ], - 'installable': True, - 'auto_install': False, - 'license': 'AGPL-3', - 'application': False, -} diff --git a/stock_auto_move/data/stock_auto_move_data.xml b/stock_auto_move/data/stock_auto_move_data.xml index 099ba2e5174a..c3fc6c315713 100644 --- a/stock_auto_move/data/stock_auto_move_data.xml +++ b/stock_auto_move/data/stock_auto_move_data.xml @@ -1,11 +1,8 @@ - - + + + Automatic + direct + + - - Automatic - direct - - - - \ No newline at end of file diff --git a/stock_auto_move/demo/stock_auto_move_demo.xml b/stock_auto_move/demo/stock_auto_move_demo.xml index e7a8836746a9..38d6e94a3136 100644 --- a/stock_auto_move/demo/stock_auto_move_demo.xml +++ b/stock_auto_move/demo/stock_auto_move_demo.xml @@ -1,71 +1,59 @@ - - + + + + Location 1 + + 1 + internal + + + + Location 2 + + 1 + internal + + + + Location 3 + + 1 + internal + + + + Test route + 1 + 20 + + 1 + + + + + 1 => 2 with auto_move + 1 + move + + + + propagate + 1 + + make_to_stock + 0 + + + + + + Test push route 3=>1 + + + + transparent + + + - - 1 - 1 - - - - - - Location 1 - - 1 - internal - - - - Location 2 - - 1 - internal - - - - Location 3 - - 1 - internal - - - - Test route - 1 - 20 - - 1 - - - - - 1 => 2 with auto_move - 1 - move - - - - propagate - 1 - - make_to_stock - 0 - - - - - - Test push route 3=>1 - - - - auto - - - - - \ No newline at end of file diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index 41403b5c7580..28666d88c198 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # © 2014-2015 NDP Systèmes () -from openerp import api, fields, models +from odoo import api, fields, models class StockMove(models.Model): @@ -15,7 +15,6 @@ class StockMove(models.Model): @api.multi def action_assign(self): super(StockMove, self).action_assign() - # picking_env = self.env['stock.picking'] # Transfer all pickings which have an auto move assigned moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) todo_pickings = moves.mapped('picking_id') @@ -26,9 +25,9 @@ def action_assign(self): @api.multi def _change_procurement_group(self): automatic_group = self.env.ref('stock_auto_move.automatic_group') - for move in self: - if move.auto_move and move.group_id != automatic_group: - move.group_id = automatic_group + moves = self.filtered( + lambda m: m.auto_move and m.group_id != automatic_group) + moves.write({'group_id': automatic_group.id}) @api.multi def action_confirm(self): @@ -50,11 +49,10 @@ class ProcurementRule(models.Model): class ProcurementOrder(models.Model): _inherit = 'procurement.order' - @api.model - def _run_move_create(self, procurement): - res = super(ProcurementOrder, self)._run_move_create( - procurement) - res.update({'auto_move': procurement.rule_id.auto_move}) + def _get_stock_move_values(self): + res = super(ProcurementOrder, self)._get_stock_move_values() + if self.rule_id: + res.update({'auto_move': self.rule_id.auto_move}) return res @@ -62,11 +60,7 @@ class StockLocationPath(models.Model): _inherit = 'stock.location.path' @api.model - def _prepare_push_apply(self, rule, move): + def _apply(self, move): """Set auto move to the new move created by push rule.""" - res = super(StockLocationPath, self)._prepare_push_apply( - rule, move) - res.update({ - 'auto_move': (rule.auto == 'auto'), - }) - return res + move.auto_move = self.auto == 'transparent' + return super(StockLocationPath, self)._apply(move) diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index 38c466a97940..a6ad8112633e 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -1,23 +1,8 @@ # -*- coding: utf-8 -*- -# -# Copyright (C) 2014 NDP Systèmes (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# +# Copyright 2014 NDP Systèmes () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp.tests import common +from odoo.tests import common class TestStockAutoMove(common.TransactionCase): diff --git a/stock_auto_move/views/stock_auto_move_view.xml b/stock_auto_move/views/stock_auto_move_view.xml index 40be6a062d31..140aaf8b8974 100644 --- a/stock_auto_move/views/stock_auto_move_view.xml +++ b/stock_auto_move/views/stock_auto_move_view.xml @@ -1,49 +1,44 @@ - - + + + stock.auto.move.move.view + stock.move + + + + + + + + + + - - stock.auto.move.move.view - stock.move - - - - - - - - - - + + stock.auto.move.move.form.picking.view + stock.move + + + + + + + + + + - - stock.auto.move.move.form.picking.view - stock.move - - - - - - - - - - - - - stock.auto.move.procurement.rule.form.view - procurement.rule - - - - - - - - - - - - - - \ No newline at end of file + + stock.auto.move.procurement.rule.form.view + procurement.rule + + + + + + + + + + + From 2b012017584d8b3469235de92ef447953abbc98a Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 3 Jun 2017 11:53:33 +0200 Subject: [PATCH 09/40] OCA Transbot updated translations from Transifex --- stock_auto_move/i18n/fr.po | 23 ++++++++++++----------- stock_auto_move/i18n/it.po | 21 +++++++++++---------- stock_auto_move/i18n/sl.po | 21 +++++++++++---------- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/stock_auto_move/i18n/fr.po b/stock_auto_move/i18n/fr.po index 89e971bd3d01..fc0fb29b6f66 100644 --- a/stock_auto_move/i18n/fr.po +++ b/stock_auto_move/i18n/fr.po @@ -3,15 +3,15 @@ # * stock_auto_move # # Translators: -# OCA Transbot , 2016 -# Hosni Hadj Taher , 2017 +# OCA Transbot , 2017 +# Lixon Jean-Yves , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-18 08:44+0000\n" -"PO-Revision-Date: 2017-02-18 08:44+0000\n" -"Last-Translator: Hosni Hadj Taher , 2017\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "1 => 2 avec mouvement automatique" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -42,7 +43,7 @@ msgstr "" "d'action de l'opérateur." #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." @@ -77,8 +78,8 @@ msgstr "Règle d'approvisionnement" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" -msgstr "Flux Poussés" +msgid "Pushed Flow" +msgstr "Flux poussé" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_move diff --git a/stock_auto_move/i18n/it.po b/stock_auto_move/i18n/it.po index 07701cc1af4d..57a96e7a7bc7 100644 --- a/stock_auto_move/i18n/it.po +++ b/stock_auto_move/i18n/it.po @@ -3,14 +3,14 @@ # * stock_auto_move # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.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" +"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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,7 +38,7 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." @@ -70,8 +71,8 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" -msgstr "Pushed Flows" +msgid "Pushed Flow" +msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_move diff --git a/stock_auto_move/i18n/sl.po b/stock_auto_move/i18n/sl.po index 63a06fce8c77..90501417361e 100644 --- a/stock_auto_move/i18n/sl.po +++ b/stock_auto_move/i18n/sl.po @@ -3,14 +3,14 @@ # * stock_auto_move # # Translators: -# Matjaž Mozetič , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-06-29 10:12+0000\n" -"PO-Revision-Date: 2016-06-29 10:12+0000\n" -"Last-Translator: Matjaž Mozetič , 2016\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "1 => 2 z auto_move" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -40,7 +41,7 @@ msgstr "" "premiki, kjer ne želimo ukrepov operaterja." #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." @@ -75,8 +76,8 @@ msgstr "Oskrbovalno pravilo" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" -msgstr "Potisni tokovi" +msgid "Pushed Flow" +msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_move From 34b1c01c98fb5668dc3acb9c5dabb6c43a09667c Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 24 Jun 2017 11:50:45 +0200 Subject: [PATCH 10/40] OCA Transbot updated translations from Transifex --- stock_auto_move/i18n/nl_NL.po | 85 +++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 stock_auto_move/i18n/nl_NL.po diff --git a/stock_auto_move/i18n/nl_NL.po b/stock_auto_move/i18n/nl_NL.po new file mode 100644 index 000000000000..43f724072d82 --- /dev/null +++ b/stock_auto_move/i18n/nl_NL.po @@ -0,0 +1,85 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: stock_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 "" From 85aa5d37f3365d1eb13c3fdd38ae65863546af09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pigeon?= Date: Mon, 15 May 2017 17:03:34 +0200 Subject: [PATCH 11/40] [FIX] stock_auto_move: action_assign on stock_move should have an optional argument no_prepare --- stock_auto_move/models/stock_auto_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index 28666d88c198..acbc1b5aae8a 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -13,8 +13,8 @@ class StockMove(models.Model): "processed as soon as the products are available.") @api.multi - def action_assign(self): - super(StockMove, self).action_assign() + def action_assign(self, no_prepare=False): + super(StockMove, self).action_assign(no_prepare=no_prepare) # Transfer all pickings which have an auto move assigned moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) todo_pickings = moves.mapped('picking_id') From 6cd53237faeab0aadfe4f8993d4ae48625280d6e Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 3 Mar 2018 16:34:18 +0100 Subject: [PATCH 12/40] OCA Transbot updated translations from Transifex --- stock_auto_move/i18n/es.po | 28 ++++++++++++++------------ stock_auto_move/i18n/hr.po | 41 ++++++++++++++++++++++---------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/stock_auto_move/i18n/es.po b/stock_auto_move/i18n/es.po index 99cb2542f595..1ef15e331e57 100644 --- a/stock_auto_move/i18n/es.po +++ b/stock_auto_move/i18n/es.po @@ -3,14 +3,15 @@ # * stock_auto_move # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 +# enjolras , 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.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" +"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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -24,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,7 +39,7 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." @@ -46,17 +48,17 @@ msgstr "" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_a msgid "Location 1" -msgstr "" +msgstr "Ubicación 1" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_b msgid "Location 2" -msgstr "" +msgstr "Ubicación 2" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_c msgid "Location 3" -msgstr "" +msgstr "Ubicación 3" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_procurement_order @@ -70,7 +72,7 @@ msgstr "Regla de abastecimiento" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move @@ -81,4 +83,4 @@ msgstr "Movimiento de existencias" #. module: stock_auto_move #: model:stock.location.route,name:stock_auto_move.test_route msgid "Test route" -msgstr "" +msgstr "Comprobar ruta" diff --git a/stock_auto_move/i18n/hr.po b/stock_auto_move/i18n/hr.po index d095dd9d1902..5d9d22e43cbe 100644 --- a/stock_auto_move/i18n/hr.po +++ b/stock_auto_move/i18n/hr.po @@ -3,14 +3,15 @@ # * stock_auto_move # # Translators: -# Bole , 2016 +# OCA Transbot , 2017 +# Bole , 2018 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 10.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: Bole , 2016\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,42 +22,48 @@ msgstr "" #. module: stock_auto_move #: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b msgid "1 => 2 with auto_move" -msgstr "" +msgstr "1 => 2 sa auto prenosom" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 "" +msgstr "Automatski prenos" #. module: stock_auto_move -#: help:procurement.rule,auto_move:0 +#: 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 -#: help:stock.move,auto_move:0 +#: 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 "" +msgstr "Lokacija 1" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_b msgid "Location 2" -msgstr "" +msgstr "Lokacija 2" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_c msgid "Location 3" -msgstr "" +msgstr "Lokacija 3" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_procurement_order @@ -66,12 +73,12 @@ msgstr "Nabava" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_procurement_rule msgid "Procurement Rule" -msgstr "" +msgstr "Pravilo nabave" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" -msgstr "" +msgid "Pushed Flow" +msgstr "Tijek guranja" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_move @@ -81,4 +88,4 @@ msgstr "Skladišni prenos" #. module: stock_auto_move #: model:stock.location.route,name:stock_auto_move.test_route msgid "Test route" -msgstr "" +msgstr "Test rute" From 935fb541dbace6c21ac67e9215d76bfee19c395b Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sat, 23 Jun 2018 23:19:58 +0000 Subject: [PATCH 13/40] [UPD] Update stock_auto_move.pot --- stock_auto_move/i18n/ca.po | 17 +++--- stock_auto_move/i18n/de.po | 17 +++--- stock_auto_move/i18n/es.po | 8 +-- stock_auto_move/i18n/es_MX.po | 20 ++++--- stock_auto_move/i18n/fi.po | 17 +++--- stock_auto_move/i18n/fr.po | 12 ++-- stock_auto_move/i18n/hr.po | 11 ++-- stock_auto_move/i18n/it.po | 8 +-- stock_auto_move/i18n/nl_NL.po | 11 ++-- stock_auto_move/i18n/pt.po | 17 +++--- stock_auto_move/i18n/pt_BR.po | 20 ++++--- stock_auto_move/i18n/pt_PT.po | 20 ++++--- stock_auto_move/i18n/sl.po | 11 ++-- stock_auto_move/i18n/stock_auto_move.pot | 76 ++++++++++++++++++++++++ stock_auto_move/i18n/tr.po | 17 +++--- stock_auto_move/i18n/tr_TR.po | 20 ++++--- stock_auto_move/i18n/zh_CN.po | 20 ++++--- 17 files changed, 208 insertions(+), 114 deletions(-) create mode 100644 stock_auto_move/i18n/stock_auto_move.pot diff --git a/stock_auto_move/i18n/ca.po b/stock_auto_move/i18n/ca.po index 40fdcf735be9..fb7e32ca6905 100644 --- a/stock_auto_move/i18n/ca.po +++ b/stock_auto_move/i18n/ca.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Carles Antoli , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +38,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +71,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/de.po b/stock_auto_move/i18n/de.po index 56acae92a21c..b4a8b2fcf80d 100644 --- a/stock_auto_move/i18n/de.po +++ b/stock_auto_move/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +38,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +71,7 @@ msgstr "Beschaffungsregel" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/es.po b/stock_auto_move/i18n/es.po index 1ef15e331e57..07bea4626b8a 100644 --- a/stock_auto_move/i18n/es.po +++ b/stock_auto_move/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2017 # enjolras , 2018 @@ -13,10 +13,10 @@ msgstr "" "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" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -41,8 +41,8 @@ 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/es_MX.po b/stock_auto_move/i18n/es_MX.po index 975c8f1275e5..b65afd8705ce 100644 --- a/stock_auto_move/i18n/es_MX.po +++ b/stock_auto_move/i18n/es_MX.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Juan González , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: es_MX\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -24,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +39,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +72,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/fi.po b/stock_auto_move/i18n/fi.po index 84c0727b745b..7e682bb3b68a 100644 --- a/stock_auto_move/i18n/fi.po +++ b/stock_auto_move/i18n/fi.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Jarmo Kortetjärvi , 2016 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +38,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +71,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/fr.po b/stock_auto_move/i18n/fr.po index fc0fb29b6f66..4d0a19d21cef 100644 --- a/stock_auto_move/i18n/fr.po +++ b/stock_auto_move/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2017 # Lixon Jean-Yves , 2017 @@ -13,10 +13,10 @@ msgstr "" "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" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: stock_auto_move @@ -38,15 +38,15 @@ msgid "" "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 " +"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." +"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" diff --git a/stock_auto_move/i18n/hr.po b/stock_auto_move/i18n/hr.po index 5d9d22e43cbe..a6eec55fecb3 100644 --- a/stock_auto_move/i18n/hr.po +++ b/stock_auto_move/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2017 # Bole , 2018 @@ -13,11 +13,12 @@ msgstr "" "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" -"Language: hr\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"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 @@ -44,8 +45,8 @@ 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." +"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." diff --git a/stock_auto_move/i18n/it.po b/stock_auto_move/i18n/it.po index 57a96e7a7bc7..6f7a273e9951 100644 --- a/stock_auto_move/i18n/it.po +++ b/stock_auto_move/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -40,8 +40,8 @@ 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/nl_NL.po b/stock_auto_move/i18n/nl_NL.po index 43f724072d82..248d444663ef 100644 --- a/stock_auto_move/i18n/nl_NL.po +++ b/stock_auto_move/i18n/nl_NL.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Peter Hageman , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: nl_NL\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -40,8 +41,8 @@ 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/pt.po b/stock_auto_move/i18n/pt.po index 54c4d3d127ab..2f2cdd334c1a 100644 --- a/stock_auto_move/i18n/pt.po +++ b/stock_auto_move/i18n/pt.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: pt\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +38,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +71,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/pt_BR.po b/stock_auto_move/i18n/pt_BR.po index 128e553a8624..cb3573584c8d 100644 --- a/stock_auto_move/i18n/pt_BR.po +++ b/stock_auto_move/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: stock_auto_move @@ -24,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +39,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +72,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/pt_PT.po b/stock_auto_move/i18n/pt_PT.po index 480be3805612..b177935de5d9 100644 --- a/stock_auto_move/i18n/pt_PT.po +++ b/stock_auto_move/i18n/pt_PT.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Pedro Castro Silva , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: pt_PT\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: stock_auto_move @@ -24,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +39,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +72,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/sl.po b/stock_auto_move/i18n/sl.po index 90501417361e..3e3374571dac 100644 --- a/stock_auto_move/i18n/sl.po +++ b/stock_auto_move/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "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" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\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 @@ -43,8 +44,8 @@ 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." +"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." 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 index 0802f65528cd..afd9d064abef 100644 --- a/stock_auto_move/i18n/tr.po +++ b/stock_auto_move/i18n/tr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Ivan BARAYEV , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: tr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: stock_auto_move @@ -24,12 +24,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +38,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +71,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/tr_TR.po b/stock_auto_move/i18n/tr_TR.po index 0720a63d95f9..95ed8bb904df 100644 --- a/stock_auto_move/i18n/tr_TR.po +++ b/stock_auto_move/i18n/tr_TR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # Ozge Altinisik , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: tr_TR\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: stock_auto_move @@ -24,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +39,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +72,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move diff --git a/stock_auto_move/i18n/zh_CN.po b/stock_auto_move/i18n/zh_CN.po index 68ca09a7d1c2..9467c098ce2e 100644 --- a/stock_auto_move/i18n/zh_CN.po +++ b/stock_auto_move/i18n/zh_CN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * stock_auto_move -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: stock_auto_move @@ -24,12 +25,13 @@ msgid "1 => 2 with auto_move" msgstr "" #. module: stock_auto_move -#: field:procurement.rule,auto_move:0 field:stock.move,auto_move:0 +#: 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 -#: help:procurement.rule,auto_move:0 +#: 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 " @@ -37,10 +39,10 @@ msgid "" msgstr "" #. module: stock_auto_move -#: help:stock.move,auto_move:0 +#: 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." +"If this option is selected, the move will be automatically processed as soon " +"as the products are available." msgstr "" #. module: stock_auto_move @@ -70,7 +72,7 @@ msgstr "" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path -msgid "Pushed Flows" +msgid "Pushed Flow" msgstr "" #. module: stock_auto_move From 1422da5da6d08118f30fcad23de687859832c537 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 3 Apr 2019 03:26:22 +0000 Subject: [PATCH 14/40] [ADD] icon.png --- stock_auto_move/static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 stock_auto_move/static/description/icon.png diff --git a/stock_auto_move/static/description/icon.png b/stock_auto_move/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNE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ym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From 010f001f64d6f388b410d5bc18d33bb8f4e50e9f Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 13 Nov 2020 12:55:36 +0100 Subject: [PATCH 15/40] [IMP] stock_auto_move: black, isort, prettier --- stock_auto_move/__init__.py | 1 - stock_auto_move/__manifest__.py | 30 ++- stock_auto_move/data/stock_auto_move_data.xml | 3 +- stock_auto_move/demo/stock_auto_move_demo.xml | 38 ++-- stock_auto_move/models/__init__.py | 1 - stock_auto_move/models/stock_auto_move.py | 28 +-- stock_auto_move/tests/__init__.py | 2 - stock_auto_move/tests/test_stock_auto_move.py | 175 ++++++++++-------- .../views/stock_auto_move_view.xml | 38 ++-- 9 files changed, 155 insertions(+), 161 deletions(-) diff --git a/stock_auto_move/__init__.py b/stock_auto_move/__init__.py index a0fdc10fe11b..0650744f6bc6 100644 --- a/stock_auto_move/__init__.py +++ b/stock_auto_move/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/stock_auto_move/__manifest__.py b/stock_auto_move/__manifest__.py index fbad88765f4d..ffe1923f77a7 100644 --- a/stock_auto_move/__manifest__.py +++ b/stock_auto_move/__manifest__.py @@ -1,23 +1,17 @@ -# -*- coding: utf-8 -*- # Copyright 2014 NDP Systèmes () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - 'name': 'Automatic Move Processing', - 'version': '10.0.1.0.0', - 'author': 'NDP Systèmes, Odoo Community Association (OCA)', - 'category': 'Warehouse', - 'website': 'http://www.ndp-systemes.fr', - 'depends': ['stock'], - 'data': [ - 'data/stock_auto_move_data.xml', - 'views/stock_auto_move_view.xml', - ], - 'demo': [ - 'demo/stock_auto_move_demo.xml', - ], - 'installable': True, - 'auto_install': False, - 'license': 'AGPL-3', - 'application': False, + "name": "Automatic Move Processing", + "version": "10.0.1.0.0", + "author": "NDP Systèmes, Odoo Community Association (OCA)", + "category": "Warehouse", + "website": "http://www.ndp-systemes.fr", + "depends": ["stock"], + "data": ["data/stock_auto_move_data.xml", "views/stock_auto_move_view.xml",], + "demo": ["demo/stock_auto_move_demo.xml",], + "installable": True, + "auto_install": False, + "license": "AGPL-3", + "application": False, } diff --git a/stock_auto_move/data/stock_auto_move_data.xml b/stock_auto_move/data/stock_auto_move_data.xml index c3fc6c315713..35bc2fadb4ba 100644 --- a/stock_auto_move/data/stock_auto_move_data.xml +++ b/stock_auto_move/data/stock_auto_move_data.xml @@ -1,8 +1,7 @@ - + Automatic direct - diff --git a/stock_auto_move/demo/stock_auto_move_demo.xml b/stock_auto_move/demo/stock_auto_move_demo.xml index 38d6e94a3136..3b8adb043051 100644 --- a/stock_auto_move/demo/stock_auto_move_demo.xml +++ b/stock_auto_move/demo/stock_auto_move_demo.xml @@ -1,59 +1,53 @@ - + Location 1 - + 1 internal - Location 2 - + 1 internal - Location 3 - + 1 internal - Test route 1 20 - + 1 - + - 1 => 2 with auto_move 1 move - - - + + + propagate 1 - + make_to_stock 0 - - + + - Test push route 3=>1 - - - + + + transparent - + - diff --git a/stock_auto_move/models/__init__.py b/stock_auto_move/models/__init__.py index fa3c2bedc2b7..f6cb7ea8178d 100644 --- a/stock_auto_move/models/__init__.py +++ b/stock_auto_move/models/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import stock_auto_move diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index acbc1b5aae8a..fda943f9fba1 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2014-2015 NDP Systèmes () from odoo import api, fields, models @@ -10,24 +9,24 @@ class StockMove(models.Model): 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.") + "processed as soon as the products are available.", + ) @api.multi def action_assign(self, no_prepare=False): super(StockMove, self).action_assign(no_prepare=no_prepare) # Transfer all pickings which have an auto move assigned - moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) - todo_pickings = moves.mapped('picking_id') + moves = self.filtered(lambda m: m.state == "assigned" and m.auto_move) + todo_pickings = moves.mapped("picking_id") # We create packing operations to keep packing if any todo_pickings.do_prepare_partial() moves.action_done() @api.multi def _change_procurement_group(self): - automatic_group = self.env.ref('stock_auto_move.automatic_group') - moves = self.filtered( - lambda m: m.auto_move and m.group_id != automatic_group) - moves.write({'group_id': automatic_group.id}) + automatic_group = self.env.ref("stock_auto_move.automatic_group") + moves = self.filtered(lambda m: m.auto_move and m.group_id != automatic_group) + moves.write({"group_id": automatic_group.id}) @api.multi def action_confirm(self): @@ -36,31 +35,32 @@ def action_confirm(self): class ProcurementRule(models.Model): - _inherit = 'procurement.rule' + _inherit = "procurement.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.") + "do not want an operator action.", + ) class ProcurementOrder(models.Model): - _inherit = 'procurement.order' + _inherit = "procurement.order" def _get_stock_move_values(self): res = super(ProcurementOrder, self)._get_stock_move_values() if self.rule_id: - res.update({'auto_move': self.rule_id.auto_move}) + res.update({"auto_move": self.rule_id.auto_move}) return res class StockLocationPath(models.Model): - _inherit = 'stock.location.path' + _inherit = "stock.location.path" @api.model def _apply(self, move): """Set auto move to the new move created by push rule.""" - move.auto_move = self.auto == 'transparent' + move.auto_move = self.auto == "transparent" return super(StockLocationPath, self)._apply(move) diff --git a/stock_auto_move/tests/__init__.py b/stock_auto_move/tests/__init__.py index bd826f926d80..f76290928ec4 100644 --- a/stock_auto_move/tests/__init__.py +++ b/stock_auto_move/tests/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - 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 index a6ad8112633e..e554fc9232fa 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2014 NDP Systèmes () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -6,12 +5,10 @@ class TestStockAutoMove(common.TransactionCase): - def setUp(self): super(TestStockAutoMove, self).setUp() self.product_a1232 = self.browse_ref("product.product_product_6") - self.location_shelf = self.browse_ref( - "stock.stock_location_components") + self.location_shelf = self.browse_ref("stock.stock_location_components") self.location_1 = self.browse_ref("stock_auto_move.stock_location_a") self.location_2 = self.browse_ref("stock_auto_move.stock_location_b") self.location_3 = self.browse_ref("stock_auto_move.stock_location_c") @@ -21,36 +18,42 @@ def setUp(self): def test_10_auto_move(self): """Check automatic processing of move with auto_move set.""" - move = self.env["stock.move"].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, - }) - move1 = self.env["stock.move"].create({ - 'name': "Test Auto 2", - 'product_id': self.product_a1232.id, - 'product_uom': self.product_uom_unit_id, - 'product_uom_qty': 9, - '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.env["stock.move"].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 = self.env["stock.move"].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, + } + ) + move1 = self.env["stock.move"].create( + { + "name": "Test Auto 2", + "product_id": self.product_a1232.id, + "product_uom": self.product_uom_unit_id, + "product_uom_qty": 9, + "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.env["stock.move"].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.id, self.auto_group_id) @@ -60,72 +63,82 @@ def test_10_auto_move(self): move2.action_confirm() self.assertTrue(move2.picking_id) self.assertFalse(move2.group_id) - self.assertEqual(move.state, 'confirmed') - self.assertEqual(move1.state, 'confirmed') - self.assertEqual(move2.state, 'confirmed') - move3 = 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': 25, - 'location_id': self.location_shelf.id, - 'location_dest_id': self.location_1.id, - 'auto_move': False, - }) + self.assertEqual(move.state, "confirmed") + self.assertEqual(move1.state, "confirmed") + self.assertEqual(move2.state, "confirmed") + move3 = 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": 25, + "location_id": self.location_shelf.id, + "location_dest_id": self.location_1.id, + "auto_move": False, + } + ) move3.action_confirm() move3.action_done() move.action_assign() move1.action_assign() move2.action_assign() - self.assertEqual(move3.state, 'done') - self.assertEqual(move2.state, 'assigned') - self.assertEqual(move.state, 'done') - self.assertEqual(move1.state, 'done') + self.assertEqual(move3.state, "done") + self.assertEqual(move2.state, "assigned") + self.assertEqual(move.state, "done") + self.assertEqual(move1.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"))] - proc = self.env["procurement.order"].create({ - 'name': 'Test Procurement with auto_move', - 'date_planned': '2015-02-02 00:00:00', - 'product_id': self.product_a1232.id, - 'product_qty': 1, - 'product_uom': self.product_uom_unit_id, - 'warehouse_id': self.ref('stock.warehouse0'), - 'location_id': self.location_2.id, - }) + self.product_a1232.route_ids = [(4, self.ref("stock_auto_move.test_route"))] + proc = self.env["procurement.order"].create( + { + "name": "Test Procurement with auto_move", + "date_planned": "2015-02-02 00:00:00", + "product_id": self.product_a1232.id, + "product_qty": 1, + "product_uom": self.product_uom_unit_id, + "warehouse_id": self.ref("stock.warehouse0"), + "location_id": self.location_2.id, + } + ) proc.check() proc.run() self.assertEqual( - proc.rule_id.id, - self.ref("stock_auto_move.procurement_rule_a_to_b")) + proc.rule_id.id, self.ref("stock_auto_move.procurement_rule_a_to_b") + ) for move in proc.move_ids: self.assertEqual(move.auto_move, True) - self.assertEqual(move.state, 'confirmed') + self.assertEqual(move.state, "confirmed") 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.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': 7, - 'location_id': self.location_shelf.id, - 'location_dest_id': self.location_3.id, - 'auto_move': False, - }) + self.product_a1232.route_ids = [(4, self.ref("stock_auto_move.test_route"))] + move3 = 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": 7, + "location_id": self.location_shelf.id, + "location_dest_id": self.location_3.id, + "auto_move": False, + } + ) move3.action_confirm() 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)]) + 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) diff --git a/stock_auto_move/views/stock_auto_move_view.xml b/stock_auto_move/views/stock_auto_move_view.xml index 140aaf8b8974..41ba0f55fa5a 100644 --- a/stock_auto_move/views/stock_auto_move_view.xml +++ b/stock_auto_move/views/stock_auto_move_view.xml @@ -1,43 +1,41 @@ - + stock.auto.move.move.view stock.move - - + + - - - - + + + + - stock.auto.move.move.form.picking.view stock.move - - + + - - - - + + + + - stock.auto.move.procurement.rule.form.view procurement.rule - - + + - - - + + + From 887abb36ca77c84b5ff75e4af23d3b03d084ecb8 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 13 Nov 2020 12:58:42 +0100 Subject: [PATCH 16/40] [13.0][MIG] stock_auto_move: Migration to v13.0 --- stock_auto_move/__manifest__.py | 26 ++-- ...to_move_data.xml => procurement_group.xml} | 2 + stock_auto_move/demo/stock_auto_move_demo.xml | 53 -------- stock_auto_move/demo/stock_location.xml | 23 ++++ stock_auto_move/demo/stock_location_route.xml | 13 ++ stock_auto_move/demo/stock_rule.xml | 27 ++++ stock_auto_move/models/__init__.py | 3 +- stock_auto_move/models/stock_auto_move.py | 66 ---------- stock_auto_move/models/stock_move.py | 36 ++++++ stock_auto_move/models/stock_rule.py | 27 ++++ stock_auto_move/readme/CONFIGURE.rst | 3 + stock_auto_move/readme/CONTRIBUTORS.rst | 3 + stock_auto_move/readme/DESCRIPTION.rst | 14 +++ stock_auto_move/readme/INSTALL.rst | 3 + stock_auto_move/readme/USAGE.rst | 0 stock_auto_move/tests/test_stock_auto_move.py | 116 +++++++++--------- .../views/stock_auto_move_view.xml | 42 ------- stock_auto_move/views/stock_move.xml | 16 +++ stock_auto_move/views/stock_rule.xml | 18 +++ 19 files changed, 259 insertions(+), 232 deletions(-) rename stock_auto_move/data/{stock_auto_move_data.xml => procurement_group.xml} (60%) delete mode 100644 stock_auto_move/demo/stock_auto_move_demo.xml create mode 100644 stock_auto_move/demo/stock_location.xml create mode 100644 stock_auto_move/demo/stock_location_route.xml create mode 100644 stock_auto_move/demo/stock_rule.xml delete mode 100644 stock_auto_move/models/stock_auto_move.py create mode 100644 stock_auto_move/models/stock_move.py create mode 100644 stock_auto_move/models/stock_rule.py create mode 100644 stock_auto_move/readme/CONFIGURE.rst create mode 100644 stock_auto_move/readme/CONTRIBUTORS.rst create mode 100644 stock_auto_move/readme/DESCRIPTION.rst create mode 100644 stock_auto_move/readme/INSTALL.rst create mode 100644 stock_auto_move/readme/USAGE.rst delete mode 100644 stock_auto_move/views/stock_auto_move_view.xml create mode 100644 stock_auto_move/views/stock_move.xml create mode 100644 stock_auto_move/views/stock_rule.xml diff --git a/stock_auto_move/__manifest__.py b/stock_auto_move/__manifest__.py index ffe1923f77a7..f1b52cce1c57 100644 --- a/stock_auto_move/__manifest__.py +++ b/stock_auto_move/__manifest__.py @@ -1,17 +1,25 @@ -# Copyright 2014 NDP Systèmes () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# 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": "10.0.1.0.0", - "author": "NDP Systèmes, Odoo Community Association (OCA)", + "version": "13.0.1.0.0", + "author": "NDP Systèmes, ACSONE SA/NV, Odoo Community Association (OCA)", "category": "Warehouse", - "website": "http://www.ndp-systemes.fr", + "development_status": "Production/Stable", + "website": "https://github.com/OCA/stock-logistics-workflow", "depends": ["stock"], - "data": ["data/stock_auto_move_data.xml", "views/stock_auto_move_view.xml",], - "demo": ["demo/stock_auto_move_demo.xml",], + "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, - "auto_install": False, "license": "AGPL-3", - "application": False, } diff --git a/stock_auto_move/data/stock_auto_move_data.xml b/stock_auto_move/data/procurement_group.xml similarity index 60% rename from stock_auto_move/data/stock_auto_move_data.xml rename to stock_auto_move/data/procurement_group.xml index 35bc2fadb4ba..d6d0abc8fd29 100644 --- a/stock_auto_move/data/stock_auto_move_data.xml +++ b/stock_auto_move/data/procurement_group.xml @@ -1,4 +1,6 @@ + Automatic diff --git a/stock_auto_move/demo/stock_auto_move_demo.xml b/stock_auto_move/demo/stock_auto_move_demo.xml deleted file mode 100644 index 3b8adb043051..000000000000 --- a/stock_auto_move/demo/stock_auto_move_demo.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Location 1 - - 1 - internal - - - Location 2 - - 1 - internal - - - Location 3 - - 1 - internal - - - Test route - 1 - 20 - - 1 - - - - 1 => 2 with auto_move - 1 - move - - - - propagate - 1 - - make_to_stock - 0 - - - - - Test push route 3=>1 - - - - transparent - - - 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/models/__init__.py b/stock_auto_move/models/__init__.py index f6cb7ea8178d..144c5d760cf7 100644 --- a/stock_auto_move/models/__init__.py +++ b/stock_auto_move/models/__init__.py @@ -1 +1,2 @@ -from . import stock_auto_move +from . import stock_move +from . import stock_rule diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py deleted file mode 100644 index fda943f9fba1..000000000000 --- a/stock_auto_move/models/stock_auto_move.py +++ /dev/null @@ -1,66 +0,0 @@ -# © 2014-2015 NDP Systèmes () - -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.", - ) - - @api.multi - def action_assign(self, no_prepare=False): - super(StockMove, self).action_assign(no_prepare=no_prepare) - # Transfer all pickings which have an auto move assigned - moves = self.filtered(lambda m: m.state == "assigned" and m.auto_move) - todo_pickings = moves.mapped("picking_id") - # We create packing operations to keep packing if any - todo_pickings.do_prepare_partial() - moves.action_done() - - @api.multi - def _change_procurement_group(self): - automatic_group = self.env.ref("stock_auto_move.automatic_group") - moves = self.filtered(lambda m: m.auto_move and m.group_id != automatic_group) - moves.write({"group_id": automatic_group.id}) - - @api.multi - def action_confirm(self): - self._change_procurement_group() - return super(StockMove, self).action_confirm() - - -class ProcurementRule(models.Model): - _inherit = "procurement.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.", - ) - - -class ProcurementOrder(models.Model): - _inherit = "procurement.order" - - def _get_stock_move_values(self): - res = super(ProcurementOrder, self)._get_stock_move_values() - if self.rule_id: - res.update({"auto_move": self.rule_id.auto_move}) - return res - - -class StockLocationPath(models.Model): - _inherit = "stock.location.path" - - @api.model - def _apply(self, move): - """Set auto move to the new move created by push rule.""" - move.auto_move = self.auto == "transparent" - return super(StockLocationPath, self)._apply(move) diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py new file mode 100644 index 000000000000..f6f22aa0ec71 --- /dev/null +++ b/stock_auto_move/models/stock_move.py @@ -0,0 +1,36 @@ +# 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.quantity_done = move.product_qty + + def _action_assign(self): + super(StockMove, self)._action_assign() + # Transfer all pickings which have an auto move assigned + moves = self.filtered(lambda m: m.state == "assigned" and m.auto_move) + moves._auto_assign_quantities() + moves._action_done() + + def _change_procurement_group(self): + automatic_group = self.env.ref("stock_auto_move.automatic_group") + moves = self.filtered(lambda m: m.auto_move and m.group_id != automatic_group) + 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..5c31d67ce555 --- /dev/null +++ b/stock_auto_move/models/stock_rule.py @@ -0,0 +1,27 @@ +# 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 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 _get_stock_move_values(self, *procurement): + res = super()._get_stock_move_values(*procurement) + res.update({"auto_move": self.auto_move}) + return res + + @api.model + def _apply(self, move): + """Set auto move to the new move created by push rule.""" + move.auto_move = self.auto == "transparent" + return super()._apply(move) 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/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index e554fc9232fa..f9dfc4a9faa9 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -1,24 +1,28 @@ -# Copyright 2014 NDP Systèmes () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# 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 import common +from odoo.tests.common import SavepointCase -class TestStockAutoMove(common.TransactionCase): - def setUp(self): - super(TestStockAutoMove, self).setUp() - self.product_a1232 = self.browse_ref("product.product_product_6") - self.location_shelf = self.browse_ref("stock.stock_location_components") - self.location_1 = self.browse_ref("stock_auto_move.stock_location_a") - self.location_2 = self.browse_ref("stock_auto_move.stock_location_b") - self.location_3 = self.browse_ref("stock_auto_move.stock_location_c") - self.product_uom_unit_id = self.ref("product.product_uom_unit") - self.picking_type_id = self.ref("stock.picking_type_internal") - self.auto_group_id = self.ref("stock_auto_move.automatic_group") +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.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.picking_type_id = cls.env.ref("stock.picking_type_internal").id + cls.auto_group_id = cls.env.ref("stock_auto_move.automatic_group").id + cls.move_obj = cls.env["stock.move"] def test_10_auto_move(self): """Check automatic processing of move with auto_move set.""" - move = self.env["stock.move"].create( + move = self.move_obj.create( { "name": "Test Auto", "product_id": self.product_a1232.id, @@ -30,19 +34,7 @@ def test_10_auto_move(self): "auto_move": True, } ) - move1 = self.env["stock.move"].create( - { - "name": "Test Auto 2", - "product_id": self.product_a1232.id, - "product_uom": self.product_uom_unit_id, - "product_uom_qty": 9, - "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.env["stock.move"].create( + move2 = self.move_obj.create( { "name": "Test Manual", "product_id": self.product_a1232.id, @@ -54,19 +46,15 @@ def test_10_auto_move(self): "auto_move": False, } ) - move.action_confirm() + move._action_confirm() self.assertTrue(move.picking_id) self.assertEqual(move.group_id.id, self.auto_group_id) - move1.action_confirm() - self.assertTrue(move1.picking_id) - self.assertEqual(move1.group_id.id, self.auto_group_id) - move2.action_confirm() + move2._action_confirm() self.assertTrue(move2.picking_id) self.assertFalse(move2.group_id) self.assertEqual(move.state, "confirmed") - self.assertEqual(move1.state, "confirmed") self.assertEqual(move2.state, "confirmed") - move3 = self.env["stock.move"].create( + move3 = self.move_obj.create( { "name": "Supply source location for test", "product_id": self.product_a1232.id, @@ -77,45 +65,50 @@ def test_10_auto_move(self): "auto_move": False, } ) - move3.action_confirm() - move3.action_done() - move.action_assign() - move1.action_assign() - move2.action_assign() + 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") - self.assertEqual(move1.state, "done") def test_20_procurement_auto_move(self): """Check that move generated with procurement rule - have auto_move set.""" + have auto_move set.""" self.product_a1232.route_ids = [(4, self.ref("stock_auto_move.test_route"))] - proc = self.env["procurement.order"].create( - { - "name": "Test Procurement with auto_move", - "date_planned": "2015-02-02 00:00:00", - "product_id": self.product_a1232.id, - "product_qty": 1, - "product_uom": self.product_uom_unit_id, - "warehouse_id": self.ref("stock.warehouse0"), - "location_id": self.location_2.id, - } + 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", + }, + ) + ] ) - proc.check() - proc.run() + moves_after = self.move_obj.search([]) - moves_before self.assertEqual( - proc.rule_id.id, self.ref("stock_auto_move.procurement_rule_a_to_b") + moves_after.rule_id.id, self.ref("stock_auto_move.stock_rule_a_to_b"), ) - for move in proc.move_ids: - self.assertEqual(move.auto_move, True) - self.assertEqual(move.state, "confirmed") + self.assertTrue(moves_after.auto_move) + self.assertEqual(moves_after.state, "confirmed") 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.env["stock.move"].create( + move3 = self.move_obj.create( { "name": "Supply source location for test", "product_id": self.product_a1232.id, @@ -126,8 +119,9 @@ def test_30_push_rule_auto(self): "auto_move": False, } ) - move3.action_confirm() - move3.action_done() + move3._action_confirm() + move3._auto_assign_quantities() + move3._action_done() quants_in_3 = self.env["stock.quant"].search( [ ("product_id", "=", self.product_a1232.id), diff --git a/stock_auto_move/views/stock_auto_move_view.xml b/stock_auto_move/views/stock_auto_move_view.xml deleted file mode 100644 index 41ba0f55fa5a..000000000000 --- a/stock_auto_move/views/stock_auto_move_view.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - stock.auto.move.move.view - stock.move - - - - - - - - - - - - stock.auto.move.move.form.picking.view - stock.move - - - - - - - - - - - - stock.auto.move.procurement.rule.form.view - procurement.rule - - - - - - - - - - - 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 + + + + + + + + + + + From d6c136127c6d22fbe2d114066346a6bf96b30c61 Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Tue, 5 Sep 2017 09:01:53 +0100 Subject: [PATCH 17/40] [IMP]stock_auto_move: auto move from push rules --- stock_auto_move/models/stock_auto_move.py | 56 ++++++ stock_auto_move/models/stock_location_path.py | 23 +++ stock_auto_move/tests/test_stock_auto_move.py | 189 ++++++++++++++++++ stock_auto_move/views/stock_location_path.xml | 18 ++ 4 files changed, 286 insertions(+) create mode 100644 stock_auto_move/models/stock_auto_move.py create mode 100644 stock_auto_move/models/stock_location_path.py create mode 100644 stock_auto_move/views/stock_location_path.xml diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py new file mode 100644 index 000000000000..729ff2b15951 --- /dev/null +++ b/stock_auto_move/models/stock_auto_move.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# © 2014-2015 NDP Systèmes () + +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.") + + @api.multi + def action_assign(self, no_prepare=False): + super(StockMove, self).action_assign(no_prepare=no_prepare) + # Transfer all pickings which have an auto move assigned + moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) + todo_pickings = moves.mapped('picking_id') + # We create packing operations to keep packing if any + todo_pickings.do_prepare_partial() + moves.action_done() + + @api.multi + def _change_procurement_group(self): + automatic_group = self.env.ref('stock_auto_move.automatic_group') + moves = self.filtered( + lambda m: m.auto_move and m.group_id != automatic_group) + moves.write({'group_id': automatic_group.id}) + + @api.multi + def action_confirm(self): + self._change_procurement_group() + return super(StockMove, self).action_confirm() + + +class ProcurementRule(models.Model): + _inherit = 'procurement.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.") + + +class ProcurementOrder(models.Model): + _inherit = 'procurement.order' + + def _get_stock_move_values(self): + res = super(ProcurementOrder, self)._get_stock_move_values() + if self.rule_id: + res.update({'auto_move': self.rule_id.auto_move}) + return res diff --git a/stock_auto_move/models/stock_location_path.py b/stock_auto_move/models/stock_location_path.py new file mode 100644 index 000000000000..9fa5308210e6 --- /dev/null +++ b/stock_auto_move/models/stock_location_path.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# © 2014-2015 NDP Systèmes () + +from odoo import api, fields, models + + +class StockLocationPath(models.Model): + + _inherit = 'stock.location.path' + + auto_move = fields.Boolean( + help="If this option is selected, the generated moves 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." + ) + + @api.model + def _prepare_move_copy_values(self, move_to_copy, new_date): + new_move_vals = super(StockLocationPath, self)._prepare_move_copy_values( + move_to_copy=move_to_copy, new_date=new_date) + new_move_vals.update({'auto_move': self.auto_move}) + return new_move_vals diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index f9dfc4a9faa9..10c058dadbb0 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -11,6 +11,7 @@ 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") @@ -136,3 +137,191 @@ def test_30_push_rule_auto(self): ) 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.push_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.pack_operation_ids) + self.assertEqual(len(picking.pack_operation_ids), 1) + picking.pack_operation_ids.qty_done = 2 + picking.do_transfer() + self.assertTrue(move1.move_dest_id) + + self.assertTrue(move1.move_dest_id.auto_move) + self.assertEqual(move1.move_dest_id.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.push_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.pack_operation_ids) + self.assertEqual(len(picking.pack_operation_ids), 1) + picking.pack_operation_ids.qty_done = 1 + picking.pack_operation_ids.product_qty = 1 + picking.do_transfer() + + self.assertTrue(move1.move_dest_id) + self.assertEqual(len(move1.move_dest_id), 1) + + self.assertTrue(move1.move_dest_id.auto_move) + self.assertEqual(move1.move_dest_id.state, 'done') + + # 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.pack_operation_ids.qty_done = 1 + back_order.do_transfer() + + move2 = back_order.move_lines + self.assertTrue(move2.move_dest_id) + self.assertEqual(len(move2.move_dest_id), 1) + + self.assertTrue(move2.move_dest_id.auto_move) + self.assertEqual(move2.move_dest_id.state, '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.push_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_id.auto_move) + self.assertTrue(move2.move_dest_id.auto_move) + second_step_picking = move2.move_dest_id.picking_id + move2.move_dest_id.auto_move = False + + # do partial reception of the first picking + move1.linked_move_operation_ids.operation_id.qty_done = 2 + move1.linked_move_operation_ids.operation_id.product_qty = 2 + + move2.linked_move_operation_ids.operation_id.qty_done = 1 + move2.linked_move_operation_ids.operation_id.product_qty = 1 + + picking.do_transfer() + + 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.pack_operation_ids), 1) + + self.assertEqual(len(second_step_back_order.move_lines), 2) + self.assertTrue(second_step_back_order.move_lines.filtered( + lambda m: m.state == 'assigned')) + self.assertTrue(second_step_back_order.move_lines.filtered( + lambda m: m.state == 'waiting')) diff --git a/stock_auto_move/views/stock_location_path.xml b/stock_auto_move/views/stock_location_path.xml new file mode 100644 index 000000000000..eeeb8bfcbb5a --- /dev/null +++ b/stock_auto_move/views/stock_location_path.xml @@ -0,0 +1,18 @@ + + + + + + + stock.location.path.form (in stock_auto_move) + stock.location.path + + + + + + + + + From 7d95cd914a228b9f4a0137df5cda2de9c6f4256a Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Mon, 1 Oct 2018 16:30:42 +0400 Subject: [PATCH 18/40] [9.0][REF]stock_auto_move: fix action_assign() (#373) * The `_apply` method should not be overridden. In case of three step operation with the last step set to auto move. The override of the `_apply` method was causing the second move to be automatic as well. **Use case**: doing a reception operation in two steps where the moves on the second step are set to be automatic (using the push rule in this case), and the reception is done partially. **Expected Result**: When doing a first reception step partially a back order is created, and we expect the second step to have a back order for the remaining qty as well. **Current behavior**: The correct move is processed automatically but no backorder is created. The reason for that behavior is we processing the move directly (i.e calling `action_done` of the `stock.move`) without going through the normal process (i.e processing the second step picking). **The solution to the problem**: The processing the of the automatic stock move should follow the same behavior as done from the user interface. I've added a new function in `stock.picking` model called `_transfer_pickings_with_auto_move` to simulate the same behavior this function is called inside the `action_assign` of the stock move instead of calling the `action_done` of the move. --- stock_auto_move/models/stock_auto_move.py | 42 +++++++++++++++++++---- stock_auto_move/models/stock_picking.py | 34 ++++++++++++++++++ 2 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 stock_auto_move/models/stock_picking.py diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py index 729ff2b15951..3ec9aebc27ed 100644 --- a/stock_auto_move/models/stock_auto_move.py +++ b/stock_auto_move/models/stock_auto_move.py @@ -12,15 +12,43 @@ class StockMove(models.Model): help="If this option is selected, the move will be automatically " "processed as soon as the products are available.") + @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 + @api.multi def action_assign(self, no_prepare=False): - super(StockMove, self).action_assign(no_prepare=no_prepare) - # Transfer all pickings which have an auto move assigned - moves = self.filtered(lambda m: m.state == 'assigned' and m.auto_move) - todo_pickings = moves.mapped('picking_id') - # We create packing operations to keep packing if any - todo_pickings.do_prepare_partial() - moves.action_done() + + already_assigned_moves = self.filtered( + lambda m: m.state == 'assigned') + + not_assigned_auto_move = self - already_assigned_moves + + res = super(StockMove, self).action_assign( + no_prepare=no_prepare) + + # Process only moves that have been processed recently + auto_moves = not_assigned_auto_move.filtered( + lambda m: m.state == 'assigned' and m.auto_move) + + # group the moves by pickings + auto_moves_by_pickings = self._get_auto_moves_by_pickings(auto_moves) + + # process the moves by creating backorders + self.env['stock.picking']._transfer_pickings_with_auto_move( + auto_moves_by_pickings) + return res @api.multi def _change_procurement_group(self): diff --git a/stock_auto_move/models/stock_picking.py b/stock_auto_move/models/stock_picking.py new file mode 100644 index 000000000000..d25bb035280b --- /dev/null +++ b/stock_auto_move/models/stock_picking.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, models + + +class StockPicking(models.Model): + + _inherit = 'stock.picking' + + @api.model + def _transfer_pickings_with_auto_move(self, auto_moves_by_pickings): + """This function is meant to simulate what a user would normally + transfer a picking from the user interface either partial processing + or full processing. + @params auto_moves_by_pickings: dict of moves grouped by pickings + {stock.picking(id): stock.move(id1, id2, id3 ...), ...} + """ + for picking in auto_moves_by_pickings: + if len(picking.move_lines) != len(auto_moves_by_pickings[picking]): + # Create a back order for remaning moves + backorder_moves = \ + picking.move_lines - auto_moves_by_pickings[picking] + picking._create_backorder(backorder_moves=backorder_moves) + + # Create immediate transfer wizard so it will fill the qty_done + # on the auto move linked operation + picking.do_prepare_partial() + wizard = self.env['stock.immediate.transfer'].create( + {'pick_id': picking.id}) + wizard.process() + + return From a44f486bf8a3c4ec6abf66d0e09aa647540ebe9b Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 18 Nov 2020 14:52:52 +0100 Subject: [PATCH 19/40] [10.0][IMP] stock_auto_move: auto_confirm=>auto_move As in v>=12, stock.location.path and procurement.rule have been merged into stock.rule, use the same field name. --- stock_auto_move/models/stock_location_path.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock_auto_move/models/stock_location_path.py b/stock_auto_move/models/stock_location_path.py index 9fa5308210e6..5b82010d0bec 100644 --- a/stock_auto_move/models/stock_location_path.py +++ b/stock_auto_move/models/stock_location_path.py @@ -12,7 +12,8 @@ class StockLocationPath(models.Model): help="If this option is selected, the generated moves 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." + "do not want an operator action.", + oldname="auto_confirm", ) @api.model From c6b461c6992af7268d386e5b607a5dd66e9c352e Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 18 Nov 2020 16:35:50 +0100 Subject: [PATCH 20/40] [13.0][IMP] stock_auto_move: Take into account partial moves --- stock_auto_move/models/__init__.py | 1 + stock_auto_move/models/stock_auto_move.py | 84 ------ stock_auto_move/models/stock_location_path.py | 24 -- stock_auto_move/models/stock_move.py | 36 ++- stock_auto_move/models/stock_picking.py | 36 ++- stock_auto_move/models/stock_rule.py | 15 +- stock_auto_move/tests/test_stock_auto_move.py | 263 ++++++++++-------- stock_auto_move/views/stock_location_path.xml | 18 -- 8 files changed, 214 insertions(+), 263 deletions(-) delete mode 100644 stock_auto_move/models/stock_auto_move.py delete mode 100644 stock_auto_move/models/stock_location_path.py delete mode 100644 stock_auto_move/views/stock_location_path.xml diff --git a/stock_auto_move/models/__init__.py b/stock_auto_move/models/__init__.py index 144c5d760cf7..ce7a5ed78790 100644 --- a/stock_auto_move/models/__init__.py +++ b/stock_auto_move/models/__init__.py @@ -1,2 +1,3 @@ from . import stock_move from . import stock_rule +from . import stock_picking diff --git a/stock_auto_move/models/stock_auto_move.py b/stock_auto_move/models/stock_auto_move.py deleted file mode 100644 index 3ec9aebc27ed..000000000000 --- a/stock_auto_move/models/stock_auto_move.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2014-2015 NDP Systèmes () - -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.") - - @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 - - @api.multi - def action_assign(self, no_prepare=False): - - already_assigned_moves = self.filtered( - lambda m: m.state == 'assigned') - - not_assigned_auto_move = self - already_assigned_moves - - res = super(StockMove, self).action_assign( - no_prepare=no_prepare) - - # Process only moves that have been processed recently - auto_moves = not_assigned_auto_move.filtered( - lambda m: m.state == 'assigned' and m.auto_move) - - # group the moves by pickings - auto_moves_by_pickings = self._get_auto_moves_by_pickings(auto_moves) - - # process the moves by creating backorders - self.env['stock.picking']._transfer_pickings_with_auto_move( - auto_moves_by_pickings) - return res - - @api.multi - def _change_procurement_group(self): - automatic_group = self.env.ref('stock_auto_move.automatic_group') - moves = self.filtered( - lambda m: m.auto_move and m.group_id != automatic_group) - moves.write({'group_id': automatic_group.id}) - - @api.multi - def action_confirm(self): - self._change_procurement_group() - return super(StockMove, self).action_confirm() - - -class ProcurementRule(models.Model): - _inherit = 'procurement.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.") - - -class ProcurementOrder(models.Model): - _inherit = 'procurement.order' - - def _get_stock_move_values(self): - res = super(ProcurementOrder, self)._get_stock_move_values() - if self.rule_id: - res.update({'auto_move': self.rule_id.auto_move}) - return res diff --git a/stock_auto_move/models/stock_location_path.py b/stock_auto_move/models/stock_location_path.py deleted file mode 100644 index 5b82010d0bec..000000000000 --- a/stock_auto_move/models/stock_location_path.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2014-2015 NDP Systèmes () - -from odoo import api, fields, models - - -class StockLocationPath(models.Model): - - _inherit = 'stock.location.path' - - auto_move = fields.Boolean( - help="If this option is selected, the generated moves 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.", - oldname="auto_confirm", - ) - - @api.model - def _prepare_move_copy_values(self, move_to_copy, new_date): - new_move_vals = super(StockLocationPath, self)._prepare_move_copy_values( - move_to_copy=move_to_copy, new_date=new_date) - new_move_vals.update({'auto_move': self.auto_move}) - return new_move_vals diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index f6f22aa0ec71..c4e80dc1b0c1 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -1,7 +1,7 @@ # 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 +from odoo import api, fields, models class StockMove(models.Model): @@ -18,11 +18,43 @@ def _auto_assign_quantities(self): move.quantity_done = move.product_qty def _action_assign(self): - super(StockMove, self)._action_assign() + res = super(StockMove, self)._action_assign() # Transfer all pickings which have an auto move assigned moves = self.filtered(lambda m: m.state == "assigned" and m.auto_move) moves._auto_assign_quantities() moves._action_done() + already_assigned_moves = self.filtered(lambda m: m.state == "assigned") + + not_assigned_auto_move = self - already_assigned_moves + + # Process only moves that have been processed recently + auto_moves = not_assigned_auto_move.filtered( + lambda m: m.state in ("assigned", "partially_available") and m.auto_move + ) + + # group the moves by pickings + auto_moves_by_pickings = self._get_auto_moves_by_pickings(auto_moves) + + # process the moves by creating backorders + self.env["stock.picking"]._transfer_pickings_with_auto_move( + auto_moves_by_pickings + ) + 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") diff --git a/stock_auto_move/models/stock_picking.py b/stock_auto_move/models/stock_picking.py index d25bb035280b..eb1b1e7a99aa 100644 --- a/stock_auto_move/models/stock_picking.py +++ b/stock_auto_move/models/stock_picking.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -7,7 +6,7 @@ class StockPicking(models.Model): - _inherit = 'stock.picking' + _inherit = "stock.picking" @api.model def _transfer_pickings_with_auto_move(self, auto_moves_by_pickings): @@ -17,18 +16,31 @@ def _transfer_pickings_with_auto_move(self, auto_moves_by_pickings): @params auto_moves_by_pickings: dict of moves grouped by pickings {stock.picking(id): stock.move(id1, id2, id3 ...), ...} """ + backorder_obj = self.env["stock.backorder.confirmation"] + immediate_obj = self.env["stock.immediate.transfer"] for picking in auto_moves_by_pickings: - if len(picking.move_lines) != len(auto_moves_by_pickings[picking]): - # Create a back order for remaning moves - backorder_moves = \ - picking.move_lines - auto_moves_by_pickings[picking] - picking._create_backorder(backorder_moves=backorder_moves) - # Create immediate transfer wizard so it will fill the qty_done # on the auto move linked operation - picking.do_prepare_partial() - wizard = self.env['stock.immediate.transfer'].create( - {'pick_id': picking.id}) - wizard.process() + immediate_wizard_dict = picking.button_validate() + if ( + isinstance(immediate_wizard_dict, dict) + and "res_model" in immediate_wizard_dict + and "stock.immediate.transfer" == immediate_wizard_dict.get("res_model") + ): + immediate_wizard = immediate_obj.browse( + immediate_wizard_dict.get("res_id") + ) + backorder_wizard_dict = immediate_wizard.process() + if ( + isinstance(backorder_wizard_dict, dict) + and "res_model" in backorder_wizard_dict + and "stock.backorder.confirmation" + == backorder_wizard_dict.get("res_model") + ): + backorder_wizard = backorder_obj.browse( + backorder_wizard_dict.get("res_id") + ) + if backorder_wizard: + backorder_wizard.process() return diff --git a/stock_auto_move/models/stock_rule.py b/stock_auto_move/models/stock_rule.py index 5c31d67ce555..3fc3a4d4c01e 100644 --- a/stock_auto_move/models/stock_rule.py +++ b/stock_auto_move/models/stock_rule.py @@ -1,7 +1,7 @@ # 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 +from odoo import fields, models class StockRule(models.Model): @@ -15,13 +15,14 @@ class StockRule(models.Model): "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 - - @api.model - def _apply(self, move): - """Set auto move to the new move created by push rule.""" - move.auto_move = self.auto == "transparent" - return super()._apply(move) diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index 10c058dadbb0..d45194b36eb0 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -149,39 +149,46 @@ def test_40_chained_auto_move(self): 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.push_ids.auto_move = True + 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 = ( + 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.pack_operation_ids) - self.assertEqual(len(picking.pack_operation_ids), 1) - picking.pack_operation_ids.qty_done = 2 - picking.do_transfer() - self.assertTrue(move1.move_dest_id) + 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_id.auto_move) - self.assertEqual(move1.move_dest_id.state, 'done') + self.assertTrue(move1.move_dest_ids.auto_move) + self.assertEqual(move1.move_dest_ids.state, "done") def test_50_partial_chained_auto_move(self): """ @@ -195,58 +202,71 @@ def test_50_partial_chained_auto_move(self): 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.push_ids.auto_move = True + 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 = ( + 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.pack_operation_ids) - self.assertEqual(len(picking.pack_operation_ids), 1) - picking.pack_operation_ids.qty_done = 1 - picking.pack_operation_ids.product_qty = 1 - picking.do_transfer() + 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() - self.assertTrue(move1.move_dest_id) - self.assertEqual(len(move1.move_dest_id), 1) + # 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") - self.assertTrue(move1.move_dest_id.auto_move) - self.assertEqual(move1.move_dest_id.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)]) + back_order = self.env["stock.picking"].search( + [("backorder_id", "=", picking.id)] + ) self.assertTrue(back_order) self.assertEqual(len(back_order), 1) - back_order.pack_operation_ids.qty_done = 1 - back_order.do_transfer() + back_order.move_line_ids.qty_done = 1 + back_order.action_done() move2 = back_order.move_lines - self.assertTrue(move2.move_dest_id) - self.assertEqual(len(move2.move_dest_id), 1) + self.assertEqual(len(move2.move_dest_ids), 2) - self.assertTrue(move2.move_dest_id.auto_move) - self.assertEqual(move2.move_dest_id.state, 'done') + 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): """ @@ -262,66 +282,77 @@ def test_60_partial_chained_auto_move(self): 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.push_ids.auto_move = True + 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 = ( + 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_id.auto_move) - self.assertTrue(move2.move_dest_id.auto_move) - second_step_picking = move2.move_dest_id.picking_id - move2.move_dest_id.auto_move = False + 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.linked_move_operation_ids.operation_id.qty_done = 2 - move1.linked_move_operation_ids.operation_id.product_qty = 2 + move1.move_line_ids.qty_done = 2 + move1.move_line_ids.product_uom_qty = 2 - move2.linked_move_operation_ids.operation_id.qty_done = 1 - move2.linked_move_operation_ids.operation_id.product_qty = 1 + move2.move_line_ids.qty_done = 1 + move2.move_line_ids.product_uom_qty = 1 - picking.do_transfer() + picking.action_done() - second_step_back_order = self.env['stock.picking'].search( - [('backorder_id', '=', second_step_picking.id)]) + second_step_back_order = self.env["stock.picking"].search( + [("backorder_id", "=", second_step_picking.id)] + ) - self.assertEqual(second_step_picking.state, 'done') + self.assertEqual(second_step_picking.state, "done") self.assertEqual(len(second_step_picking.move_lines), 1) - self.assertEqual(len(second_step_picking.pack_operation_ids), 1) + self.assertEqual(len(second_step_picking.move_line_ids), 1) - self.assertEqual(len(second_step_back_order.move_lines), 2) - self.assertTrue(second_step_back_order.move_lines.filtered( - lambda m: m.state == 'assigned')) - self.assertTrue(second_step_back_order.move_lines.filtered( - lambda m: m.state == 'waiting')) + 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" + ) + ) diff --git a/stock_auto_move/views/stock_location_path.xml b/stock_auto_move/views/stock_location_path.xml deleted file mode 100644 index eeeb8bfcbb5a..000000000000 --- a/stock_auto_move/views/stock_location_path.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - stock.location.path.form (in stock_auto_move) - stock.location.path - - - - - - - - - From 76cec4d63e93e9fb47e2660068efa787fb79f59d Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 10 Feb 2021 18:32:04 +0100 Subject: [PATCH 21/40] [13.0][FIX] stock_auto_move: Don't change procurement group if exists If moves were created with a particular procurment group, don't change it to automatic one. Do it only if it's void. --- stock_auto_move/models/stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index c4e80dc1b0c1..82edb2f3fa09 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -58,7 +58,7 @@ def _get_auto_moves_by_pickings(self, auto_moves): def _change_procurement_group(self): automatic_group = self.env.ref("stock_auto_move.automatic_group") - moves = self.filtered(lambda m: m.auto_move and m.group_id != 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): From 456faaf1cbf3904c6b14eca61edf181f303de8fc Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 10 Feb 2021 18:48:27 +0100 Subject: [PATCH 22/40] [13.0][IMP] stock_auto_move: Add tests for procurement group --- stock_auto_move/tests/test_stock_auto_move.py | 44 ++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index d45194b36eb0..c64312ed20d3 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -18,7 +18,7 @@ def setUpClass(cls): 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.picking_type_id = cls.env.ref("stock.picking_type_internal").id - cls.auto_group_id = cls.env.ref("stock_auto_move.automatic_group").id + cls.auto_group = cls.env.ref("stock_auto_move.automatic_group") cls.move_obj = cls.env["stock.move"] def test_10_auto_move(self): @@ -49,7 +49,7 @@ def test_10_auto_move(self): ) move._action_confirm() self.assertTrue(move.picking_id) - self.assertEqual(move.group_id.id, self.auto_group_id) + self.assertEqual(move.group_id, self.auto_group) move2._action_confirm() self.assertTrue(move2.picking_id) self.assertFalse(move2.group_id) @@ -105,6 +105,7 @@ def test_20_procurement_auto_move(self): 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.""" @@ -162,7 +163,7 @@ def test_40_chained_auto_move(self): { "partner_id": self.env.ref("base.res_partner_1").id, "picking_type_id": warehouse.in_type_id.id, - "group_id": self.auto_group_id, + "group_id": self.auto_group.id, "location_id": self.env.ref("stock.stock_location_suppliers").id, } ) @@ -215,7 +216,7 @@ def test_50_partial_chained_auto_move(self): { "partner_id": self.env.ref("base.res_partner_1").id, "picking_type_id": warehouse.in_type_id.id, - "group_id": self.auto_group_id, + "group_id": self.auto_group.id, "location_id": self.env.ref("stock.stock_location_suppliers").id, } ) @@ -295,7 +296,7 @@ def test_60_partial_chained_auto_move(self): { "partner_id": self.env.ref("base.res_partner_1").id, "picking_type_id": warehouse.in_type_id.id, - "group_id": self.auto_group_id, + "group_id": self.auto_group.id, "location_id": self.env.ref("stock.stock_location_suppliers").id, } ) @@ -356,3 +357,36 @@ def test_60_partial_chained_auto_move(self): 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) From f77a41b63a63b83ecdce5ae41c5ed177664bdaca Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Wed, 10 Feb 2021 22:43:39 +0100 Subject: [PATCH 23/40] [13.0][FIX] stock_auto_move: Use correct quantity field As unit of measure can be a different multiple than reference, use product_uom_qty instead. --- stock_auto_move/models/stock_move.py | 2 +- stock_auto_move/tests/test_stock_auto_move.py | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index 82edb2f3fa09..9a7670584e8f 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -15,7 +15,7 @@ class StockMove(models.Model): def _auto_assign_quantities(self): for move in self: - move.quantity_done = move.product_qty + move.quantity_done = move.product_uom_qty def _action_assign(self): res = super(StockMove, self)._action_assign() diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index c64312ed20d3..bcdf11209ee0 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -17,6 +17,7 @@ def setUpClass(cls): 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"] @@ -390,3 +391,58 @@ def test_70_procurement_auto_move_keep_group(self): 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) From 6032fc09014fa2813a489a3b364c2b97d254fe6c Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Thu, 11 Feb 2021 22:22:44 +0100 Subject: [PATCH 24/40] [13.0][IMP] stock_auto_move: Take into account cases with mixed moves --- stock_auto_move/models/stock_move.py | 6 ++++-- stock_auto_move/tests/test_stock_auto_move.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index 9a7670584e8f..fa08c479cd4d 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -15,12 +15,14 @@ class StockMove(models.Model): def _auto_assign_quantities(self): for move in self: - move.quantity_done = move.product_uom_qty + 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 == "assigned" and m.auto_move) + moves = self.filtered( + lambda m: m.state in ("assigned", "partially_available") and m.auto_move + ) moves._auto_assign_quantities() moves._action_done() already_assigned_moves = self.filtered(lambda m: m.state == "assigned") diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index bcdf11209ee0..4dce58c919d7 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -123,6 +123,7 @@ def test_30_push_rule_auto(self): } ) move3._action_confirm() + move3._action_assign() move3._auto_assign_quantities() move3._action_done() quants_in_3 = self.env["stock.quant"].search( From fe8f6d27cc79788cb9e346bf07ef9185e1e0fc09 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Sat, 13 Feb 2021 13:27:32 +0100 Subject: [PATCH 25/40] [13.0][IMP] stock_auto_move: Take into account 'No backorder' process If in a first picking, we transfer partially one quantity and say 'No backorder', the destination move should be split and cancelled for the remaining quantities if 'propagate_cancel' is set. --- stock_auto_move/models/stock_move.py | 6 +- stock_auto_move/tests/test_stock_auto_move.py | 88 +++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index fa08c479cd4d..5f5e1200ef1b 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -24,7 +24,11 @@ def _action_assign(self): lambda m: m.state in ("assigned", "partially_available") and m.auto_move ) moves._auto_assign_quantities() - moves._action_done() + # 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) + ) already_assigned_moves = self.filtered(lambda m: m.state == "assigned") not_assigned_auto_move = self - already_assigned_moves diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index 4dce58c919d7..5699fe7216c4 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -447,3 +447,91 @@ def test_80_chained_auto_move_uom(self): 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) From 8d2f8584341eae8ec7056590c63ccd5b7eba40c2 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Fri, 26 Feb 2021 15:38:24 +0100 Subject: [PATCH 26/40] [13.0][IMP] stock_auto_move: Take into account cases with mixed moves (take2) In case of partial flows with move cancel and mixed moves (auto and manual), we need to create a backorder for manual quantities to not get a picking with moves with mixed states (done, cancel, assigned). We remove code that is never called on picking side --- stock_auto_move/models/__init__.py | 1 - stock_auto_move/models/stock_move.py | 17 +-- stock_auto_move/models/stock_picking.py | 46 ------- stock_auto_move/tests/test_stock_auto_move.py | 125 ++++++++++++++++++ 4 files changed, 127 insertions(+), 62 deletions(-) delete mode 100644 stock_auto_move/models/stock_picking.py diff --git a/stock_auto_move/models/__init__.py b/stock_auto_move/models/__init__.py index ce7a5ed78790..144c5d760cf7 100644 --- a/stock_auto_move/models/__init__.py +++ b/stock_auto_move/models/__init__.py @@ -1,3 +1,2 @@ from . import stock_move from . import stock_rule -from . import stock_picking diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index 5f5e1200ef1b..99216ad90fc1 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -29,22 +29,9 @@ def _action_assign(self): moves._action_done( cancel_backorder=self.env.context.get("cancel_backorder", False) ) - already_assigned_moves = self.filtered(lambda m: m.state == "assigned") + # We need to create backorder if there are mixed moves (auto and manual) + moves.mapped("picking_id")._create_backorder() - not_assigned_auto_move = self - already_assigned_moves - - # Process only moves that have been processed recently - auto_moves = not_assigned_auto_move.filtered( - lambda m: m.state in ("assigned", "partially_available") and m.auto_move - ) - - # group the moves by pickings - auto_moves_by_pickings = self._get_auto_moves_by_pickings(auto_moves) - - # process the moves by creating backorders - self.env["stock.picking"]._transfer_pickings_with_auto_move( - auto_moves_by_pickings - ) return res @api.model diff --git a/stock_auto_move/models/stock_picking.py b/stock_auto_move/models/stock_picking.py deleted file mode 100644 index eb1b1e7a99aa..000000000000 --- a/stock_auto_move/models/stock_picking.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2017 ACSONE SA/NV -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import api, models - - -class StockPicking(models.Model): - - _inherit = "stock.picking" - - @api.model - def _transfer_pickings_with_auto_move(self, auto_moves_by_pickings): - """This function is meant to simulate what a user would normally - transfer a picking from the user interface either partial processing - or full processing. - @params auto_moves_by_pickings: dict of moves grouped by pickings - {stock.picking(id): stock.move(id1, id2, id3 ...), ...} - """ - backorder_obj = self.env["stock.backorder.confirmation"] - immediate_obj = self.env["stock.immediate.transfer"] - for picking in auto_moves_by_pickings: - # Create immediate transfer wizard so it will fill the qty_done - # on the auto move linked operation - immediate_wizard_dict = picking.button_validate() - if ( - isinstance(immediate_wizard_dict, dict) - and "res_model" in immediate_wizard_dict - and "stock.immediate.transfer" == immediate_wizard_dict.get("res_model") - ): - immediate_wizard = immediate_obj.browse( - immediate_wizard_dict.get("res_id") - ) - backorder_wizard_dict = immediate_wizard.process() - if ( - isinstance(backorder_wizard_dict, dict) - and "res_model" in backorder_wizard_dict - and "stock.backorder.confirmation" - == backorder_wizard_dict.get("res_model") - ): - backorder_wizard = backorder_obj.browse( - backorder_wizard_dict.get("res_id") - ) - if backorder_wizard: - backorder_wizard.process() - - return diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index 5699fe7216c4..6dd2254d3096 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -21,6 +21,7 @@ def setUpClass(cls): 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.""" @@ -535,3 +536,127 @@ def test_90_partial_chained_auto_move_no_backorder(self): 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) From b4254b7373b0ad475b6b0779e3e2e20ed6a052b5 Mon Sep 17 00:00:00 2001 From: sbejaoui Date: Thu, 10 Jun 2021 13:03:43 +0200 Subject: [PATCH 27/40] [14.0][MIG] - stock_auto_move --- stock_auto_move/__manifest__.py | 2 +- stock_auto_move/models/stock_move.py | 26 ++++---- stock_auto_move/readme/CONTRIBUTORS.rst | 1 + stock_auto_move/tests/test_stock_auto_move.py | 59 +++++++++++-------- stock_auto_move/views/stock_move.xml | 2 +- 5 files changed, 50 insertions(+), 40 deletions(-) diff --git a/stock_auto_move/__manifest__.py b/stock_auto_move/__manifest__.py index f1b52cce1c57..b37be90318ee 100644 --- a/stock_auto_move/__manifest__.py +++ b/stock_auto_move/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Automatic Move Processing", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "author": "NDP Systèmes, ACSONE SA/NV, Odoo Community Association (OCA)", "category": "Warehouse", "development_status": "Production/Stable", diff --git a/stock_auto_move/models/stock_move.py b/stock_auto_move/models/stock_move.py index 99216ad90fc1..1fe03e179e11 100644 --- a/stock_auto_move/models/stock_move.py +++ b/stock_auto_move/models/stock_move.py @@ -18,25 +18,25 @@ def _auto_assign_quantities(self): move.quantity_done = move.reserved_availability def _action_assign(self): - res = super(StockMove, self)._action_assign() + res = super()._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() - + 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 @api.model def _get_auto_moves_by_pickings(self, auto_moves): - """ Group moves by picking. + """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 ...), ...} @@ -56,6 +56,4 @@ def _change_procurement_group(self): 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 - ) + return super()._action_confirm(merge=merge, merge_into=merge_into) diff --git a/stock_auto_move/readme/CONTRIBUTORS.rst b/stock_auto_move/readme/CONTRIBUTORS.rst index b85157eccaa7..957a607c3845 100644 --- a/stock_auto_move/readme/CONTRIBUTORS.rst +++ b/stock_auto_move/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Nicolas Piganeau * Cédric Pigeon * Denis Roussel +* Souheil Bejaoui diff --git a/stock_auto_move/tests/test_stock_auto_move.py b/stock_auto_move/tests/test_stock_auto_move.py index 6dd2254d3096..9c2fc8341a70 100644 --- a/stock_auto_move/tests/test_stock_auto_move.py +++ b/stock_auto_move/tests/test_stock_auto_move.py @@ -102,16 +102,24 @@ def test_20_procurement_auto_move(self): ) 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"), + 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) + 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", @@ -188,7 +196,7 @@ def test_40_chained_auto_move(self): self.assertTrue(picking.move_line_ids) self.assertEqual(len(picking.move_line_ids), 1) picking.move_line_ids.qty_done = 2 - picking.action_done() + picking._action_done() self.assertTrue(move1.move_dest_ids) self.assertTrue(move1.move_dest_ids.auto_move) @@ -242,7 +250,7 @@ def test_50_partial_chained_auto_move(self): 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() + picking._action_done() # As move_dest_ids include backorders self.assertEqual(len(move1.move_dest_ids), 2) @@ -264,12 +272,12 @@ def test_50_partial_chained_auto_move(self): self.assertEqual(len(back_order), 1) back_order.move_line_ids.qty_done = 1 - back_order.action_done() + 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("auto_move"), [True, True]) self.assertEqual(move2.move_dest_ids.mapped("state"), ["done", "done"]) def test_60_partial_chained_auto_move(self): @@ -344,7 +352,7 @@ def test_60_partial_chained_auto_move(self): move2.move_line_ids.qty_done = 1 move2.move_line_ids.product_uom_qty = 1 - picking.action_done() + picking._action_done() second_step_back_order = self.env["stock.picking"].search( [("backorder_id", "=", second_step_picking.id)] @@ -387,12 +395,13 @@ def test_70_procurement_auto_move_keep_group(self): ) 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"), + 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) + self.assertEqual(moves_after.group_id, group_manual) def test_80_chained_auto_move_uom(self): """ @@ -441,7 +450,7 @@ def test_80_chained_auto_move_uom(self): self.assertTrue(picking.move_line_ids) self.assertEqual(len(picking.move_line_ids), 1) picking.move_line_ids.qty_done = 2 - picking.action_done() + picking._action_done() self.assertTrue(move1.move_dest_ids) self.assertTrue(move1.move_dest_ids.auto_move) @@ -520,10 +529,12 @@ def test_90_partial_chained_auto_move_no_backorder(self): move2.move_line_ids.product_uom_qty = 1 res = picking.button_validate() - self.assertDictContainsSubset( - {"res_model": "stock.backorder.confirmation"}, res, + self.assertEqual(res.get("res_model"), "stock.backorder.confirmation") + wizard = ( + self.env["stock.backorder.confirmation"] + .with_context(**res.get("context", {})) + .create({}) ) - wizard = self.env["stock.backorder.confirmation"].browse(res["res_id"]) wizard.process_cancel_backorder() second_step_back_order = self.env["stock.picking"].search( @@ -532,10 +543,10 @@ def test_90_partial_chained_auto_move_no_backorder(self): 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) + 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_done) + self.assertEqual(1.0, move2.move_dest_ids.quantity_done) def test_100_partial_chained_auto_move_mixed_no_backorder(self): """ @@ -633,10 +644,12 @@ def test_100_partial_chained_auto_move_mixed_no_backorder(self): move2.move_line_ids.product_uom_qty = 5 res = picking.button_validate() - self.assertDictContainsSubset( - {"res_model": "stock.backorder.confirmation"}, res, + self.assertEqual(res.get("res_model"), "stock.backorder.confirmation") + wizard = ( + self.env["stock.backorder.confirmation"] + .with_context(**res.get("context", {})) + .create({}) ) - 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 @@ -656,7 +669,5 @@ def test_100_partial_chained_auto_move_mixed_no_backorder(self): # 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) + self.assertEqual("partially_available", second_step_back_order.move_lines.state) + self.assertEqual(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 index db1bdb076118..83efdb4ebb71 100644 --- a/stock_auto_move/views/stock_move.xml +++ b/stock_auto_move/views/stock_move.xml @@ -8,7 +8,7 @@ - + From 7c0e408a11422681df3618914187f83ec5089932 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Mon, 5 Jul 2021 09:16:32 +0000 Subject: [PATCH 28/40] [UPD] Update stock_auto_move.pot --- stock_auto_move/i18n/stock_auto_move.pot | 58 ++++++++++++------------ 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/stock_auto_move/i18n/stock_auto_move.pot b/stock_auto_move/i18n/stock_auto_move.pot index b5f1a9b23387..413f88240cf6 100644 --- a/stock_auto_move/i18n/stock_auto_move.pot +++ b/stock_auto_move/i18n/stock_auto_move.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * stock_auto_move +# * stock_auto_move # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,63 +14,65 @@ msgstr "" "Plural-Forms: \n" #. module: stock_auto_move -#: model:procurement.rule,name:stock_auto_move.procurement_rule_a_to_b +#: 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_procurement_rule_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_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_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." +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move__display_name +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__display_name +msgid "Display Name" 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." +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move__id +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule__id +msgid "ID" 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" +#: 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:stock.location,name:stock_auto_move.stock_location_c -msgid "Location 3" +#: 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_procurement_order -msgid "Procurement" +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_move____last_update +#: model:ir.model.fields,field_description:stock_auto_move.field_stock_rule____last_update +msgid "Last Modified on" msgstr "" #. module: stock_auto_move -#: model:ir.model,name:stock_auto_move.model_procurement_rule -msgid "Procurement Rule" +#: 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_location_path -msgid "Pushed Flow" +#: model:ir.model,name:stock_auto_move.model_stock_rule +msgid "Stock Rule" msgstr "" #. module: stock_auto_move -#: model:ir.model,name:stock_auto_move.model_stock_move -msgid "Stock Move" +#: model:stock.rule,name:stock_auto_move.auto_location_path +msgid "Test push route 3=>1" msgstr "" #. module: stock_auto_move #: model:stock.location.route,name:stock_auto_move.test_route msgid "Test route" msgstr "" - From ed31f14bc6758966627140e1dc3e1d136fc76338 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 5 Jul 2021 09:39:22 +0000 Subject: [PATCH 29/40] [UPD] README.rst --- stock_auto_move/README.rst | 82 ++-- stock_auto_move/static/description/index.html | 448 ++++++++++++++++++ 2 files changed, 500 insertions(+), 30 deletions(-) create mode 100644 stock_auto_move/static/description/index.html diff --git a/stock_auto_move/README.rst b/stock_auto_move/README.rst index 25beef58cf27..b5cdad443e78 100644 --- a/stock_auto_move/README.rst +++ b/stock_auto_move/README.rst @@ -1,11 +1,30 @@ -.. 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 file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/14.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-14-0/stock-logistics-workflow-14-0-stock_auto_move + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/154/14.0 + :alt: Try me on Runbot + +|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. @@ -18,6 +37,14 @@ 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 ============ @@ -30,53 +57,48 @@ 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 +* Set the flag "Automatic" on stock rule. 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 -`_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* NDP Systèmes +* ACSONE SA/NV Contributors ------------- +~~~~~~~~~~~~ * Nicolas Piganeau * Cédric Pigeon +* Denis Roussel +* Souheil Bejaoui + +Maintainers +~~~~~~~~~~~ -Maintainer ----------- +This module is maintained by the OCA. .. 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. +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/static/description/index.html b/stock_auto_move/static/description/index.html new file mode 100644 index 000000000000..8e01c43a751f --- /dev/null +++ b/stock_auto_move/static/description/index.html @@ -0,0 +1,448 @@ + + + + + + +Automatic Move Processing + + + +
+

Automatic Move Processing

+ + +

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

+

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

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.

+

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.

+
+
+
+ + From e65c56c9011855741da6527142134e29912791b0 Mon Sep 17 00:00:00 2001 From: Jaume Planas Date: Wed, 26 Jan 2022 15:17:02 +0000 Subject: [PATCH 30/40] Translated using Weblate (Catalan) Currently translated at 100.0% (12 of 12 strings) Translation: stock-logistics-workflow-14.0/stock-logistics-workflow-14.0-stock_auto_move Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-14-0/stock-logistics-workflow-14-0-stock_auto_move/ca/ --- stock_auto_move/i18n/ca.po | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/stock_auto_move/i18n/ca.po b/stock_auto_move/i18n/ca.po index fb7e32ca6905..86bc02471d67 100644 --- a/stock_auto_move/i18n/ca.po +++ b/stock_auto_move/i18n/ca.po @@ -9,25 +9,26 @@ 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" +"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" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.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 "" +msgstr "1 => 2 amb 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 "" +msgstr "Moviment automàtic" #. module: stock_auto_move #: model:ir.model.fields,help:stock_auto_move.field_procurement_rule_auto_move @@ -36,6 +37,10 @@ msgid "" "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 @@ -43,43 +48,45 @@ 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:stock.location,name:stock_auto_move.stock_location_a msgid "Location 1" -msgstr "" +msgstr "Ubicació 1" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_b msgid "Location 2" -msgstr "" +msgstr "Ubicació 2" #. module: stock_auto_move #: model:stock.location,name:stock_auto_move.stock_location_c msgid "Location 3" -msgstr "" +msgstr "Ubicació 3" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_procurement_order msgid "Procurement" -msgstr "" +msgstr "Aprovisionament" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_procurement_rule msgid "Procurement Rule" -msgstr "" +msgstr "Regla d'aprovisionament" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_location_path msgid "Pushed Flow" -msgstr "" +msgstr "Flux empès" #. module: stock_auto_move #: model:ir.model,name:stock_auto_move.model_stock_move msgid "Stock Move" -msgstr "Moure l'estoc" +msgstr "Moviment d'estoc" #. module: stock_auto_move #: model:stock.location.route,name:stock_auto_move.test_route msgid "Test route" -msgstr "" +msgstr "Ruta de prova" From 9b4e71503c63a5b5ca4e5dc9ada63c02d1fb2d93 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 17:28:19 +0000 Subject: [PATCH 31/40] [UPD] README.rst --- stock_auto_move/README.rst | 15 ++++--- stock_auto_move/static/description/index.html | 42 ++++++++++--------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/stock_auto_move/README.rst b/stock_auto_move/README.rst index b5cdad443e78..ad8e3db6b57c 100644 --- a/stock_auto_move/README.rst +++ b/stock_auto_move/README.rst @@ -2,10 +2,13 @@ Automatic Move Processing ========================= -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:1cb1346f763023e76122871113faaf676a7e1b4d8600576f930a142787f5d4af + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Automatic Move Processing .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/stock-logistics-workflow-14-0/stock-logistics-workflow-14-0-stock_auto_move :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/154/14.0 - :alt: Try me on Runbot +.. |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=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|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. @@ -64,7 +67,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed +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. diff --git a/stock_auto_move/static/description/index.html b/stock_auto_move/static/description/index.html index 8e01c43a751f..3fbfe814eb2d 100644 --- a/stock_auto_move/static/description/index.html +++ b/stock_auto_move/static/description/index.html @@ -1,20 +1,20 @@ - + - + Automatic Move Processing