From 3db985e2e923b8a2389297186d37beeb16ba6b8a Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 6 Aug 2013 17:07:18 +0200 Subject: [PATCH 01/60] [CHG] extract the sourcing part from stock_location_ownership in a module sale_sourced_by_line (/tmp/trunk-generic/ rev 27) --- sale_sourced_by_line/__init__.py | 22 ++++++++ sale_sourced_by_line/__openerp__.py | 48 +++++++++++++++++ sale_sourced_by_line/model/__init__.py | 22 ++++++++ sale_sourced_by_line/model/sale.py | 54 +++++++++++++++++++ .../test/sale_order_not_sourced.yml | 38 +++++++++++++ .../test/sale_order_source.yml | 40 ++++++++++++++ sale_sourced_by_line/view/sale_view.xml | 27 ++++++++++ 7 files changed, 251 insertions(+) create mode 100644 sale_sourced_by_line/__init__.py create mode 100644 sale_sourced_by_line/__openerp__.py create mode 100644 sale_sourced_by_line/model/__init__.py create mode 100644 sale_sourced_by_line/model/sale.py create mode 100644 sale_sourced_by_line/test/sale_order_not_sourced.yml create mode 100644 sale_sourced_by_line/test/sale_order_source.yml create mode 100644 sale_sourced_by_line/view/sale_view.xml diff --git a/sale_sourced_by_line/__init__.py b/sale_sourced_by_line/__init__.py new file mode 100644 index 00000000000..643bee7abed --- /dev/null +++ b/sale_sourced_by_line/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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 . import model diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py new file mode 100644 index 00000000000..325f9593c0d --- /dev/null +++ b/sale_sourced_by_line/__openerp__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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': 'Sale Sourced by Line', + 'version': '0.1', + 'author': 'Camptocamp', + 'category': 'Warehouse', + 'license': 'AGPL-3', + 'complexity': 'advanced', + 'images': [], + 'website': "http://www.camptocamp.com", + 'description': """ +Sale Sourced by Line +==================== + +Adds the possibility to source a line of sale order from a specific +location instead of using the location of the warehouse of the selected +shop +""", + 'depends': ['sale_stock', + ], + 'demo': [], + 'data': ['view/sale_view.xml', + ], + 'test': ['test/sale_order_source.yml', + 'test/sale_order_not_sourced.yml', + ], + 'auto_install': False, + 'installable': True, + } diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py new file mode 100644 index 00000000000..d65199e72a4 --- /dev/null +++ b/sale_sourced_by_line/model/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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 . import sale diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py new file mode 100644 index 00000000000..d49549f7a09 --- /dev/null +++ b/sale_sourced_by_line/model/sale.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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.osv import orm, fields + + +class sale_order(orm.Model): + _inherit = 'sale.order' + + def _prepare_order_line_move(self, cr, uid, order, line, picking_id, + date_planned, context=None): + values = super(sale_order, self)._prepare_order_line_move( + cr, uid, order, line, picking_id, date_planned, context=context) + if line.location_id: + values['location_id'] = line.location_id.id + return values + + def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, + date_planned, context=None): + values = super(sale_order, self)._prepare_order_line_procurement( + cr, uid, order, line, move_id, date_planned, context=context) + if line.location_id: + values['location_id'] = line.location_id.id + return values + + +class sale_order_line(orm.Model): + _inherit = 'sale.order.line' + + _columns = { + 'location_id': fields.many2one( + 'stock.location', + 'Source Location', + help="If a source location is selected, " + "it will be used as source of the stock moves. "), + } diff --git a/sale_sourced_by_line/test/sale_order_not_sourced.yml b/sale_sourced_by_line/test/sale_order_not_sourced.yml new file mode 100644 index 00000000000..97aca450fc7 --- /dev/null +++ b/sale_sourced_by_line/test/sale_order_not_sourced.yml @@ -0,0 +1,38 @@ +- + In order to check if the source location of a sale order line + still use the location of the shop if not specified on the + sale order line. +- + !record {model: sale.order, id: sale_notsourced_01}: + partner_id: base.res_partner_2 + note: Invoice after delivery + order_line: + - product_id: product.product_product_7 + product_uom_qty: 8 +- + When I confirm the sale order +- + !workflow {model: sale.order, action: order_confirm, ref: sale_notsourced_01} +- + Then a delivery order should have been generated +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) + assert len(sale_order.picking_ids) == 1, ( + "1 delivery order expected, got %d" % len(sale_order.picking_ids)) +- + And the source location of the stock move should be the one of + the sales order's shop +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) + picking = sale_order.picking_ids[0] + location_id = sale_order.shop_id.warehouse_id.lot_stock_id + for move in picking.move_lines: + assert move.location_id == location_id, ( + "Wrong location_id, expected %s, got %s" % + (location_id, move.location_id)) + for procurement in move.procurements: + assert procurement.location_id == location_id, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (location_id, procurement.location_id)) diff --git a/sale_sourced_by_line/test/sale_order_source.yml b/sale_sourced_by_line/test/sale_order_source.yml new file mode 100644 index 00000000000..ac2572cd117 --- /dev/null +++ b/sale_sourced_by_line/test/sale_order_source.yml @@ -0,0 +1,40 @@ +- + In order to check if the source location of a sale order line + becomes the source location of the delivery stock move. + I create a sale order. +- + !record {model: sale.order, id: sale_source_01}: + partner_id: base.res_partner_2 + note: Invoice after delivery + order_line: + - product_id: product.product_product_7 + product_uom_qty: 8 + location_id: stock.stock_location_shop1 +- + When I confirm the sale order +- + !workflow {model: sale.order, action: order_confirm, ref: sale_source_01} +- + Then a delivery order should have been generated +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_source_01")) + assert len(sale_order.picking_ids) == 1, ( + "1 delivery order expected, got %d" % len(sale_order.picking_ids)) +- + And the source location of the stock move should be the one of + the sale order line +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_source_01")) + picking = sale_order.picking_ids[0] + for move in picking.move_lines: + expected_location_id = move.sale_line_id.location_id + assert move.location_id == expected_location_id, ( + "Wrong location_id in stock.move, expected %s, got %s" % + (expected_location_id, move.location_id)) + for procurement in move.procurements: + assert procurement.location_id == expected_location_id, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (expected_location_id, procurement.location_id)) + diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml new file mode 100644 index 00000000000..c60e8d3cb5b --- /dev/null +++ b/sale_sourced_by_line/view/sale_view.xml @@ -0,0 +1,27 @@ + + + + + sale.order.form + sale.order + + + + + + + + + sale.order.form + sale.order + + + + + + + + + From fd694bcf04f04879cf8a61ca2d368bc6972a07c7 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 8 Aug 2013 08:48:45 +0200 Subject: [PATCH 02/60] [FIX] the complexity 'advanced' does not exist, that's 'expert' (/tmp/trunk-generic/ rev 29) --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 325f9593c0d..384a15de9d2 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -24,7 +24,7 @@ 'author': 'Camptocamp', 'category': 'Warehouse', 'license': 'AGPL-3', - 'complexity': 'advanced', + 'complexity': 'expert', 'images': [], 'website': "http://www.camptocamp.com", 'description': """ From f81cffa41d55566258a20f2bde046c1f35d0a87d Mon Sep 17 00:00:00 2001 From: Joel Grand-Guillaume Date: Fri, 6 Sep 2013 13:35:03 +0200 Subject: [PATCH 03/60] [FIX] Forbid to select location view in sale source by line on SO Lines (/tmp/trunk-generic/ rev 29.1.20) --- sale_sourced_by_line/view/sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index c60e8d3cb5b..d3b4efe2de3 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -19,7 +19,7 @@ - + From dff979de3c19a01857876355c764c97b071ae792 Mon Sep 17 00:00:00 2001 From: Joel Grand-Guillaume Date: Fri, 1 Nov 2013 14:40:24 +0100 Subject: [PATCH 04/60] [MRG] from trunk (/tmp/trunk-generic/ rev 40.1.6) --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 384a15de9d2..806aa3f5fb1 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -44,5 +44,5 @@ 'test/sale_order_not_sourced.yml', ], 'auto_install': False, - 'installable': True, + 'installable': False, } From 09b7c87fb95ab5c578bbdcc0749de38421a5c19e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2013 10:10:21 +0100 Subject: [PATCH 05/60] [FIX] set installable to True --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 806aa3f5fb1..384a15de9d2 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -44,5 +44,5 @@ 'test/sale_order_not_sourced.yml', ], 'auto_install': False, - 'installable': False, + 'installable': True, } From affcdc1eb0656c929c1deb7c170216367c7327e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2013 13:38:21 +0100 Subject: [PATCH 06/60] [RM] sale_stock_ownership moved to https://launchpad.net/purchase-wkfl --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 384a15de9d2..806aa3f5fb1 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -44,5 +44,5 @@ 'test/sale_order_not_sourced.yml', ], 'auto_install': False, - 'installable': True, + 'installable': False, } From 06b664715cc17e645e04b8248a006dc32c4ad717 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 11 Dec 2013 21:05:31 +0100 Subject: [PATCH 07/60] [FIX] set installable --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 806aa3f5fb1..384a15de9d2 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -44,5 +44,5 @@ 'test/sale_order_not_sourced.yml', ], 'auto_install': False, - 'installable': False, + 'installable': True, } From da7bbfa0c73d2c29d53c600abf1548099b5b9bde Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Thu, 7 Aug 2014 12:23:36 +0200 Subject: [PATCH 08/60] [FIX] repository PEP8 --- sale_sourced_by_line/__init__.py | 4 ++-- sale_sourced_by_line/__openerp__.py | 4 ++-- sale_sourced_by_line/model/__init__.py | 4 ++-- sale_sourced_by_line/model/sale.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sale_sourced_by_line/__init__.py b/sale_sourced_by_line/__init__.py index 643bee7abed..c09d73c4161 100644 --- a/sale_sourced_by_line/__init__.py +++ b/sale_sourced_by_line/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## +# # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA @@ -17,6 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # -############################################################################## +# from . import model diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 384a15de9d2..2038b55d71b 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## +# # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # -############################################################################## +# {'name': 'Sale Sourced by Line', 'version': '0.1', diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py index d65199e72a4..d5d7f376f0f 100644 --- a/sale_sourced_by_line/model/__init__.py +++ b/sale_sourced_by_line/model/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## +# # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA @@ -17,6 +17,6 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # -############################################################################## +# from . import sale diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index d49549f7a09..4f75d283445 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -############################################################################## +# # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA @@ -17,7 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # -############################################################################## +# from openerp.osv import orm, fields From 1e01db3d66c9e5a32db986ffd4f5ab6e976e1a1d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 8 Aug 2014 01:58:03 +0200 Subject: [PATCH 09/60] - Set as uninstallable and moved to __unported__ dir all modules. - Update travis.yml to 8.0 --- sale_sourced_by_line/__init__.py | 22 -------- sale_sourced_by_line/__openerp__.py | 48 ----------------- sale_sourced_by_line/model/__init__.py | 22 -------- sale_sourced_by_line/model/sale.py | 54 ------------------- .../test/sale_order_not_sourced.yml | 38 ------------- .../test/sale_order_source.yml | 40 -------------- sale_sourced_by_line/view/sale_view.xml | 27 ---------- 7 files changed, 251 deletions(-) delete mode 100644 sale_sourced_by_line/__init__.py delete mode 100644 sale_sourced_by_line/__openerp__.py delete mode 100644 sale_sourced_by_line/model/__init__.py delete mode 100644 sale_sourced_by_line/model/sale.py delete mode 100644 sale_sourced_by_line/test/sale_order_not_sourced.yml delete mode 100644 sale_sourced_by_line/test/sale_order_source.yml delete mode 100644 sale_sourced_by_line/view/sale_view.xml diff --git a/sale_sourced_by_line/__init__.py b/sale_sourced_by_line/__init__.py deleted file mode 100644 index c09d73c4161..00000000000 --- a/sale_sourced_by_line/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA -# -# 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 . import model diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py deleted file mode 100644 index 2038b55d71b..00000000000 --- a/sale_sourced_by_line/__openerp__.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA -# -# 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': 'Sale Sourced by Line', - 'version': '0.1', - 'author': 'Camptocamp', - 'category': 'Warehouse', - 'license': 'AGPL-3', - 'complexity': 'expert', - 'images': [], - 'website': "http://www.camptocamp.com", - 'description': """ -Sale Sourced by Line -==================== - -Adds the possibility to source a line of sale order from a specific -location instead of using the location of the warehouse of the selected -shop -""", - 'depends': ['sale_stock', - ], - 'demo': [], - 'data': ['view/sale_view.xml', - ], - 'test': ['test/sale_order_source.yml', - 'test/sale_order_not_sourced.yml', - ], - 'auto_install': False, - 'installable': True, - } diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py deleted file mode 100644 index d5d7f376f0f..00000000000 --- a/sale_sourced_by_line/model/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA -# -# 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 . import sale diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py deleted file mode 100644 index 4f75d283445..00000000000 --- a/sale_sourced_by_line/model/sale.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA -# -# 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.osv import orm, fields - - -class sale_order(orm.Model): - _inherit = 'sale.order' - - def _prepare_order_line_move(self, cr, uid, order, line, picking_id, - date_planned, context=None): - values = super(sale_order, self)._prepare_order_line_move( - cr, uid, order, line, picking_id, date_planned, context=context) - if line.location_id: - values['location_id'] = line.location_id.id - return values - - def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, - date_planned, context=None): - values = super(sale_order, self)._prepare_order_line_procurement( - cr, uid, order, line, move_id, date_planned, context=context) - if line.location_id: - values['location_id'] = line.location_id.id - return values - - -class sale_order_line(orm.Model): - _inherit = 'sale.order.line' - - _columns = { - 'location_id': fields.many2one( - 'stock.location', - 'Source Location', - help="If a source location is selected, " - "it will be used as source of the stock moves. "), - } diff --git a/sale_sourced_by_line/test/sale_order_not_sourced.yml b/sale_sourced_by_line/test/sale_order_not_sourced.yml deleted file mode 100644 index 97aca450fc7..00000000000 --- a/sale_sourced_by_line/test/sale_order_not_sourced.yml +++ /dev/null @@ -1,38 +0,0 @@ -- - In order to check if the source location of a sale order line - still use the location of the shop if not specified on the - sale order line. -- - !record {model: sale.order, id: sale_notsourced_01}: - partner_id: base.res_partner_2 - note: Invoice after delivery - order_line: - - product_id: product.product_product_7 - product_uom_qty: 8 -- - When I confirm the sale order -- - !workflow {model: sale.order, action: order_confirm, ref: sale_notsourced_01} -- - Then a delivery order should have been generated -- - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) - assert len(sale_order.picking_ids) == 1, ( - "1 delivery order expected, got %d" % len(sale_order.picking_ids)) -- - And the source location of the stock move should be the one of - the sales order's shop -- - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) - picking = sale_order.picking_ids[0] - location_id = sale_order.shop_id.warehouse_id.lot_stock_id - for move in picking.move_lines: - assert move.location_id == location_id, ( - "Wrong location_id, expected %s, got %s" % - (location_id, move.location_id)) - for procurement in move.procurements: - assert procurement.location_id == location_id, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (location_id, procurement.location_id)) diff --git a/sale_sourced_by_line/test/sale_order_source.yml b/sale_sourced_by_line/test/sale_order_source.yml deleted file mode 100644 index ac2572cd117..00000000000 --- a/sale_sourced_by_line/test/sale_order_source.yml +++ /dev/null @@ -1,40 +0,0 @@ -- - In order to check if the source location of a sale order line - becomes the source location of the delivery stock move. - I create a sale order. -- - !record {model: sale.order, id: sale_source_01}: - partner_id: base.res_partner_2 - note: Invoice after delivery - order_line: - - product_id: product.product_product_7 - product_uom_qty: 8 - location_id: stock.stock_location_shop1 -- - When I confirm the sale order -- - !workflow {model: sale.order, action: order_confirm, ref: sale_source_01} -- - Then a delivery order should have been generated -- - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_source_01")) - assert len(sale_order.picking_ids) == 1, ( - "1 delivery order expected, got %d" % len(sale_order.picking_ids)) -- - And the source location of the stock move should be the one of - the sale order line -- - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_source_01")) - picking = sale_order.picking_ids[0] - for move in picking.move_lines: - expected_location_id = move.sale_line_id.location_id - assert move.location_id == expected_location_id, ( - "Wrong location_id in stock.move, expected %s, got %s" % - (expected_location_id, move.location_id)) - for procurement in move.procurements: - assert procurement.location_id == expected_location_id, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (expected_location_id, procurement.location_id)) - diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml deleted file mode 100644 index d3b4efe2de3..00000000000 --- a/sale_sourced_by_line/view/sale_view.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - sale.order.form - sale.order - - - - - - - - - sale.order.form - sale.order - - - - - - - - - From 29b3fee84849a909c46a744225d0ffc57ae3034d Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Mon, 13 Oct 2014 13:29:12 +0200 Subject: [PATCH 10/60] reactivate module sale_sourced_by_line --- sale_sourced_by_line/__init__.py | 22 ++++++++ sale_sourced_by_line/__openerp__.py | 48 +++++++++++++++++ sale_sourced_by_line/model/__init__.py | 22 ++++++++ sale_sourced_by_line/model/sale.py | 54 +++++++++++++++++++ .../test/sale_order_not_sourced.yml | 38 +++++++++++++ .../test/sale_order_source.yml | 40 ++++++++++++++ sale_sourced_by_line/view/sale_view.xml | 27 ++++++++++ 7 files changed, 251 insertions(+) create mode 100644 sale_sourced_by_line/__init__.py create mode 100644 sale_sourced_by_line/__openerp__.py create mode 100644 sale_sourced_by_line/model/__init__.py create mode 100644 sale_sourced_by_line/model/sale.py create mode 100644 sale_sourced_by_line/test/sale_order_not_sourced.yml create mode 100644 sale_sourced_by_line/test/sale_order_source.yml create mode 100644 sale_sourced_by_line/view/sale_view.xml diff --git a/sale_sourced_by_line/__init__.py b/sale_sourced_by_line/__init__.py new file mode 100644 index 00000000000..c09d73c4161 --- /dev/null +++ b/sale_sourced_by_line/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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 . import model diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py new file mode 100644 index 00000000000..2038b55d71b --- /dev/null +++ b/sale_sourced_by_line/__openerp__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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': 'Sale Sourced by Line', + 'version': '0.1', + 'author': 'Camptocamp', + 'category': 'Warehouse', + 'license': 'AGPL-3', + 'complexity': 'expert', + 'images': [], + 'website': "http://www.camptocamp.com", + 'description': """ +Sale Sourced by Line +==================== + +Adds the possibility to source a line of sale order from a specific +location instead of using the location of the warehouse of the selected +shop +""", + 'depends': ['sale_stock', + ], + 'demo': [], + 'data': ['view/sale_view.xml', + ], + 'test': ['test/sale_order_source.yml', + 'test/sale_order_not_sourced.yml', + ], + 'auto_install': False, + 'installable': True, + } diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py new file mode 100644 index 00000000000..d5d7f376f0f --- /dev/null +++ b/sale_sourced_by_line/model/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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 . import sale diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py new file mode 100644 index 00000000000..4f75d283445 --- /dev/null +++ b/sale_sourced_by_line/model/sale.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Guewen Baconnier +# Copyright 2013 Camptocamp SA +# +# 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.osv import orm, fields + + +class sale_order(orm.Model): + _inherit = 'sale.order' + + def _prepare_order_line_move(self, cr, uid, order, line, picking_id, + date_planned, context=None): + values = super(sale_order, self)._prepare_order_line_move( + cr, uid, order, line, picking_id, date_planned, context=context) + if line.location_id: + values['location_id'] = line.location_id.id + return values + + def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, + date_planned, context=None): + values = super(sale_order, self)._prepare_order_line_procurement( + cr, uid, order, line, move_id, date_planned, context=context) + if line.location_id: + values['location_id'] = line.location_id.id + return values + + +class sale_order_line(orm.Model): + _inherit = 'sale.order.line' + + _columns = { + 'location_id': fields.many2one( + 'stock.location', + 'Source Location', + help="If a source location is selected, " + "it will be used as source of the stock moves. "), + } diff --git a/sale_sourced_by_line/test/sale_order_not_sourced.yml b/sale_sourced_by_line/test/sale_order_not_sourced.yml new file mode 100644 index 00000000000..97aca450fc7 --- /dev/null +++ b/sale_sourced_by_line/test/sale_order_not_sourced.yml @@ -0,0 +1,38 @@ +- + In order to check if the source location of a sale order line + still use the location of the shop if not specified on the + sale order line. +- + !record {model: sale.order, id: sale_notsourced_01}: + partner_id: base.res_partner_2 + note: Invoice after delivery + order_line: + - product_id: product.product_product_7 + product_uom_qty: 8 +- + When I confirm the sale order +- + !workflow {model: sale.order, action: order_confirm, ref: sale_notsourced_01} +- + Then a delivery order should have been generated +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) + assert len(sale_order.picking_ids) == 1, ( + "1 delivery order expected, got %d" % len(sale_order.picking_ids)) +- + And the source location of the stock move should be the one of + the sales order's shop +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) + picking = sale_order.picking_ids[0] + location_id = sale_order.shop_id.warehouse_id.lot_stock_id + for move in picking.move_lines: + assert move.location_id == location_id, ( + "Wrong location_id, expected %s, got %s" % + (location_id, move.location_id)) + for procurement in move.procurements: + assert procurement.location_id == location_id, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (location_id, procurement.location_id)) diff --git a/sale_sourced_by_line/test/sale_order_source.yml b/sale_sourced_by_line/test/sale_order_source.yml new file mode 100644 index 00000000000..ac2572cd117 --- /dev/null +++ b/sale_sourced_by_line/test/sale_order_source.yml @@ -0,0 +1,40 @@ +- + In order to check if the source location of a sale order line + becomes the source location of the delivery stock move. + I create a sale order. +- + !record {model: sale.order, id: sale_source_01}: + partner_id: base.res_partner_2 + note: Invoice after delivery + order_line: + - product_id: product.product_product_7 + product_uom_qty: 8 + location_id: stock.stock_location_shop1 +- + When I confirm the sale order +- + !workflow {model: sale.order, action: order_confirm, ref: sale_source_01} +- + Then a delivery order should have been generated +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_source_01")) + assert len(sale_order.picking_ids) == 1, ( + "1 delivery order expected, got %d" % len(sale_order.picking_ids)) +- + And the source location of the stock move should be the one of + the sale order line +- + !python {model: sale.order}: | + sale_order = self.browse(cr, uid, ref("sale_source_01")) + picking = sale_order.picking_ids[0] + for move in picking.move_lines: + expected_location_id = move.sale_line_id.location_id + assert move.location_id == expected_location_id, ( + "Wrong location_id in stock.move, expected %s, got %s" % + (expected_location_id, move.location_id)) + for procurement in move.procurements: + assert procurement.location_id == expected_location_id, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (expected_location_id, procurement.location_id)) + diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml new file mode 100644 index 00000000000..d3b4efe2de3 --- /dev/null +++ b/sale_sourced_by_line/view/sale_view.xml @@ -0,0 +1,27 @@ + + + + + sale.order.form + sale.order + + + + + + + + + sale.order.form + sale.order + + + + + + + + + From fef5f869b8b7c7f71eb2bdad35547dee5b84db9b Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Mon, 13 Oct 2014 13:54:09 +0200 Subject: [PATCH 11/60] port sale_sourced_by_line to 8.0 Now allows to set a warehouse on sale order line Added a test for sale order with multiple warehouses sources --- sale_sourced_by_line/__openerp__.py | 19 +- sale_sourced_by_line/model/__init__.py | 3 +- sale_sourced_by_line/model/sale.py | 163 +++++++++++++++--- sale_sourced_by_line/model/stock.py | 87 ++++++++++ .../test/sale_order_multi_source.yml | 41 +++++ .../test/sale_order_not_sourced.yml | 22 ++- .../test/sale_order_source.yml | 34 ++-- sale_sourced_by_line/view/sale_view.xml | 4 +- 8 files changed, 316 insertions(+), 57 deletions(-) create mode 100644 sale_sourced_by_line/model/stock.py create mode 100644 sale_sourced_by_line/test/sale_order_multi_source.yml diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 2038b55d71b..0df5b863cc3 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -2,7 +2,7 @@ # # # Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA +# Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,6 +20,7 @@ # {'name': 'Sale Sourced by Line', + 'summary': 'Multiple warehouse source locations for Sale order', 'version': '0.1', 'author': 'Camptocamp', 'category': 'Warehouse', @@ -32,8 +33,19 @@ ==================== Adds the possibility to source a line of sale order from a specific -location instead of using the location of the warehouse of the selected -shop +warehouse instead of using the warehouse of the sale order. + +This will create one procurement group per warehouse set in sale +order lines. + +It will only supports routes such as MTO and Drop Shipping. + +Contributors +------------ + +* Guewen Baconnier +* Yannick Vaucher + """, 'depends': ['sale_stock', ], @@ -41,6 +53,7 @@ 'data': ['view/sale_view.xml', ], 'test': ['test/sale_order_source.yml', + 'test/sale_order_multi_source.yml', 'test/sale_order_not_sourced.yml', ], 'auto_install': False, diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py index d5d7f376f0f..42c4b8f63d0 100644 --- a/sale_sourced_by_line/model/__init__.py +++ b/sale_sourced_by_line/model/__init__.py @@ -2,7 +2,7 @@ # # # Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA +# Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,3 +20,4 @@ # from . import sale +from . import stock diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 4f75d283445..a91d03028bb 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # # -# Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA +# Author: Guewen Baconnier, Yannick Vaucher +# Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -25,30 +25,153 @@ class sale_order(orm.Model): _inherit = 'sale.order' - def _prepare_order_line_move(self, cr, uid, order, line, picking_id, - date_planned, context=None): - values = super(sale_order, self)._prepare_order_line_move( - cr, uid, order, line, picking_id, date_planned, context=context) - if line.location_id: - values['location_id'] = line.location_id.id - return values - - def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, - date_planned, context=None): + def _prepare_order_line_procurement(self, cr, uid, order, line, + group_id=False, context=None): values = super(sale_order, self)._prepare_order_line_procurement( - cr, uid, order, line, move_id, date_planned, context=context) - if line.location_id: - values['location_id'] = line.location_id.id + cr, uid, order, line, group_id=group_id, context=context) + if line.warehouse_id: + values['warehouse_id'] = line.warehouse_id.id return values + ### + # OVERRIDE to consider sale_order's warehouse_id as default + ### + def action_ship_create(self, cr, uid, ids, context=None): + """Create the required procurements to supply sales order lines, also + connecting the procurements to appropriate stock moves in order to + bring the goods to the sales order's requested location. + + :return: True + """ + procurement_obj = self.pool.get('procurement.order') + sale_line_obj = self.pool.get('sale.order.line') + for order in self.browse(cr, uid, ids, context=context): + proc_ids = [] + + groups = {} + + for line in order.order_line: + group_id = groups.get(line.warehouse_id) + if not group_id: + vals = self._prepare_procurement_group(cr, uid, order, + context=context) + group_id = self.pool["procurement.group"].create( + cr, uid, vals, context=context) + groups[line.warehouse_id] = group_id + line.write({'procurement_group_id': group_id}) + # Try to fix exception procurement (possible when after a + # shipping exception the user choose to recreate) + if line.procurement_ids: + # first check them to see if they are in exception or not + # (one of the related moves is cancelled) + procurement_obj.check( + cr, uid, [x.id for x in line.procurement_ids + if x.state not in ['cancel', 'done']]) + line.refresh() + # run again procurement that are in exception in order to + # trigger another move + proc_ids += [x.id for x in line.procurement_ids + if x.state in ('exception', 'cancel')] + elif sale_line_obj.need_procurement(cr, uid, [line.id], + context=context): + if (line.state == 'done') or not line.product_id: + continue + vals = self._prepare_order_line_procurement( + cr, uid, order, line, + group_id=group_id, context=context) + proc_id = procurement_obj.create( + cr, uid, vals, context=context) + proc_ids.append(proc_id) + # Confirm procurement order such that rules will be applied on it + # note that the workflow normally ensure proc_ids isn't an empty + # list + procurement_obj.run(cr, uid, proc_ids, context=context) + + # if shipping was in exception and the user choose to recreate the + # delivery order, write the new status of SO + if order.state == 'shipping_except': + val = {'state': 'progress', 'shipped': False} + + if (order.order_policy == 'manual'): + for line in order.order_line: + if ((not line.invoiced) + and (line.state not in ('cancel', 'draft'))): + val['state'] = 'manual' + break + order.write(val) + return True + + ### + # OVERRIDE to use sale.order.line's procurement_group_id from lines + ### + def _get_shipped(self, cr, uid, ids, name, args, context=None): + res = {} + for sale in self.browse(cr, uid, ids, context=context): + groups = set([line.procurement_group_id + for line in sale.order_line]) + is_shipped = False + for group in groups: + if group: + is_shipped &= all([proc.state in ['cancel', 'done'] + for proc in group.procurement_ids]) + res[sale.id] = is_shipped + return res + + def _get_orders_procurements(self, cr, uid, ids, context=None): + res = set() + proc_orders = self.pool['procurement.order'].browse( + cr, uid, ids, context=context) + for proc in proc_orders: + if proc.state == 'done' and proc.sale_line_id: + res.add(proc.sale_line_id.order_id.id) + return list(res) + + ### + # OVERRIDE to find sale.order.line's picking + ### + def _get_picking_ids(self, cr, uid, ids, name, args, context=None): + res = {} + for sale in self.browse(cr, uid, ids, context=context): + group_ids = set([line.procurement_group_id.id + for line in sale.order_line + if line.procurement_group_id]) + if not any(group_ids): + res[sale.id] = [] + continue + res[sale.id] = self.pool['stock.picking'].search( + cr, uid, [('group_id', 'in', list(group_ids))], + context=context) + return res + + _columns = { + 'warehouse_id': fields.many2one( + 'stock.warehouse', + 'Default Warehouse', + help="If no source warehouse is selected on line, " + "this warehouse is used as default. "), + 'shipped': fields.function( + _get_shipped, string='Delivered', type='boolean', + store={ + 'procurement.order': (_get_orders_procurements, ['state'], 10) + }), + 'picking_ids': fields.function( + _get_picking_ids, method=True, type='one2many', + relation='stock.picking', + string='Picking associated to this sale'), + } + class sale_order_line(orm.Model): _inherit = 'sale.order.line' _columns = { - 'location_id': fields.many2one( - 'stock.location', - 'Source Location', - help="If a source location is selected, " - "it will be used as source of the stock moves. "), + 'warehouse_id': fields.many2one( + 'stock.warehouse', + 'Source Warehouse', + help="If a source warehouse is selected, " + "it will be used to define the route. "), + 'procurement_group_id': fields.many2one( + 'procurement.group', + 'Procurement group', + copy=False), } diff --git a/sale_sourced_by_line/model/stock.py b/sale_sourced_by_line/model/stock.py new file mode 100644 index 00000000000..bc92f68d186 --- /dev/null +++ b/sale_sourced_by_line/model/stock.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Yannick Vaucher +# Copyright 2014 Camptocamp SA +# +# 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 . +# +# +''' +Redefine and override all sale_stock picking method to search procurement +group on sale order line instead of on the sale order +''' +from openerp.osv import orm, fields + + +class stock_picking(orm.Model): + _inherit = "stock.picking" + + def _get_partner_to_invoice(self, cr, uid, picking, context=None): + """ Inherit the original function of the 'stock' module + We select the partner of the sales order as the partner of the + customer invoice + """ + sale_line_obj = self.pool['sale.order.line'] + line_ids = sale_line_obj.search( + cr, uid, [('procurement_group_id', '=', picking.group_id.id)], + context=context) + if line_ids: + lines = sale_line_obj.browse(cr, uid, line_ids, context=context) + saleorder = lines[0].order_id + return saleorder.partner_invoice_id.id + return super(stock_picking, self)._get_partner_to_invoice( + cr, uid, picking, context=context) + + def _get_sale_id(self, cr, uid, ids, name, args, context=None): + sale_line_obj = self.pool['sale.order.line'] + res = {} + for picking in self.browse(cr, uid, ids, context=context): + res[picking.id] = False + if picking.group_id: + line_ids = sale_line_obj.search( + cr, uid, + [('procurement_group_id', '=', picking.group_id.id)], + context=context) + if line_ids: + lines = sale_line_obj.browse(cr, uid, line_ids, + context=context) + res[picking.id] = lines[0].order_id + return res + + _columns = { + 'sale_id': fields.function( + _get_sale_id, type="many2one", + relation="sale.order", string="Sale Order"), + } + + def _create_invoice_from_picking(self, cr, uid, picking, vals, + context=None): + sale_line_obj = self.pool['sale.order.line'] + invoice_line_obj = self.pool.get('account.invoice.line') + invoice_id = super(stock_picking, self)._create_invoice_from_picking( + cr, uid, picking, vals, context=context) + if picking.group_id: + line_ids = sale_line_obj.search( + cr, uid, [('procurement_group_id', '=', picking.group_id.id), + ('product_id.type', '=', 'service'), + ('invoiced', '=', False)], context=context) + + if line_ids: + created_lines = sale_line_obj.invoice_line_create( + cr, uid, line_ids, context=context) + invoice_line_obj.write( + cr, uid, created_lines, {'invoice_id': invoice_id}, + context=context) + return invoice_id diff --git a/sale_sourced_by_line/test/sale_order_multi_source.yml b/sale_sourced_by_line/test/sale_order_multi_source.yml new file mode 100644 index 00000000000..2a3cccd0e20 --- /dev/null +++ b/sale_sourced_by_line/test/sale_order_multi_source.yml @@ -0,0 +1,41 @@ +- + In order to check if the source warehouse of a sale order line + becomes the source warehouse of the delivery stock move. + I create a sale order. +- + !record {model: sale.order, id: sale_multi_source_01}: + partner_id: base.res_partner_2 + note: Invoice after delivery + order_line: + - product_id: product.product_product_32 + product_uom_qty: 8 + warehouse_id: stock.stock_warehouse_shop0 + - product_id: product.product_product_24 + product_uom_qty: 18 + warehouse_id: stock.warehouse0 +- + When I confirm the sale order +- + !workflow {model: sale.order, action: order_confirm, ref: sale_multi_source_01} +- + Then a delivery order should have been generated +- + !python {model: sale.order, id: sale_multi_source_01}: | + assert len(self.picking_ids) == 2, ( + "2 delivery order expected, got %d" % len(self.picking_ids)) +- + And the source location of the stock move should be the one of + the sale order line +- + !python {model: sale.order, id: sale_multi_source_01}: | + for line in self.order_line: + expected_location = line.warehouse_id.lot_stock_id + for pick in self.picking_ids: + for move in pick.move_lines: + if line.product_id == move.product_id: + assert move.location_id == expected_location, ( + "Wrong location_id in stock.move, expected %s, got %s" % + (expected_location, move.location_id)) + assert move.procurement_id.rule_id.location_src_id == expected_location, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (expected_location, move.procurement_id.rule_id.location_src_id)) diff --git a/sale_sourced_by_line/test/sale_order_not_sourced.yml b/sale_sourced_by_line/test/sale_order_not_sourced.yml index 97aca450fc7..3315d2c3cad 100644 --- a/sale_sourced_by_line/test/sale_order_not_sourced.yml +++ b/sale_sourced_by_line/test/sale_order_not_sourced.yml @@ -7,7 +7,7 @@ partner_id: base.res_partner_2 note: Invoice after delivery order_line: - - product_id: product.product_product_7 + - product_id: product.product_product_32 product_uom_qty: 8 - When I confirm the sale order @@ -22,17 +22,15 @@ "1 delivery order expected, got %d" % len(sale_order.picking_ids)) - And the source location of the stock move should be the one of - the sales order's shop + the sales order's warehouse - - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) - picking = sale_order.picking_ids[0] - location_id = sale_order.shop_id.warehouse_id.lot_stock_id + !python {model: sale.order, id: sale_notsourced_01}: | + picking = self.picking_ids[0] + expected_location = self.warehouse_id.lot_stock_id for move in picking.move_lines: - assert move.location_id == location_id, ( + assert move.location_id == expected_location, ( "Wrong location_id, expected %s, got %s" % - (location_id, move.location_id)) - for procurement in move.procurements: - assert procurement.location_id == location_id, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (location_id, procurement.location_id)) + (expected_location, move.location_id)) + assert move.procurement_id.rule_id.location_src_id == expected_location, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (expected_location, move.procurement_id.rule_id.location_src_id)) diff --git a/sale_sourced_by_line/test/sale_order_source.yml b/sale_sourced_by_line/test/sale_order_source.yml index ac2572cd117..e482db0fb4b 100644 --- a/sale_sourced_by_line/test/sale_order_source.yml +++ b/sale_sourced_by_line/test/sale_order_source.yml @@ -1,15 +1,15 @@ - - In order to check if the source location of a sale order line - becomes the source location of the delivery stock move. + In order to check if the source warehouse of a sale order line + becomes the source warehouse of the delivery stock move. I create a sale order. - !record {model: sale.order, id: sale_source_01}: partner_id: base.res_partner_2 note: Invoice after delivery order_line: - - product_id: product.product_product_7 + - product_id: product.product_product_32 product_uom_qty: 8 - location_id: stock.stock_location_shop1 + warehouse_id: stock.stock_warehouse_shop0 - When I confirm the sale order - @@ -17,24 +17,20 @@ - Then a delivery order should have been generated - - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_source_01")) - assert len(sale_order.picking_ids) == 1, ( - "1 delivery order expected, got %d" % len(sale_order.picking_ids)) + !python {model: sale.order, id: sale_source_01}: | + assert len(self.picking_ids) == 1, ( + "1 delivery order expected, got %d" % len(self.picking_ids)) - And the source location of the stock move should be the one of the sale order line - - !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_source_01")) - picking = sale_order.picking_ids[0] + !python {model: sale.order, id: sale_source_01}: | + picking = self.picking_ids[0] for move in picking.move_lines: - expected_location_id = move.sale_line_id.location_id - assert move.location_id == expected_location_id, ( + expected_location = move.warehouse_id.lot_stock_id + assert move.location_id == expected_location, ( "Wrong location_id in stock.move, expected %s, got %s" % - (expected_location_id, move.location_id)) - for procurement in move.procurements: - assert procurement.location_id == expected_location_id, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (expected_location_id, procurement.location_id)) - + (expected_location, move.location_id)) + assert move.procurement_id.rule_id.location_src_id == expected_location, ( + "Wrong location_id in procurement.order, expected %s, got %s" % + (expected_location, move.procurement_id.rule_id.location_src_id)) diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index d3b4efe2de3..21ef0a29e83 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -8,7 +8,7 @@ - + @@ -19,7 +19,7 @@ - + From b5ba9037b1787957f48136904a553220a2e623ed Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Mon, 13 Oct 2014 17:51:44 +0200 Subject: [PATCH 12/60] move warehouse_id above route_id field in view --- sale_sourced_by_line/view/sale_view.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index 21ef0a29e83..38af5c58ad7 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -15,10 +15,10 @@ sale.order.form sale.order - + - + From 8f4d771b4c8a06702477c64312cd80454964fbbc Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 14 Oct 2014 09:55:36 +0200 Subject: [PATCH 13/60] improve warehouse help tooltip --- sale_sourced_by_line/model/sale.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index a91d03028bb..40ce5b4a7f0 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -169,7 +169,9 @@ class sale_order_line(orm.Model): 'stock.warehouse', 'Source Warehouse', help="If a source warehouse is selected, " - "it will be used to define the route. "), + "it will be used to define the route. " + "Otherwise, it will get the warehouse of " + "the sale order"), 'procurement_group_id': fields.many2one( 'procurement.group', 'Procurement group', From 5a6c25e408c815a6dfd7dfde9ece2481ba86a803 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 14 Oct 2014 10:08:50 +0200 Subject: [PATCH 14/60] Add POT file --- .../i18n/sale_sourced_by_line.pot | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sale_sourced_by_line/i18n/sale_sourced_by_line.pot diff --git a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot new file mode 100644 index 00000000000..e33e2a90bd7 --- /dev/null +++ b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-14 08:07+0000\n" +"PO-Revision-Date: 2014-10-14 08:07+0000\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: sale_sourced_by_line +#: help:sale.order.line,warehouse_id:0 +msgid "If a source warehouse is selected, it will be used to define the route. Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_stock_picking +msgid "Picking List" +msgstr "" + +#. module: sale_sourced_by_line +#: field:sale.order.line,procurement_group_id:0 +msgid "Procurement group" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: field:sale.order.line,warehouse_id:0 +msgid "Source Warehouse" +msgstr "" + From 73e14670570fdaf313b7edf127f858a69c2c2d19 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 14 Oct 2014 10:20:15 +0200 Subject: [PATCH 15/60] bump version --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 0df5b863cc3..4c99ed8fca7 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -21,7 +21,7 @@ {'name': 'Sale Sourced by Line', 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '0.1', + 'version': '1.0', 'author': 'Camptocamp', 'category': 'Warehouse', 'license': 'AGPL-3', From 6cc0fc32b3326cdbe723e691996826b21e994f27 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 14 Oct 2014 14:31:49 +0200 Subject: [PATCH 16/60] put default warehouse_id of sale order in warehouse_id of sale order line --- sale_sourced_by_line/view/sale_view.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index 38af5c58ad7..3682fba21c5 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -21,6 +21,9 @@ position="before"> + + {'default_warehouse_id': warehouse_id} + From 4ec0f6475f23e556834966cb991b5a75f44a1573 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 20 Nov 2014 16:56:49 +0100 Subject: [PATCH 17/60] Give positive attitude to method is_shipped which was always False. --- sale_sourced_by_line/model/sale.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 40ce5b4a7f0..5746e993709 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -105,15 +105,33 @@ def action_ship_create(self, cr, uid, ids, context=None): # OVERRIDE to use sale.order.line's procurement_group_id from lines ### def _get_shipped(self, cr, uid, ids, name, args, context=None): + """ As procurement is per sale line basis, we check each line + + If at least a line has no procurement group defined, it means it + isn't shipped yet. + + Only when all procurement are done or cancelled, we consider + the sale order as being shipped. + + And if there is no line, we have nothing to ship, thus it isn't + shipped. + + """ res = {} for sale in self.browse(cr, uid, ids, context=context): + if not sale.order_line: + res[sale.id] = False + continue + groups = set([line.procurement_group_id for line in sale.order_line]) - is_shipped = False + is_shipped = True for group in groups: - if group: - is_shipped &= all([proc.state in ['cancel', 'done'] - for proc in group.procurement_ids]) + if not group: + is_shipped = False + break + is_shipped &= all([proc.state in ['cancel', 'done'] + for proc in group.procurement_ids]) res[sale.id] = is_shipped return res From eff32fe5d15f761ea047640dfd8880258863f15d Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Fri, 28 Nov 2014 15:13:32 +0100 Subject: [PATCH 18/60] add states readonly to default warehouse --- sale_sourced_by_line/model/sale.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 5746e993709..440bdd44dfc 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -161,10 +161,20 @@ def _get_picking_ids(self, cr, uid, ids, name, args, context=None): context=context) return res + SO_STATES = { + 'cancel': [('readonly', True)], + 'progress': [('readonly', True)], + 'manual': [('readonly', True)], + 'shipping_except': [('readonly', True)], + 'invoice_except': [('readonly', True)], + 'done': [('readonly', True)], + } + _columns = { 'warehouse_id': fields.many2one( 'stock.warehouse', 'Default Warehouse', + states=SO_STATES, help="If no source warehouse is selected on line, " "this warehouse is used as default. "), 'shipped': fields.function( From efedbb3ff4af9eb26d4aceb0126e4fb9b057ae1b Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Mon, 16 Feb 2015 10:19:51 +0100 Subject: [PATCH 19/60] fix pep8 W503 --- sale_sourced_by_line/model/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 440bdd44dfc..15a27fc256c 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -94,8 +94,8 @@ def action_ship_create(self, cr, uid, ids, context=None): if (order.order_policy == 'manual'): for line in order.order_line: - if ((not line.invoiced) - and (line.state not in ('cancel', 'draft'))): + if (not line.invoiced and + line.state not in ('cancel', 'draft')): val['state'] = 'manual' break order.write(val) From 6183d7b8644bbf040cb9562b1189a7114e28f261 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 27 Nov 2014 14:57:08 +0100 Subject: [PATCH 20/60] Port shipped field to new API to ease testing --- sale_sourced_by_line/model/sale.py | 67 +++++++++++++----------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 15a27fc256c..c619f8c5dda 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -19,10 +19,11 @@ # # -from openerp.osv import orm, fields +from openerp import models, api, fields, osv +from openerp.osv import orm -class sale_order(orm.Model): +class sale_order(models.Model): _inherit = 'sale.order' def _prepare_order_line_procurement(self, cr, uid, order, line, @@ -104,7 +105,9 @@ def action_ship_create(self, cr, uid, ids, context=None): ### # OVERRIDE to use sale.order.line's procurement_group_id from lines ### - def _get_shipped(self, cr, uid, ids, name, args, context=None): + @api.one + @api.depends('order_line.procurement_group_id.procurement_ids.state') + def _get_shipped(self): """ As procurement is per sale line basis, we check each line If at least a line has no procurement group defined, it means it @@ -117,32 +120,20 @@ def _get_shipped(self, cr, uid, ids, name, args, context=None): shipped. """ - res = {} - for sale in self.browse(cr, uid, ids, context=context): - if not sale.order_line: - res[sale.id] = False - continue - - groups = set([line.procurement_group_id - for line in sale.order_line]) - is_shipped = True - for group in groups: - if not group: - is_shipped = False - break - is_shipped &= all([proc.state in ['cancel', 'done'] - for proc in group.procurement_ids]) - res[sale.id] = is_shipped - return res - - def _get_orders_procurements(self, cr, uid, ids, context=None): - res = set() - proc_orders = self.pool['procurement.order'].browse( - cr, uid, ids, context=context) - for proc in proc_orders: - if proc.state == 'done' and proc.sale_line_id: - res.add(proc.sale_line_id.order_id.id) - return list(res) + if not self.order_line: + self.shipped = False + return + + groups = set([line.procurement_group_id + for line in self.order_line]) + is_shipped = True + for group in groups: + if not group or not group.procurement_ids: + is_shipped = False + break + is_shipped &= all([proc.state in ['cancel', 'done'] + for proc in group.procurement_ids]) + self.shipped = is_shipped ### # OVERRIDE to find sale.order.line's picking @@ -171,36 +162,36 @@ def _get_picking_ids(self, cr, uid, ids, name, args, context=None): } _columns = { - 'warehouse_id': fields.many2one( + 'warehouse_id': osv.fields.many2one( 'stock.warehouse', 'Default Warehouse', states=SO_STATES, help="If no source warehouse is selected on line, " "this warehouse is used as default. "), - 'shipped': fields.function( - _get_shipped, string='Delivered', type='boolean', - store={ - 'procurement.order': (_get_orders_procurements, ['state'], 10) - }), - 'picking_ids': fields.function( + 'picking_ids': osv.fields.function( _get_picking_ids, method=True, type='one2many', relation='stock.picking', string='Picking associated to this sale'), } + shipped = fields.Boolean( + compute='_get_shipped', + string='Delivered', + store=True) + class sale_order_line(orm.Model): _inherit = 'sale.order.line' _columns = { - 'warehouse_id': fields.many2one( + 'warehouse_id': osv.fields.many2one( 'stock.warehouse', 'Source Warehouse', help="If a source warehouse is selected, " "it will be used to define the route. " "Otherwise, it will get the warehouse of " "the sale order"), - 'procurement_group_id': fields.many2one( + 'procurement_group_id': osv.fields.many2one( 'procurement.group', 'Procurement group', copy=False), From 08c678388c7b320eaf04583e2c03b27d402f69a3 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 27 Nov 2014 14:57:39 +0100 Subject: [PATCH 21/60] Add test on _get_shipped_function --- sale_sourced_by_line/model/sale.py | 1 + sale_sourced_by_line/tests/__init__.py | 21 +++++ .../tests/test_sale_is_delivered.py | 80 +++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 sale_sourced_by_line/tests/__init__.py create mode 100644 sale_sourced_by_line/tests/test_sale_is_delivered.py diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index c619f8c5dda..ba8cbafbc21 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -124,6 +124,7 @@ def _get_shipped(self): self.shipped = False return + # keep empty groups groups = set([line.procurement_group_id for line in self.order_line]) is_shipped = True diff --git a/sale_sourced_by_line/tests/__init__.py b/sale_sourced_by_line/tests/__init__.py new file mode 100644 index 00000000000..7f27e1800ba --- /dev/null +++ b/sale_sourced_by_line/tests/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Yannick Vaucher +# Copyright 2014 Camptocamp SA +# +# 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 . import test_sale_is_delivered diff --git a/sale_sourced_by_line/tests/test_sale_is_delivered.py b/sale_sourced_by_line/tests/test_sale_is_delivered.py new file mode 100644 index 00000000000..2d3cc15070e --- /dev/null +++ b/sale_sourced_by_line/tests/test_sale_is_delivered.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# +# +# Author: Yannick Vaucher +# Copyright 2014 Camptocamp SA +# +# 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.common import TransactionCase + + +class TestSaleIsDelivered(TransactionCase): + """Check the _get_shipped method of Sale Order. """ + + def test_sale_no_proc(self): + self.assertFalse(self.sale.shipped) + + def test_sale_not_all_proc(self): + self.sale_line1.procurement_group_id = self.proc_group1 + self.proc1.state = 'done' + + self.assertFalse(self.sale.shipped) + + def test_sale_partially_delivered(self): + self.sale_line1.procurement_group_id = self.proc_group1 + self.sale_line2.procurement_group_id = self.proc_group2 + self.proc1.state = 'done' + self.proc2.state = 'running' + + self.assertFalse(self.sale.shipped) + + def test_sale_is_delivered(self): + self.sale_line1.procurement_group_id = self.proc_group1 + self.sale_line2.procurement_group_id = self.proc_group2 + self.proc1.state = 'done' + self.proc2.state = 'done' + + self.assertTrue(self.sale.shipped) + + def setUp(self): + """Setup a Sale Order with 2 lines. + And prepare procurements + + I use Model.new to get a model instance that is not saved to the + database, but has working methods. + + """ + super(TestSaleIsDelivered, self).setUp() + SO = self.env['sale.order'] + SOL = self.env['sale.order.line'] + Procurement = self.env['procurement.order'] + ProcurementGroup = self.env['procurement.group'] + self.sale = SO.new() + self.sale_line1 = SOL.new() + self.sale_line2 = SOL.new() + self.sale_line1.order_id = self.sale + self.sale_line2.order_id = self.sale + + self.sale.order_line = SOL.browse([self.sale_line1.id, + self.sale_line2.id]) + + self.proc1 = Procurement.new() + self.proc_group1 = ProcurementGroup.new() + self.proc_group1.procurement_ids = self.proc1 + + self.proc2 = Procurement.new() + self.proc_group2 = ProcurementGroup.new() + self.proc_group2.procurement_ids = self.proc2 From 02a2a7470d28dd5148330b229c3da94e595f4b3f Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Mon, 2 Mar 2015 17:28:01 +0100 Subject: [PATCH 22/60] Add OCA as author of OCA addons In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association. --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 4c99ed8fca7..62fda737769 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -22,7 +22,7 @@ {'name': 'Sale Sourced by Line', 'summary': 'Multiple warehouse source locations for Sale order', 'version': '1.0', - 'author': 'Camptocamp', + 'author': "Camptocamp,Odoo Community Association (OCA)", 'category': 'Warehouse', 'license': 'AGPL-3', 'complexity': 'expert', From 8170552d6831c1c659adb73092a498e776576708 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 12 Mar 2015 13:38:36 +0100 Subject: [PATCH 23/60] [FIX] Do not check for procurements for sale line of type service --- sale_sourced_by_line/model/sale.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index ba8cbafbc21..831ba5a4f08 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -126,7 +126,8 @@ def _get_shipped(self): # keep empty groups groups = set([line.procurement_group_id - for line in self.order_line]) + for line in self.order_line + if line.product_id.type != 'service']) is_shipped = True for group in groups: if not group or not group.procurement_ids: From 837d48a508b13741a8ae1a0c081af4f8ef4fbe1a Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 12 Mar 2015 13:51:28 +0100 Subject: [PATCH 24/60] Add tests for sale order with service lines --- .../tests/test_sale_is_delivered.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sale_sourced_by_line/tests/test_sale_is_delivered.py b/sale_sourced_by_line/tests/test_sale_is_delivered.py index 2d3cc15070e..553178ce4bf 100644 --- a/sale_sourced_by_line/tests/test_sale_is_delivered.py +++ b/sale_sourced_by_line/tests/test_sale_is_delivered.py @@ -25,15 +25,39 @@ class TestSaleIsDelivered(TransactionCase): """Check the _get_shipped method of Sale Order. """ def test_sale_no_proc(self): + """False when no procurement on both sale.order.line""" self.assertFalse(self.sale.shipped) + def test_sale_no_proc_one_service(self): + """False when, no procurement on both line but one is service""" + self.sale_line1.product_id = self.service_product + self.assertFalse(self.sale.shipped) + + def test_sale_no_proc_all_services(self): + """True when, no procurement on both lines but both are services""" + self.sale_line1.product_id = self.service_product + self.sale_line2.product_id = self.service_product + self.assertTrue(self.sale.shipped) + def test_sale_not_all_proc(self): + """False, when one line with and one without procurement done""" self.sale_line1.procurement_group_id = self.proc_group1 self.proc1.state = 'done' self.assertFalse(self.sale.shipped) + def test_sale_proc_and_service(self): + """True when, one line with procurement done and one line for service + """ + self.sale_line1.procurement_group_id = self.proc_group1 + self.proc1.state = 'done' + self.sale_line2.product_id = self.service_product + + self.assertTrue(self.sale.shipped) + def test_sale_partially_delivered(self): + """False when, all lines with procurement, one is partially delivered + """ self.sale_line1.procurement_group_id = self.proc_group1 self.sale_line2.procurement_group_id = self.proc_group2 self.proc1.state = 'done' @@ -42,6 +66,7 @@ def test_sale_partially_delivered(self): self.assertFalse(self.sale.shipped) def test_sale_is_delivered(self): + """True, when both line have a done procurement""" self.sale_line1.procurement_group_id = self.proc_group1 self.sale_line2.procurement_group_id = self.proc_group2 self.proc1.state = 'done' @@ -60,6 +85,7 @@ def setUp(self): super(TestSaleIsDelivered, self).setUp() SO = self.env['sale.order'] SOL = self.env['sale.order.line'] + Product = self.env['product.product'] Procurement = self.env['procurement.order'] ProcurementGroup = self.env['procurement.group'] self.sale = SO.new() @@ -78,3 +104,5 @@ def setUp(self): self.proc2 = Procurement.new() self.proc_group2 = ProcurementGroup.new() self.proc_group2.procurement_ids = self.proc2 + + self.service_product = Product.new({'type': 'service'}) From 36aa4affe8d6dd147067c19bd53f7260369870f0 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 23 Apr 2015 17:48:58 +0200 Subject: [PATCH 25/60] Add module sale_procurement_group_by_line This module extract logic to create multiple procurement group for a single sale order for grouped sale order lines. --- sale_sourced_by_line/README.rst | 39 ++++++ sale_sourced_by_line/__openerp__.py | 3 +- sale_sourced_by_line/model/sale.py | 193 ++++++---------------------- 3 files changed, 80 insertions(+), 155 deletions(-) create mode 100644 sale_sourced_by_line/README.rst diff --git a/sale_sourced_by_line/README.rst b/sale_sourced_by_line/README.rst new file mode 100644 index 00000000000..847fecd9f46 --- /dev/null +++ b/sale_sourced_by_line/README.rst @@ -0,0 +1,39 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Sale Sourced by Line +==================== + +This module adds the possibility to source a line of sale order from a specific +warehouse instead of using the warehouse of the sale order. + +This will create one procurement group per warehouse set in sale +order lines. + +It will only supports routes such as MTO and Drop Shipping. + +Credits +======= + +Contributors +------------ + +* Guewen Baconnier +* Yannick Vaucher + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://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/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 62fda737769..47e6f5a32bb 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -21,7 +21,7 @@ {'name': 'Sale Sourced by Line', 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '1.0', + 'version': '1.1', 'author': "Camptocamp,Odoo Community Association (OCA)", 'category': 'Warehouse', 'license': 'AGPL-3', @@ -48,6 +48,7 @@ """, 'depends': ['sale_stock', + 'sale_procurement_group_by_line', ], 'demo': [], 'data': ['view/sale_view.xml', diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 831ba5a4f08..cbc86cad212 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -2,7 +2,7 @@ # # # Author: Guewen Baconnier, Yannick Vaucher -# Copyright 2013-2014 Camptocamp SA +# Copyright 2013-2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -19,140 +19,29 @@ # # -from openerp import models, api, fields, osv +from openerp import models, api, fields from openerp.osv import orm -class sale_order(models.Model): +class SaleOrder(models.Model): _inherit = 'sale.order' def _prepare_order_line_procurement(self, cr, uid, order, line, group_id=False, context=None): - values = super(sale_order, self)._prepare_order_line_procurement( + values = super(SaleOrder, self)._prepare_order_line_procurement( cr, uid, order, line, group_id=group_id, context=context) if line.warehouse_id: values['warehouse_id'] = line.warehouse_id.id return values - ### - # OVERRIDE to consider sale_order's warehouse_id as default - ### - def action_ship_create(self, cr, uid, ids, context=None): - """Create the required procurements to supply sales order lines, also - connecting the procurements to appropriate stock moves in order to - bring the goods to the sales order's requested location. - - :return: True - """ - procurement_obj = self.pool.get('procurement.order') - sale_line_obj = self.pool.get('sale.order.line') - for order in self.browse(cr, uid, ids, context=context): - proc_ids = [] - - groups = {} - - for line in order.order_line: - group_id = groups.get(line.warehouse_id) - if not group_id: - vals = self._prepare_procurement_group(cr, uid, order, - context=context) - group_id = self.pool["procurement.group"].create( - cr, uid, vals, context=context) - groups[line.warehouse_id] = group_id - line.write({'procurement_group_id': group_id}) - # Try to fix exception procurement (possible when after a - # shipping exception the user choose to recreate) - if line.procurement_ids: - # first check them to see if they are in exception or not - # (one of the related moves is cancelled) - procurement_obj.check( - cr, uid, [x.id for x in line.procurement_ids - if x.state not in ['cancel', 'done']]) - line.refresh() - # run again procurement that are in exception in order to - # trigger another move - proc_ids += [x.id for x in line.procurement_ids - if x.state in ('exception', 'cancel')] - elif sale_line_obj.need_procurement(cr, uid, [line.id], - context=context): - if (line.state == 'done') or not line.product_id: - continue - vals = self._prepare_order_line_procurement( - cr, uid, order, line, - group_id=group_id, context=context) - proc_id = procurement_obj.create( - cr, uid, vals, context=context) - proc_ids.append(proc_id) - # Confirm procurement order such that rules will be applied on it - # note that the workflow normally ensure proc_ids isn't an empty - # list - procurement_obj.run(cr, uid, proc_ids, context=context) - - # if shipping was in exception and the user choose to recreate the - # delivery order, write the new status of SO - if order.state == 'shipping_except': - val = {'state': 'progress', 'shipped': False} - - if (order.order_policy == 'manual'): - for line in order.order_line: - if (not line.invoiced and - line.state not in ('cancel', 'draft')): - val['state'] = 'manual' - break - order.write(val) - return True - - ### - # OVERRIDE to use sale.order.line's procurement_group_id from lines - ### - @api.one - @api.depends('order_line.procurement_group_id.procurement_ids.state') - def _get_shipped(self): - """ As procurement is per sale line basis, we check each line - - If at least a line has no procurement group defined, it means it - isn't shipped yet. - - Only when all procurement are done or cancelled, we consider - the sale order as being shipped. - - And if there is no line, we have nothing to ship, thus it isn't - shipped. - - """ - if not self.order_line: - self.shipped = False - return - - # keep empty groups - groups = set([line.procurement_group_id - for line in self.order_line - if line.product_id.type != 'service']) - is_shipped = True - for group in groups: - if not group or not group.procurement_ids: - is_shipped = False - break - is_shipped &= all([proc.state in ['cancel', 'done'] - for proc in group.procurement_ids]) - self.shipped = is_shipped - - ### - # OVERRIDE to find sale.order.line's picking - ### - def _get_picking_ids(self, cr, uid, ids, name, args, context=None): - res = {} - for sale in self.browse(cr, uid, ids, context=context): - group_ids = set([line.procurement_group_id.id - for line in sale.order_line - if line.procurement_group_id]) - if not any(group_ids): - res[sale.id] = [] - continue - res[sale.id] = self.pool['stock.picking'].search( - cr, uid, [('group_id', 'in', list(group_ids))], - context=context) - return res + @api.model + def _prepare_procurement_group_by_line(self, line): + vals = super(SaleOrder, self)._prepare_procurement_group_by_line(line) + # for compatibility with sale_quotation_sourcing + if line._get_procurement_group_key()[0] == 8: + if line.warehouse_id: + vals['name'] += '/' + line.warehouse_id.name + return vals SO_STATES = { 'cancel': [('readonly', True)], @@ -163,38 +52,34 @@ def _get_picking_ids(self, cr, uid, ids, name, args, context=None): 'done': [('readonly', True)], } - _columns = { - 'warehouse_id': osv.fields.many2one( - 'stock.warehouse', - 'Default Warehouse', - states=SO_STATES, - help="If no source warehouse is selected on line, " - "this warehouse is used as default. "), - 'picking_ids': osv.fields.function( - _get_picking_ids, method=True, type='one2many', - relation='stock.picking', - string='Picking associated to this sale'), - } - - shipped = fields.Boolean( - compute='_get_shipped', - string='Delivered', - store=True) + warehouse_id = fields.Many2one( + 'stock.warehouse', + 'Default Warehouse', + states=SO_STATES, + help="If no source warehouse is selected on line, " + "this warehouse is used as default. ") -class sale_order_line(orm.Model): +class SaleOrderLine(orm.Model): _inherit = 'sale.order.line' - _columns = { - 'warehouse_id': osv.fields.many2one( - 'stock.warehouse', - 'Source Warehouse', - help="If a source warehouse is selected, " - "it will be used to define the route. " - "Otherwise, it will get the warehouse of " - "the sale order"), - 'procurement_group_id': osv.fields.many2one( - 'procurement.group', - 'Procurement group', - copy=False), - } + warehouse_id = fields.Many2one( + 'stock.warehouse', + 'Source Warehouse', + help="If a source warehouse is selected, " + "it will be used to define the route. " + "Otherwise, it will get the warehouse of " + "the sale order") + + @api.multi + def _get_procurement_group_key(self): + """ Return a key with priority to be used to regroup lines in multiple + procurement groups + + """ + priority = 8 + key = super(SaleOrderLine, self)._get_procurement_group_key() + # Check priority + if key[0] >= priority: + return key + return (priority, self.warehouse_id.id) From dac9985b9a3fb63fa854dcd1cd9f70d533d6e4a4 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 24 Apr 2015 17:45:09 +0200 Subject: [PATCH 26/60] Add OCA module icon --- sale_sourced_by_line/static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sale_sourced_by_line/static/description/icon.png diff --git a/sale_sourced_by_line/static/description/icon.png b/sale_sourced_by_line/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?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($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 ea92092f6adb274225a8fd5fd2db4bf113bd1eb8 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 22 May 2015 19:45:32 +0200 Subject: [PATCH 27/60] Add bug tracker link on README.rst --- sale_sourced_by_line/README.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sale_sourced_by_line/README.rst b/sale_sourced_by_line/README.rst index 847fecd9f46..29c151a74bc 100644 --- a/sale_sourced_by_line/README.rst +++ b/sale_sourced_by_line/README.rst @@ -12,6 +12,16 @@ order lines. It will only supports routes such as MTO and Drop Shipping. + +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 +`here `_. + + Credits ======= From e66f11471af89936da9d498fcf43de4f18ecb70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matja=C5=BE=20Mozeti=C4=8D?= Date: Thu, 20 Aug 2015 12:32:01 +0200 Subject: [PATCH 28/60] Slovene translations added --- sale_sourced_by_line/i18n/sl.po | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 sale_sourced_by_line/i18n/sl.po diff --git a/sale_sourced_by_line/i18n/sl.po b/sale_sourced_by_line/i18n/sl.po new file mode 100644 index 00000000000..aca3ce6f8ab --- /dev/null +++ b/sale_sourced_by_line/i18n/sl.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-10-14 08:07+0000\n" +"PO-Revision-Date: 2015-08-16 08:26+0200\n" +"Last-Translator: Matjaz Mozetic \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: sl\n" +"X-Generator: Poedit 1.8.4\n" + +#. module: sale_sourced_by_line +#: help:sale.order.line,warehouse_id:0 +msgid "If a source warehouse is selected, it will be used to define the route. Otherwise, it will get the warehouse of the sale order" +msgstr "Ob izbiri izvornega skladišča, bo to uporabljeno za določitev proge. Drugače bo izbrano skladišče iz prodajnega naloga" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_stock_picking +msgid "Picking List" +msgstr "Zbirnik" + +#. module: sale_sourced_by_line +#: field:sale.order.line,procurement_group_id:0 +msgid "Procurement group" +msgstr "Skupina oskrbovanja" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Prodajni nalog" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Postavka prodajnega naloga" + +#. module: sale_sourced_by_line +#: field:sale.order.line,warehouse_id:0 +msgid "Source Warehouse" +msgstr "Izvorno skladišče" From 6502f54da62e11a4bfb8f13fbcbeccdf6929befc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 10:03:07 +0200 Subject: [PATCH 29/60] [UPD] prefix versions with 8.0 --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 47e6f5a32bb..112b5bf0c51 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -21,7 +21,7 @@ {'name': 'Sale Sourced by Line', 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '1.1', + 'version': '8.0.1.1.0', 'author': "Camptocamp,Odoo Community Association (OCA)", 'category': 'Warehouse', 'license': 'AGPL-3', From 64ae80fc810e8db8a7805e487ce2a559f06450de Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 08:54:17 +0200 Subject: [PATCH 30/60] [MIG] Make modules uninstallable --- sale_sourced_by_line/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__openerp__.py index 112b5bf0c51..3667d6bf57b 100644 --- a/sale_sourced_by_line/__openerp__.py +++ b/sale_sourced_by_line/__openerp__.py @@ -58,5 +58,5 @@ 'test/sale_order_not_sourced.yml', ], 'auto_install': False, - 'installable': True, + 'installable': False, } From 7e526d39e41080a552016ec69859a49d5f108eb9 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 16:07:51 +0200 Subject: [PATCH 31/60] [MIG] Rename manifest files --- sale_sourced_by_line/{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sale_sourced_by_line/{__openerp__.py => __manifest__.py} (100%) diff --git a/sale_sourced_by_line/__openerp__.py b/sale_sourced_by_line/__manifest__.py similarity index 100% rename from sale_sourced_by_line/__openerp__.py rename to sale_sourced_by_line/__manifest__.py From 88b3082e5f1fab4367fa6f025f732c70326d6477 Mon Sep 17 00:00:00 2001 From: aheficent Date: Thu, 23 Feb 2017 10:30:42 +0100 Subject: [PATCH 32/60] [MIG] sale_sourced_by_line: Migrated to 9.0 --- sale_sourced_by_line/README.rst | 26 +++- sale_sourced_by_line/__init__.py | 23 +--- sale_sourced_by_line/__manifest__.py | 84 ++++--------- sale_sourced_by_line/model/__init__.py | 24 +--- sale_sourced_by_line/model/sale.py | 67 ++++------- sale_sourced_by_line/tests/__init__.py | 27 ++--- .../tests/test_sale_sourced_by_line.py | 111 ++++++++++++++++++ sale_sourced_by_line/view/sale_view.xml | 4 +- 8 files changed, 195 insertions(+), 171 deletions(-) create mode 100644 sale_sourced_by_line/tests/test_sale_sourced_by_line.py diff --git a/sale_sourced_by_line/README.rst b/sale_sourced_by_line/README.rst index 29c151a74bc..ac46964008d 100644 --- a/sale_sourced_by_line/README.rst +++ b/sale_sourced_by_line/README.rst @@ -1,6 +1,7 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :alt: License: AGPL-3 +==================== Sale Sourced by Line ==================== @@ -13,30 +14,45 @@ order lines. It will only supports routes such as MTO and Drop Shipping. +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/167/9.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 -`here `_. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback. Credits ======= +Images +------ + +* Odoo Community Association: `Icon `_. + + Contributors ------------ * Guewen Baconnier * Yannick Vaucher +* Eficent Business and IT Consulting Services S.L. +* Serpent Consulting Services Pvt. Ltd. Maintainer ---------- -.. image:: http://odoo-community.org/logo.png +.. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association - :target: http://odoo-community.org + :target: https://odoo-community.org This module is maintained by the OCA. @@ -44,6 +60,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/sale_sourced_by_line/__init__.py b/sale_sourced_by_line/__init__.py index c09d73c4161..7d7340f9259 100644 --- a/sale_sourced_by_line/__init__.py +++ b/sale_sourced_by_line/__init__.py @@ -1,22 +1,7 @@ # -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013 Camptocamp SA -# -# 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 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import model diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 3667d6bf57b..52ecdc6dfcc 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -1,62 +1,26 @@ # -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013-2014 Camptocamp SA -# -# 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 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -{'name': 'Sale Sourced by Line', - 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '8.0.1.1.0', - 'author': "Camptocamp,Odoo Community Association (OCA)", - 'category': 'Warehouse', - 'license': 'AGPL-3', - 'complexity': 'expert', - 'images': [], - 'website': "http://www.camptocamp.com", - 'description': """ -Sale Sourced by Line -==================== - -Adds the possibility to source a line of sale order from a specific -warehouse instead of using the warehouse of the sale order. - -This will create one procurement group per warehouse set in sale -order lines. - -It will only supports routes such as MTO and Drop Shipping. - -Contributors ------------- - -* Guewen Baconnier -* Yannick Vaucher - -""", - 'depends': ['sale_stock', - 'sale_procurement_group_by_line', - ], - 'demo': [], - 'data': ['view/sale_view.xml', - ], - 'test': ['test/sale_order_source.yml', - 'test/sale_order_multi_source.yml', - 'test/sale_order_not_sourced.yml', - ], - 'auto_install': False, - 'installable': False, - } +{ + 'name': 'Sale Sourced by Line', + 'summary': 'Multiple warehouse source locations for Sale order', + 'version': '9.0.1.0.0', + "author": "Camptocamp," + "Eficent," + "SerpentCS," + "Odoo Community Association (OCA)", + 'category': 'Warehouse', + 'license': 'AGPL-3', + 'website': "http://www.camptocamp.com", + 'depends': ['sale_stock', + 'sale_procurement_group_by_line', + ], + 'data': [ + 'view/sale_view.xml' + ], + 'auto_install': False, + 'installable': True, +} diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py index 42c4b8f63d0..100c4bc7fd8 100644 --- a/sale_sourced_by_line/model/__init__.py +++ b/sale_sourced_by_line/model/__init__.py @@ -1,23 +1,7 @@ # -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier -# Copyright 2013-2014 Camptocamp SA -# -# 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 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import sale -from . import stock diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index cbc86cad212..10f07ad6cec 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -1,85 +1,64 @@ # -*- coding: utf-8 -*- -# -# -# Author: Guewen Baconnier, Yannick Vaucher -# Copyright 2013-2015 Camptocamp SA -# -# 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 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import models, api, fields -from openerp.osv import orm + +from openerp import api, fields, models class SaleOrder(models.Model): _inherit = 'sale.order' - def _prepare_order_line_procurement(self, cr, uid, order, line, - group_id=False, context=None): - values = super(SaleOrder, self)._prepare_order_line_procurement( - cr, uid, order, line, group_id=group_id, context=context) - if line.warehouse_id: - values['warehouse_id'] = line.warehouse_id.id - return values - @api.model def _prepare_procurement_group_by_line(self, line): vals = super(SaleOrder, self)._prepare_procurement_group_by_line(line) # for compatibility with sale_quotation_sourcing - if line._get_procurement_group_key()[0] == 8: + if line._get_procurement_group_key()[0] == 10: if line.warehouse_id: vals['name'] += '/' + line.warehouse_id.name return vals - SO_STATES = { - 'cancel': [('readonly', True)], - 'progress': [('readonly', True)], - 'manual': [('readonly', True)], - 'shipping_except': [('readonly', True)], - 'invoice_except': [('readonly', True)], - 'done': [('readonly', True)], - } - warehouse_id = fields.Many2one( 'stock.warehouse', - 'Default Warehouse', - states=SO_STATES, + string='Default Warehouse', + readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="If no source warehouse is selected on line, " "this warehouse is used as default. ") -class SaleOrderLine(orm.Model): +class SaleOrderLine(models.Model): _inherit = 'sale.order.line' warehouse_id = fields.Many2one( 'stock.warehouse', 'Source Warehouse', + readonly=True, + states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="If a source warehouse is selected, " "it will be used to define the route. " "Otherwise, it will get the warehouse of " "the sale order") + @api.multi + def _prepare_order_line_procurement(self, group_id=False): + values = super(SaleOrderLine, + self)._prepare_order_line_procurement(group_id=group_id) + if self.warehouse_id: + values['warehouse_id'] = self.warehouse_id.id + return values + @api.multi def _get_procurement_group_key(self): """ Return a key with priority to be used to regroup lines in multiple procurement groups """ - priority = 8 + priority = 10 key = super(SaleOrderLine, self)._get_procurement_group_key() # Check priority if key[0] >= priority: return key - return (priority, self.warehouse_id.id) + return priority, self.warehouse_id.id diff --git a/sale_sourced_by_line/tests/__init__.py b/sale_sourced_by_line/tests/__init__.py index 7f27e1800ba..cbc3428a5f8 100644 --- a/sale_sourced_by_line/tests/__init__.py +++ b/sale_sourced_by_line/tests/__init__.py @@ -1,21 +1,8 @@ # -*- coding: utf-8 -*- -# -# -# Author: Yannick Vaucher -# Copyright 2014 Camptocamp SA -# -# 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 . import test_sale_is_delivered +# Copyright 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + + +from . import test_sale_sourced_by_line diff --git a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py new file mode 100644 index 00000000000..8a96d233fa3 --- /dev/null +++ b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py @@ -0,0 +1,111 @@ +# -*- coding: utf-8 -*- +# Copyright 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from openerp.tests.common import TransactionCase + + +class TestSaleSourcedByLine(TransactionCase): + + def setUp(self): + super(TestSaleSourcedByLine, self).setUp() + self.sale_order_model = self.env['sale.order'] + self.sale_order_line_model = self.env['sale.order.line'] + self.stock_move_model = self.env['stock.move'] + + # Refs + self.customer = self.env.ref('base.res_partner_2') + self.product_1 = self.env.ref('product.product_product_32') + self.product_2 = self.env.ref('product.product_product_24') + self.warehouse_shop0 = self.env.ref('stock.stock_warehouse_shop0') + self.warehouse0 = self.env.ref('stock.warehouse0') + + def test_sales_order_multi_source(self): + so = self.sale_order_model.create({ + 'partner_id': self.customer.id, + }) + self.sale_order_line_model.create({ + 'product_id': self.product_1.id, + 'product_uom_qty': 8, + 'warehouse_id': self.warehouse_shop0.id, + 'order_id': so.id + }) + self.sale_order_line_model.create({ + 'product_id': self.product_2.id, + 'product_uom_qty': 8, + 'warehouse_id': self.warehouse0.id, + 'order_id': so.id + }) + # confirm quotation + so.action_confirm() + self.assertEquals(len(so.picking_ids), 2, + "2 delivery orders expected. Got %s instead" % + len(so.picking_ids)) + for line in so.order_line: + self.assertEquals(line.procurement_group_id.name, + line.order_id.name + '/' + + line.warehouse_id.name, + "The name of the procurement group is not " + "correct.") + for procurement in line.procurement_ids: + moves = self.stock_move_model.search([('procurement_id', '=', + procurement.id)]) + for move in moves: + self.assertEquals(move.group_id, + line.procurement_group_id, + "The group in the stock move does not " + "match with the procurement group in " + "the sales order line.") + self.assertEquals(move.picking_id.group_id, + line.procurement_group_id, + "The group in the stock picking does " + "not match with the procurement group " + "in the sales order line.") + + def test_sales_order_no_source(self): + so = self.sale_order_model.create({ + 'partner_id': self.customer.id, + 'warehouse_id': self.warehouse_shop0.id, + }) + self.sale_order_line_model.create({ + 'product_id': self.product_1.id, + 'product_uom_qty': 8, + 'order_id': so.id + }) + self.sale_order_line_model.create({ + 'product_id': self.product_2.id, + 'product_uom_qty': 8, + 'order_id': so.id + }) + # confirm quotation + so.action_confirm() + self.assertEquals(len(so.picking_ids), 1, + "1 delivery order expected. Got %s instead" % + len(so.picking_ids)) + + def test_sale_order_source(self): + so = self.sale_order_model.create({ + 'partner_id': self.customer.id, + }) + self.sale_order_line_model.create({ + 'product_id': self.product_1.id, + 'product_uom_qty': 8, + 'warehouse_id': self.warehouse_shop0.id, + 'order_id': so.id + }) + self.sale_order_line_model.create({ + 'product_id': self.product_2.id, + 'product_uom_qty': 8, + 'warehouse_id': self.warehouse0.id, + 'order_id': so.id + }) + # confirm quotation + so.action_confirm() + for line in so.order_line: + for procurement in line.procurement_ids: + self.assertEquals(procurement.warehouse_id, + line.warehouse_id, + "The warehouse in the procurement does not " + "match with the Sales order line.") diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index 3682fba21c5..19e2cb4ea66 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -1,6 +1,5 @@ - sale.order.form sale.order @@ -15,7 +14,7 @@ sale.order.form sale.order - + @@ -26,5 +25,4 @@ - From a32e69787f57f3c0b8c9c9869fa321311e3998e0 Mon Sep 17 00:00:00 2001 From: lreficent Date: Tue, 1 Aug 2017 16:52:21 +0200 Subject: [PATCH 33/60] [9.0][FIX] sale_sourced_by_line: not applying default wh when grouping. --- sale_sourced_by_line/model/sale.py | 4 +- sale_sourced_by_line/model/stock.py | 87 ----------------------------- 2 files changed, 3 insertions(+), 88 deletions(-) delete mode 100644 sale_sourced_by_line/model/stock.py diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 10f07ad6cec..ffcab8053cb 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -61,4 +61,6 @@ def _get_procurement_group_key(self): # Check priority if key[0] >= priority: return key - return priority, self.warehouse_id.id + wh_id = self.warehouse_id.id if self.warehouse_id else \ + self.order_id.warehouse_id.id + return priority, wh_id diff --git a/sale_sourced_by_line/model/stock.py b/sale_sourced_by_line/model/stock.py deleted file mode 100644 index bc92f68d186..00000000000 --- a/sale_sourced_by_line/model/stock.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# Author: Yannick Vaucher -# Copyright 2014 Camptocamp SA -# -# 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 . -# -# -''' -Redefine and override all sale_stock picking method to search procurement -group on sale order line instead of on the sale order -''' -from openerp.osv import orm, fields - - -class stock_picking(orm.Model): - _inherit = "stock.picking" - - def _get_partner_to_invoice(self, cr, uid, picking, context=None): - """ Inherit the original function of the 'stock' module - We select the partner of the sales order as the partner of the - customer invoice - """ - sale_line_obj = self.pool['sale.order.line'] - line_ids = sale_line_obj.search( - cr, uid, [('procurement_group_id', '=', picking.group_id.id)], - context=context) - if line_ids: - lines = sale_line_obj.browse(cr, uid, line_ids, context=context) - saleorder = lines[0].order_id - return saleorder.partner_invoice_id.id - return super(stock_picking, self)._get_partner_to_invoice( - cr, uid, picking, context=context) - - def _get_sale_id(self, cr, uid, ids, name, args, context=None): - sale_line_obj = self.pool['sale.order.line'] - res = {} - for picking in self.browse(cr, uid, ids, context=context): - res[picking.id] = False - if picking.group_id: - line_ids = sale_line_obj.search( - cr, uid, - [('procurement_group_id', '=', picking.group_id.id)], - context=context) - if line_ids: - lines = sale_line_obj.browse(cr, uid, line_ids, - context=context) - res[picking.id] = lines[0].order_id - return res - - _columns = { - 'sale_id': fields.function( - _get_sale_id, type="many2one", - relation="sale.order", string="Sale Order"), - } - - def _create_invoice_from_picking(self, cr, uid, picking, vals, - context=None): - sale_line_obj = self.pool['sale.order.line'] - invoice_line_obj = self.pool.get('account.invoice.line') - invoice_id = super(stock_picking, self)._create_invoice_from_picking( - cr, uid, picking, vals, context=context) - if picking.group_id: - line_ids = sale_line_obj.search( - cr, uid, [('procurement_group_id', '=', picking.group_id.id), - ('product_id.type', '=', 'service'), - ('invoiced', '=', False)], context=context) - - if line_ids: - created_lines = sale_line_obj.invoice_line_create( - cr, uid, line_ids, context=context) - invoice_line_obj.write( - cr, uid, created_lines, {'invoice_id': invoice_id}, - context=context) - return invoice_id From 84052cadd9fd8bf6c5437c7b61ffaca7ee18123c Mon Sep 17 00:00:00 2001 From: mreficent Date: Fri, 18 Aug 2017 15:55:36 +0200 Subject: [PATCH 34/60] [10.0][MIG] sale_sourced_by_line --- sale_sourced_by_line/README.rst | 16 +++--- sale_sourced_by_line/__manifest__.py | 7 ++- sale_sourced_by_line/model/sale.py | 6 +-- .../tests/test_sale_is_delivered.py | 52 +++++++------------ .../tests/test_sale_sourced_by_line.py | 4 +- sale_sourced_by_line/view/sale_view.xml | 4 +- 6 files changed, 36 insertions(+), 53 deletions(-) diff --git a/sale_sourced_by_line/README.rst b/sale_sourced_by_line/README.rst index ac46964008d..24f0b9ec991 100644 --- a/sale_sourced_by_line/README.rst +++ b/sale_sourced_by_line/README.rst @@ -1,4 +1,5 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl :alt: License: AGPL-3 ==================== @@ -19,15 +20,15 @@ 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/167/9.0 - + :target: https://runbot.odoo-community.org/runbot/167/10.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. +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 smash it by providing detailed and welcomed feedback. Credits @@ -38,7 +39,6 @@ Images * Odoo Community Association: `Icon `_. - Contributors ------------ @@ -47,6 +47,8 @@ Contributors * Eficent Business and IT Consulting Services S.L. * Serpent Consulting Services Pvt. Ltd. +Do not contact contributors directly about support or help with technical issues. + Maintainer ---------- @@ -61,5 +63,3 @@ mission is to support the collaborative development of Odoo features and promote its widespread use. To contribute to this module, please visit https://odoo-community.org. - - diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 52ecdc6dfcc..ed14539299d 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -1,26 +1,25 @@ # -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier -# © 2016 Eficent Business and IT Consulting Services S.L. +# © 2016-17 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { 'name': 'Sale Sourced by Line', 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', "author": "Camptocamp," "Eficent," "SerpentCS," "Odoo Community Association (OCA)", 'category': 'Warehouse', 'license': 'AGPL-3', - 'website': "http://www.camptocamp.com", + 'website': "https://github.com/OCA/sale-workflow", 'depends': ['sale_stock', 'sale_procurement_group_by_line', ], 'data': [ 'view/sale_view.xml' ], - 'auto_install': False, 'installable': True, } diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index ffcab8053cb..671b49fd742 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -5,7 +5,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import api, fields, models +from odoo import api, fields, models class SaleOrder(models.Model): @@ -44,8 +44,8 @@ class SaleOrderLine(models.Model): @api.multi def _prepare_order_line_procurement(self, group_id=False): - values = super(SaleOrderLine, - self)._prepare_order_line_procurement(group_id=group_id) + values = super(SaleOrderLine, self).\ + _prepare_order_line_procurement(group_id=group_id) if self.warehouse_id: values['warehouse_id'] = self.warehouse_id.id return values diff --git a/sale_sourced_by_line/tests/test_sale_is_delivered.py b/sale_sourced_by_line/tests/test_sale_is_delivered.py index 553178ce4bf..0186d25f341 100644 --- a/sale_sourced_by_line/tests/test_sale_is_delivered.py +++ b/sale_sourced_by_line/tests/test_sale_is_delivered.py @@ -1,24 +1,8 @@ # -*- coding: utf-8 -*- -# -# -# Author: Yannick Vaucher -# Copyright 2014 Camptocamp SA -# -# 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.common import TransactionCase +# Copyright 2014 Camptocamp SA - Yannick Vaucher +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo.tests.common import TransactionCase class TestSaleIsDelivered(TransactionCase): @@ -83,26 +67,26 @@ def setUp(self): """ super(TestSaleIsDelivered, self).setUp() - SO = self.env['sale.order'] - SOL = self.env['sale.order.line'] - Product = self.env['product.product'] - Procurement = self.env['procurement.order'] - ProcurementGroup = self.env['procurement.group'] - self.sale = SO.new() - self.sale_line1 = SOL.new() - self.sale_line2 = SOL.new() + so = self.env['sale.order'] + sol = self.env['sale.order.line'] + product = self.env['product.product'] + procurement = self.env['procurement.order'] + procurement_group = self.env['procurement.group'] + self.sale = so.new() + self.sale_line1 = sol.new() + self.sale_line2 = sol.new() self.sale_line1.order_id = self.sale self.sale_line2.order_id = self.sale - self.sale.order_line = SOL.browse([self.sale_line1.id, + self.sale.order_line = sol.browse([self.sale_line1.id, self.sale_line2.id]) - self.proc1 = Procurement.new() - self.proc_group1 = ProcurementGroup.new() + self.proc1 = procurement.new() + self.proc_group1 = procurement_group.new() self.proc_group1.procurement_ids = self.proc1 - self.proc2 = Procurement.new() - self.proc_group2 = ProcurementGroup.new() + self.proc2 = procurement.new() + self.proc_group2 = procurement_group.new() self.proc_group2.procurement_ids = self.proc2 - self.service_product = Product.new({'type': 'service'}) + self.service_product = product.new({'type': 'service'}) diff --git a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py index 8a96d233fa3..c786e68fc18 100644 --- a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py +++ b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py @@ -4,7 +4,7 @@ # © 2016 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp.tests.common import TransactionCase +from odoo.tests.common import TransactionCase class TestSaleSourcedByLine(TransactionCase): @@ -17,7 +17,7 @@ def setUp(self): # Refs self.customer = self.env.ref('base.res_partner_2') - self.product_1 = self.env.ref('product.product_product_32') + self.product_1 = self.env.ref('product.product_product_27') self.product_2 = self.env.ref('product.product_product_24') self.warehouse_shop0 = self.env.ref('stock.stock_warehouse_shop0') self.warehouse0 = self.env.ref('stock.warehouse0') diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index 19e2cb4ea66..861749ecbf8 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -1,5 +1,5 @@ - + sale.order.form sale.order @@ -25,4 +25,4 @@ - + From f8e428db2a28dae2994484a7671d8f4abcd30e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Fri, 15 Jun 2018 23:40:55 +0200 Subject: [PATCH 35/60] remove obsolete .pot files [ci skip] --- .../i18n/sale_sourced_by_line.pot | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 sale_sourced_by_line/i18n/sale_sourced_by_line.pot diff --git a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot deleted file mode 100644 index e33e2a90bd7..00000000000 --- a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * sale_sourced_by_line -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-14 08:07+0000\n" -"PO-Revision-Date: 2014-10-14 08:07+0000\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: sale_sourced_by_line -#: help:sale.order.line,warehouse_id:0 -msgid "If a source warehouse is selected, it will be used to define the route. Otherwise, it will get the warehouse of the sale order" -msgstr "" - -#. module: sale_sourced_by_line -#: model:ir.model,name:sale_sourced_by_line.model_stock_picking -msgid "Picking List" -msgstr "" - -#. module: sale_sourced_by_line -#: field:sale.order.line,procurement_group_id:0 -msgid "Procurement group" -msgstr "" - -#. module: sale_sourced_by_line -#: model:ir.model,name:sale_sourced_by_line.model_sale_order -msgid "Sales Order" -msgstr "" - -#. module: sale_sourced_by_line -#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line -msgid "Sales Order Line" -msgstr "" - -#. module: sale_sourced_by_line -#: field:sale.order.line,warehouse_id:0 -msgid "Source Warehouse" -msgstr "" - From 2407303599aa3423aed43495926548c555abf9be Mon Sep 17 00:00:00 2001 From: oca-travis Date: Wed, 20 Jun 2018 14:58:04 +0000 Subject: [PATCH 36/60] [UPD] Update sale_sourced_by_line.pot --- .../i18n/sale_sourced_by_line.pot | 35 +++++++++++++++++++ sale_sourced_by_line/i18n/sl.po | 20 ++++++----- 2 files changed, 46 insertions(+), 9 deletions(-) create mode 100644 sale_sourced_by_line/i18n/sale_sourced_by_line.pot diff --git a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot new file mode 100644 index 00000000000..5cc5f2a447d --- /dev/null +++ b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "If a source warehouse is selected, it will be used to define the route. Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" + diff --git a/sale_sourced_by_line/i18n/sl.po b/sale_sourced_by_line/i18n/sl.po index aca3ce6f8ab..0a2cb6272db 100644 --- a/sale_sourced_by_line/i18n/sl.po +++ b/sale_sourced_by_line/i18n/sl.po @@ -1,21 +1,23 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * sale_sourced_by_line +# * sale_sourced_by_line # +# Translators: +# OCA Transbot , 2017 msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-14 08:07+0000\n" -"PO-Revision-Date: 2015-08-16 08:26+0200\n" -"Last-Translator: Matjaz Mozetic \n" -"Language-Team: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+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: 8bit\n" -"Plural-Forms: \n" -"Language: sl\n" -"X-Generator: Poedit 1.8.4\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #. module: sale_sourced_by_line #: help:sale.order.line,warehouse_id:0 From 63096f1736fb092473cfde0beec0dfc0798e1b91 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sun, 13 Sep 2015 11:23:58 -0400 Subject: [PATCH 37/60] OCA Transbot updated translations from Transifex --- sale_sourced_by_line/i18n/ca.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/de.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/el_GR.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/es.po | 42 +++++++++++++++++++++++++ sale_sourced_by_line/i18n/es_ES.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/es_VE.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/fi.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/fr.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/hr.po | 42 +++++++++++++++++++++++++ sale_sourced_by_line/i18n/hr_HR.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/hu.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/it.po | 50 ++++++++++++++++++++++++++++++ sale_sourced_by_line/i18n/nl.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/nl_NL.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/pt.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/pt_BR.po | 42 +++++++++++++++++++++++++ sale_sourced_by_line/i18n/ro.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/sk.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/sl.po | 24 +++++--------- sale_sourced_by_line/i18n/tr.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/tr_TR.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/vi_VN.po | 41 ++++++++++++++++++++++++ sale_sourced_by_line/i18n/zh_CN.po | 50 ++++++++++++++++++++++++++++++ 23 files changed, 931 insertions(+), 16 deletions(-) create mode 100644 sale_sourced_by_line/i18n/ca.po create mode 100644 sale_sourced_by_line/i18n/de.po create mode 100644 sale_sourced_by_line/i18n/el_GR.po create mode 100644 sale_sourced_by_line/i18n/es.po create mode 100644 sale_sourced_by_line/i18n/es_ES.po create mode 100644 sale_sourced_by_line/i18n/es_VE.po create mode 100644 sale_sourced_by_line/i18n/fi.po create mode 100644 sale_sourced_by_line/i18n/fr.po create mode 100644 sale_sourced_by_line/i18n/hr.po create mode 100644 sale_sourced_by_line/i18n/hr_HR.po create mode 100644 sale_sourced_by_line/i18n/hu.po create mode 100644 sale_sourced_by_line/i18n/it.po create mode 100644 sale_sourced_by_line/i18n/nl.po create mode 100644 sale_sourced_by_line/i18n/nl_NL.po create mode 100644 sale_sourced_by_line/i18n/pt.po create mode 100644 sale_sourced_by_line/i18n/pt_BR.po create mode 100644 sale_sourced_by_line/i18n/ro.po create mode 100644 sale_sourced_by_line/i18n/sk.po create mode 100644 sale_sourced_by_line/i18n/tr.po create mode 100644 sale_sourced_by_line/i18n/tr_TR.po create mode 100644 sale_sourced_by_line/i18n/vi_VN.po create mode 100644 sale_sourced_by_line/i18n/zh_CN.po diff --git a/sale_sourced_by_line/i18n/ca.po b/sale_sourced_by_line/i18n/ca.po new file mode 100644 index 00000000000..be5f95518d8 --- /dev/null +++ b/sale_sourced_by_line/i18n/ca.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: OCA Transbot , 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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Comandes de venda" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línia de comanda de vendes" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/de.po b/sale_sourced_by_line/i18n/de.po new file mode 100644 index 00000000000..6b9f47c0296 --- /dev/null +++ b/sale_sourced_by_line/i18n/de.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Verkaufsauftrag" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Auftragsposition" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/el_GR.po b/sale_sourced_by_line/i18n/el_GR.po new file mode 100644 index 00000000000..68ff042c554 --- /dev/null +++ b/sale_sourced_by_line/i18n/el_GR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# Kostas Goutoudis , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: Kostas Goutoudis , 2017\n" +"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: el_GR\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Εντολή Πώλησης" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/es.po b/sale_sourced_by_line/i18n/es.po new file mode 100644 index 00000000000..28c35264680 --- /dev/null +++ b/sale_sourced_by_line/i18n/es.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +# Pedro M. Baeza , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Pedido de venta" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/es_ES.po b/sale_sourced_by_line/i18n/es_ES.po new file mode 100644 index 00000000000..77966862cb8 --- /dev/null +++ b/sale_sourced_by_line/i18n/es_ES.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Spain) (https://www.transifex.com/oca/teams/23907/es_ES/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_ES\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Pedido de venta" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/es_VE.po b/sale_sourced_by_line/i18n/es_VE.po new file mode 100644 index 00000000000..d69e71dd019 --- /dev/null +++ b/sale_sourced_by_line/i18n/es_VE.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Spanish (Venezuela) (https://www.transifex.com/oca/teams/23907/es_VE/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_VE\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Pedidos de venta" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/fi.po b/sale_sourced_by_line/i18n/fi.po new file mode 100644 index 00000000000..11f5f8407ec --- /dev/null +++ b/sale_sourced_by_line/i18n/fi.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+0000\n" +"Last-Translator: OCA Transbot , 2017\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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Myyntitilaus" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/fr.po b/sale_sourced_by_line/i18n/fr.po new file mode 100644 index 00000000000..03be5417e51 --- /dev/null +++ b/sale_sourced_by_line/i18n/fr.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Bon de commande" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sales Order Line" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/hr.po b/sale_sourced_by_line/i18n/hr.po new file mode 100644 index 00000000000..2039f9a595e --- /dev/null +++ b/sale_sourced_by_line/i18n/hr.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+0000\n" +"Last-Translator: Bole , 2017\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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Prodajni nalog" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Stavka ponude" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/hr_HR.po b/sale_sourced_by_line/i18n/hr_HR.po new file mode 100644 index 00000000000..5a85cd5be86 --- /dev/null +++ b/sale_sourced_by_line/i18n/hr_HR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Prodjani nalog" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/hu.po b/sale_sourced_by_line/i18n/hu.po new file mode 100644 index 00000000000..c83fba6de29 --- /dev/null +++ b/sale_sourced_by_line/i18n/hu.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hu\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Vevői megrendelés" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po new file mode 100644 index 00000000000..cbde5d6e0af --- /dev/null +++ b/sale_sourced_by_line/i18n/it.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-02 17:59+0000\n" +"PO-Revision-Date: 2015-09-03 07:10+0000\n" +"Last-Translator: <>\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/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: sale_sourced_by_line +#: help:sale.order.line,warehouse_id:0 +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_stock_picking +msgid "Picking List" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Ordini vendita" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linea d'ordine di vendita" + +#. module: sale_sourced_by_line +#: field:sale.order.line,warehouse_id:0 +msgid "Source Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: view:sale.order:sale_sourced_by_line.view_order_form_form +msgid "{'default_warehouse_id': warehouse_id}" +msgstr "" diff --git a/sale_sourced_by_line/i18n/nl.po b/sale_sourced_by_line/i18n/nl.po new file mode 100644 index 00000000000..9e335af2b49 --- /dev/null +++ b/sale_sourced_by_line/i18n/nl.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Verkooporder" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/nl_NL.po b/sale_sourced_by_line/i18n/nl_NL.po new file mode 100644 index 00000000000..de13bddc7c1 --- /dev/null +++ b/sale_sourced_by_line/i18n/nl_NL.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Verkooporder" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Verkooporderregel" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/pt.po b/sale_sourced_by_line/i18n/pt.po new file mode 100644 index 00000000000..6510cb2a21f --- /dev/null +++ b/sale_sourced_by_line/i18n/pt.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# Daniel Reis , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: Daniel Reis , 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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Ordem de Venda" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/pt_BR.po b/sale_sourced_by_line/i18n/pt_BR.po new file mode 100644 index 00000000000..9624628ec60 --- /dev/null +++ b/sale_sourced_by_line/i18n/pt_BR.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +# Paulo Ricardo , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: Paulo Ricardo , 2017\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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Pedido de Venda" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linha Pedido de Venda" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/ro.po b/sale_sourced_by_line/i18n/ro.po new file mode 100644 index 00000000000..9f592bf7ad5 --- /dev/null +++ b/sale_sourced_by_line/i18n/ro.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# Dorin Hongu , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: Dorin Hongu , 2017\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ro\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Comandă vânzare" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linie comandă vânzare" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/sk.po b/sale_sourced_by_line/i18n/sk.po new file mode 100644 index 00000000000..3acfb47bee1 --- /dev/null +++ b/sale_sourced_by_line/i18n/sk.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-27 03:53+0000\n" +"PO-Revision-Date: 2018-01-27 03:53+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Slovak (https://www.transifex.com/oca/teams/23907/sk/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sk\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Objednávka predaja" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/sl.po b/sale_sourced_by_line/i18n/sl.po index 0a2cb6272db..e719c93cb42 100644 --- a/sale_sourced_by_line/i18n/sl.po +++ b/sale_sourced_by_line/i18n/sl.po @@ -6,7 +6,7 @@ # 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: 2017-11-23 01:51+0000\n" "PO-Revision-Date: 2017-11-23 01:51+0000\n" @@ -20,19 +20,11 @@ msgstr "" "%100==4 ? 2 : 3);\n" #. module: sale_sourced_by_line -#: help:sale.order.line,warehouse_id:0 -msgid "If a source warehouse is selected, it will be used to define the route. Otherwise, it will get the warehouse of the sale order" -msgstr "Ob izbiri izvornega skladišča, bo to uporabljeno za določitev proge. Drugače bo izbrano skladišče iz prodajnega naloga" - -#. module: sale_sourced_by_line -#: model:ir.model,name:sale_sourced_by_line.model_stock_picking -msgid "Picking List" -msgstr "Zbirnik" - -#. module: sale_sourced_by_line -#: field:sale.order.line,procurement_group_id:0 -msgid "Procurement group" -msgstr "Skupina oskrbovanja" +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order @@ -45,6 +37,6 @@ msgid "Sales Order Line" msgstr "Postavka prodajnega naloga" #. module: sale_sourced_by_line -#: field:sale.order.line,warehouse_id:0 +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" -msgstr "Izvorno skladišče" +msgstr "" diff --git a/sale_sourced_by_line/i18n/tr.po b/sale_sourced_by_line/i18n/tr.po new file mode 100644 index 00000000000..301bbf2ee87 --- /dev/null +++ b/sale_sourced_by_line/i18n/tr.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-23 01:51+0000\n" +"PO-Revision-Date: 2017-11-23 01:51+0000\n" +"Last-Translator: OCA Transbot , 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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Sipariş Emri" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Satış Siparişi Hattı" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/tr_TR.po b/sale_sourced_by_line/i18n/tr_TR.po new file mode 100644 index 00000000000..8668059968a --- /dev/null +++ b/sale_sourced_by_line/i18n/tr_TR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: OCA Transbot , 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: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Satış emri" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sipariş emri satırı " + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/vi_VN.po b/sale_sourced_by_line/i18n/vi_VN.po new file mode 100644 index 00000000000..fd787e60b98 --- /dev/null +++ b/sale_sourced_by_line/i18n/vi_VN.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-28 03:43+0000\n" +"PO-Revision-Date: 2017-02-28 03:43+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Vietnamese (Viet Nam) (https://www.transifex.com/oca/teams/23907/vi_VN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: vi_VN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "Đơn hàng Bán" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +msgid "Source Warehouse" +msgstr "" diff --git a/sale_sourced_by_line/i18n/zh_CN.po b/sale_sourced_by_line/i18n/zh_CN.po new file mode 100644 index 00000000000..a59b3feee66 --- /dev/null +++ b/sale_sourced_by_line/i18n/zh_CN.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_sourced_by_line +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-09 12:27+0000\n" +"PO-Revision-Date: 2015-09-03 07:10+0000\n" +"Last-Translator: <>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-sale-workflow-8-0/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: sale_sourced_by_line +#: help:sale.order.line,warehouse_id:0 +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_stock_picking +msgid "Picking List" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order +msgid "Sales Order" +msgstr "销售订单" + +#. module: sale_sourced_by_line +#: model:ir.model,name:sale_sourced_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_sourced_by_line +#: field:sale.order.line,warehouse_id:0 +msgid "Source Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: view:sale.order:sale_sourced_by_line.view_order_form_form +msgid "{'default_warehouse_id': warehouse_id}" +msgstr "" From 24d61ebae24b7dee3fb4857532d7e4a10f1c98b5 Mon Sep 17 00:00:00 2001 From: Emmanuel HURET Date: Fri, 27 Dec 2019 23:50:24 +0100 Subject: [PATCH 38/60] [12.0] [MIG] sale_sourced_by_line --- sale_sourced_by_line/README.rst | 1 + sale_sourced_by_line/__manifest__.py | 3 ++- sale_sourced_by_line/i18n/ca.po | 4 ++-- sale_sourced_by_line/i18n/de.po | 4 ++-- sale_sourced_by_line/i18n/el_GR.po | 7 ++++--- sale_sourced_by_line/i18n/es.po | 4 ++-- sale_sourced_by_line/i18n/es_ES.po | 7 ++++--- sale_sourced_by_line/i18n/es_VE.po | 7 ++++--- sale_sourced_by_line/i18n/fi.po | 4 ++-- sale_sourced_by_line/i18n/fr.po | 4 ++-- sale_sourced_by_line/i18n/hr.po | 7 ++++--- sale_sourced_by_line/i18n/hr_HR.po | 10 ++++++---- sale_sourced_by_line/i18n/hu.po | 4 ++-- sale_sourced_by_line/i18n/it.po | 21 ++++++--------------- sale_sourced_by_line/i18n/nl.po | 4 ++-- sale_sourced_by_line/i18n/nl_NL.po | 7 ++++--- sale_sourced_by_line/i18n/pt.po | 4 ++-- sale_sourced_by_line/i18n/pt_BR.po | 7 ++++--- sale_sourced_by_line/i18n/ro.po | 7 ++++--- sale_sourced_by_line/i18n/sk.po | 4 ++-- sale_sourced_by_line/i18n/tr.po | 4 ++-- sale_sourced_by_line/i18n/tr_TR.po | 7 ++++--- sale_sourced_by_line/i18n/vi_VN.po | 7 ++++--- sale_sourced_by_line/i18n/zh_CN.po | 21 ++++++--------------- sale_sourced_by_line/model/sale.py | 12 ++++++++---- 25 files changed, 85 insertions(+), 86 deletions(-) diff --git a/sale_sourced_by_line/README.rst b/sale_sourced_by_line/README.rst index 24f0b9ec991..e4a8c3cb0bc 100644 --- a/sale_sourced_by_line/README.rst +++ b/sale_sourced_by_line/README.rst @@ -46,6 +46,7 @@ Contributors * Yannick Vaucher * Eficent Business and IT Consulting Services S.L. * Serpent Consulting Services Pvt. Ltd. +* Info A Tout Prix Do not contact contributors directly about support or help with technical issues. diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index ed14539299d..6a66cc57e08 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -7,10 +7,11 @@ { 'name': 'Sale Sourced by Line', 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '10.0.1.0.0', + 'version': '12.0.1.0.0', "author": "Camptocamp," "Eficent," "SerpentCS," + "Info a tout prix," "Odoo Community Association (OCA)", 'category': 'Warehouse', 'license': 'AGPL-3', diff --git a/sale_sourced_by_line/i18n/ca.po b/sale_sourced_by_line/i18n/ca.po index be5f95518d8..b9de269ba1f 100644 --- a/sale_sourced_by_line/i18n/ca.po +++ b/sale_sourced_by_line/i18n/ca.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: OCA Transbot , 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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/de.po b/sale_sourced_by_line/i18n/de.po index 6b9f47c0296..a6533a64d25 100644 --- a/sale_sourced_by_line/i18n/de.po +++ b/sale_sourced_by_line/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-11-23 01:51+0000\n" "Last-Translator: OCA Transbot , 2017\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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/el_GR.po b/sale_sourced_by_line/i18n/el_GR.po index 68ff042c554..19087251722 100644 --- a/sale_sourced_by_line/i18n/el_GR.po +++ b/sale_sourced_by_line/i18n/el_GR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # Kostas Goutoudis , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: Kostas Goutoudis , 2017\n" -"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/el_GR/)\n" +"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/" +"el_GR/)\n" +"Language: el_GR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: el_GR\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/es.po b/sale_sourced_by_line/i18n/es.po index 28c35264680..4c70633376c 100644 --- a/sale_sourced_by_line/i18n/es.po +++ b/sale_sourced_by_line/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 # Pedro M. Baeza , 2017 @@ -13,10 +13,10 @@ msgstr "" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: Pedro M. Baeza , 2017\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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/es_ES.po b/sale_sourced_by_line/i18n/es_ES.po index 77966862cb8..918b647ab4b 100644 --- a/sale_sourced_by_line/i18n/es_ES.po +++ b/sale_sourced_by_line/i18n/es_ES.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: OCA Transbot , 2017\n" -"Language-Team: Spanish (Spain) (https://www.transifex.com/oca/teams/23907/es_ES/)\n" +"Language-Team: Spanish (Spain) (https://www.transifex.com/oca/teams/23907/" +"es_ES/)\n" +"Language: es_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es_ES\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/es_VE.po b/sale_sourced_by_line/i18n/es_VE.po index d69e71dd019..863d50cc8b5 100644 --- a/sale_sourced_by_line/i18n/es_VE.po +++ b/sale_sourced_by_line/i18n/es_VE.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: OCA Transbot , 2017\n" -"Language-Team: Spanish (Venezuela) (https://www.transifex.com/oca/teams/23907/es_VE/)\n" +"Language-Team: Spanish (Venezuela) (https://www.transifex.com/oca/" +"teams/23907/es_VE/)\n" +"Language: es_VE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es_VE\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/fi.po b/sale_sourced_by_line/i18n/fi.po index 11f5f8407ec..5aa7d1c762e 100644 --- a/sale_sourced_by_line/i18n/fi.po +++ b/sale_sourced_by_line/i18n/fi.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-11-23 01:51+0000\n" "Last-Translator: OCA Transbot , 2017\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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/fr.po b/sale_sourced_by_line/i18n/fr.po index 03be5417e51..d88024ba89f 100644 --- a/sale_sourced_by_line/i18n/fr.po +++ b/sale_sourced_by_line/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-11-23 01:51+0000\n" "Last-Translator: OCA Transbot , 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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/hr.po b/sale_sourced_by_line/i18n/hr.po index 2039f9a595e..29ef32ad14b 100644 --- a/sale_sourced_by_line/i18n/hr.po +++ b/sale_sourced_by_line/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 # Bole , 2017 @@ -13,11 +13,12 @@ msgstr "" "PO-Revision-Date: 2017-11-23 01:51+0000\n" "Last-Translator: Bole , 2017\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: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id diff --git a/sale_sourced_by_line/i18n/hr_HR.po b/sale_sourced_by_line/i18n/hr_HR.po index 5a85cd5be86..fb0b7c503cd 100644 --- a/sale_sourced_by_line/i18n/hr_HR.po +++ b/sale_sourced_by_line/i18n/hr_HR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # Bole , 2017 msgid "" @@ -11,12 +11,14 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: Bole , 2017\n" -"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: hr_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: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id diff --git a/sale_sourced_by_line/i18n/hu.po b/sale_sourced_by_line/i18n/hu.po index c83fba6de29..7128a92c359 100644 --- a/sale_sourced_by_line/i18n/hu.po +++ b/sale_sourced_by_line/i18n/hu.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Hungarian (https://www.transifex.com/oca/teams/23907/hu/)\n" +"Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: hu\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po index cbde5d6e0af..273107fbf09 100644 --- a/sale_sourced_by_line/i18n/it.po +++ b/sale_sourced_by_line/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: msgid "" msgstr "" @@ -10,25 +10,21 @@ msgstr "" "POT-Creation-Date: 2015-10-02 17:59+0000\n" "PO-Revision-Date: 2015-09-03 07:10+0000\n" "Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/language/it/)\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/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: sale_sourced_by_line -#: help:sale.order.line,warehouse_id:0 +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" -#. module: sale_sourced_by_line -#: model:ir.model,name:sale_sourced_by_line.model_stock_picking -msgid "Picking List" -msgstr "" - #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -40,11 +36,6 @@ msgid "Sales Order Line" msgstr "Linea d'ordine di vendita" #. module: sale_sourced_by_line -#: field:sale.order.line,warehouse_id:0 +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" msgstr "" - -#. module: sale_sourced_by_line -#: view:sale.order:sale_sourced_by_line.view_order_form_form -msgid "{'default_warehouse_id': warehouse_id}" -msgstr "" diff --git a/sale_sourced_by_line/i18n/nl.po b/sale_sourced_by_line/i18n/nl.po index 9e335af2b49..766ac4af53e 100644 --- a/sale_sourced_by_line/i18n/nl.po +++ b/sale_sourced_by_line/i18n/nl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-11-23 01:51+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/nl_NL.po b/sale_sourced_by_line/i18n/nl_NL.po index de13bddc7c1..1d4d276ef80 100644 --- a/sale_sourced_by_line/i18n/nl_NL.po +++ b/sale_sourced_by_line/i18n/nl_NL.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # Peter Hageman , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-11-23 01:51+0000\n" "PO-Revision-Date: 2017-11-23 01:51+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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/pt.po b/sale_sourced_by_line/i18n/pt.po index 6510cb2a21f..f0b0c58e408 100644 --- a/sale_sourced_by_line/i18n/pt.po +++ b/sale_sourced_by_line/i18n/pt.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # Daniel Reis , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: Daniel Reis , 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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/pt_BR.po b/sale_sourced_by_line/i18n/pt_BR.po index 9624628ec60..ae2d8c72498 100644 --- a/sale_sourced_by_line/i18n/pt_BR.po +++ b/sale_sourced_by_line/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 # Paulo Ricardo , 2017 @@ -12,11 +12,12 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: Paulo Ricardo , 2017\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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/ro.po b/sale_sourced_by_line/i18n/ro.po index 9f592bf7ad5..d34c4f45e73 100644 --- a/sale_sourced_by_line/i18n/ro.po +++ b/sale_sourced_by_line/i18n/ro.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # Dorin Hongu , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: Dorin Hongu , 2017\n" "Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id diff --git a/sale_sourced_by_line/i18n/sk.po b/sale_sourced_by_line/i18n/sk.po index 3acfb47bee1..06f4c1a691f 100644 --- a/sale_sourced_by_line/i18n/sk.po +++ b/sale_sourced_by_line/i18n/sk.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-01-27 03:53+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Slovak (https://www.transifex.com/oca/teams/23907/sk/)\n" +"Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: sk\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/tr.po b/sale_sourced_by_line/i18n/tr.po index 301bbf2ee87..6c7e90bc042 100644 --- a/sale_sourced_by_line/i18n/tr.po +++ b/sale_sourced_by_line/i18n/tr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-11-23 01:51+0000\n" "Last-Translator: OCA Transbot , 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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/tr_TR.po b/sale_sourced_by_line/i18n/tr_TR.po index 8668059968a..97aba352ede 100644 --- a/sale_sourced_by_line/i18n/tr_TR.po +++ b/sale_sourced_by_line/i18n/tr_TR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: OCA Transbot , 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: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/vi_VN.po b/sale_sourced_by_line/i18n/vi_VN.po index fd787e60b98..b55b09c246e 100644 --- a/sale_sourced_by_line/i18n/vi_VN.po +++ b/sale_sourced_by_line/i18n/vi_VN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2017-02-28 03:43+0000\n" "Last-Translator: OCA Transbot , 2017\n" -"Language-Team: Vietnamese (Viet Nam) (https://www.transifex.com/oca/teams/23907/vi_VN/)\n" +"Language-Team: Vietnamese (Viet Nam) (https://www.transifex.com/oca/" +"teams/23907/vi_VN/)\n" +"Language: vi_VN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: vi_VN\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: sale_sourced_by_line diff --git a/sale_sourced_by_line/i18n/zh_CN.po b/sale_sourced_by_line/i18n/zh_CN.po index a59b3feee66..6e6ee074825 100644 --- a/sale_sourced_by_line/i18n/zh_CN.po +++ b/sale_sourced_by_line/i18n/zh_CN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * sale_sourced_by_line -# +# # Translators: msgid "" msgstr "" @@ -10,25 +10,21 @@ msgstr "" "POT-Creation-Date: 2015-09-09 12:27+0000\n" "PO-Revision-Date: 2015-09-03 07:10+0000\n" "Last-Translator: <>\n" -"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-sale-workflow-8-0/language/zh_CN/)\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-sale-" +"workflow-8-0/language/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: sale_sourced_by_line -#: help:sale.order.line,warehouse_id:0 +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" -#. module: sale_sourced_by_line -#: model:ir.model,name:sale_sourced_by_line.model_stock_picking -msgid "Picking List" -msgstr "" - #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -40,11 +36,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: field:sale.order.line,warehouse_id:0 +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" msgstr "" - -#. module: sale_sourced_by_line -#: view:sale.order:sale_sourced_by_line.view_order_form_form -msgid "{'default_warehouse_id': warehouse_id}" -msgstr "" diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 671b49fd742..6d8749207c9 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -43,11 +43,15 @@ class SaleOrderLine(models.Model): "the sale order") @api.multi - def _prepare_order_line_procurement(self, group_id=False): - values = super(SaleOrderLine, self).\ - _prepare_order_line_procurement(group_id=group_id) + def _prepare_procurement_values(self, group_id=False): + """ Prepare specific key for moves or other components that will be created from a stock rule + comming from a sale order line. This method could be override in order to add other custom key that could + be used in move/po creation. + """ + values = super(SaleOrderLine, self)._prepare_procurement_values(group_id) + self.ensure_one() if self.warehouse_id: - values['warehouse_id'] = self.warehouse_id.id + values['warehouse_id'] = self.warehouse_id return values @api.multi From 48a4ee0bca17d6992317f7d6b9748628885709c6 Mon Sep 17 00:00:00 2001 From: Murtuza Saleh Date: Mon, 14 Jun 2021 13:41:59 +0530 Subject: [PATCH 39/60] [FIX] Travis --- sale_sourced_by_line/__init__.py | 1 - sale_sourced_by_line/__manifest__.py | 32 ++-- sale_sourced_by_line/model/__init__.py | 1 - sale_sourced_by_line/model/sale.py | 44 +++-- .../test/sale_order_multi_source.yml | 28 +-- .../test/sale_order_not_sourced.yml | 29 +-- .../test/sale_order_source.yml | 28 +-- sale_sourced_by_line/tests/__init__.py | 1 - .../tests/test_sale_is_delivered.py | 34 ++-- .../tests/test_sale_sourced_by_line.py | 181 ++++++++++-------- sale_sourced_by_line/view/sale_view.xml | 58 +++--- 11 files changed, 214 insertions(+), 223 deletions(-) diff --git a/sale_sourced_by_line/__init__.py b/sale_sourced_by_line/__init__.py index 7d7340f9259..fbf47358c4f 100644 --- a/sale_sourced_by_line/__init__.py +++ b/sale_sourced_by_line/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier # © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 6a66cc57e08..5f354c5cccb 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -1,26 +1,24 @@ -# -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier # © 2016-17 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'Sale Sourced by Line', - 'summary': 'Multiple warehouse source locations for Sale order', - 'version': '12.0.1.0.0', + "name": "Sale Sourced by Line", + "summary": "Multiple warehouse source locations for Sale order", + "version": "14.0.1.0.0", "author": "Camptocamp," - "Eficent," - "SerpentCS," - "Info a tout prix," - "Odoo Community Association (OCA)", - 'category': 'Warehouse', - 'license': 'AGPL-3', - 'website': "https://github.com/OCA/sale-workflow", - 'depends': ['sale_stock', - 'sale_procurement_group_by_line', - ], - 'data': [ - 'view/sale_view.xml' + "Eficent," + "SerpentCS," + "Info a tout prix," + "Odoo Community Association (OCA)", + "category": "Warehouse", + "license": "AGPL-3", + "website": "https://github.com/OCA/sale-workflow", + "depends": [ + "sale_stock", + "sale_procurement_group_by_line", ], - 'installable': True, + "data": ["view/sale_view.xml"], + "installable": True, } diff --git a/sale_sourced_by_line/model/__init__.py b/sale_sourced_by_line/model/__init__.py index 100c4bc7fd8..c8ffbeab730 100644 --- a/sale_sourced_by_line/model/__init__.py +++ b/sale_sourced_by_line/model/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier # © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 6d8749207c9..84338aa8fab 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier # © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. @@ -9,7 +8,7 @@ class SaleOrder(models.Model): - _inherit = 'sale.order' + _inherit = "sale.order" @api.model def _prepare_procurement_group_by_line(self, line): @@ -17,46 +16,50 @@ def _prepare_procurement_group_by_line(self, line): # for compatibility with sale_quotation_sourcing if line._get_procurement_group_key()[0] == 10: if line.warehouse_id: - vals['name'] += '/' + line.warehouse_id.name + vals["name"] += "/" + line.warehouse_id.name return vals warehouse_id = fields.Many2one( - 'stock.warehouse', - string='Default Warehouse', + "stock.warehouse", + string="Default Warehouse", readonly=True, - states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, + states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, help="If no source warehouse is selected on line, " - "this warehouse is used as default. ") + "this warehouse is used as default. ", + ) class SaleOrderLine(models.Model): - _inherit = 'sale.order.line' + _inherit = "sale.order.line" warehouse_id = fields.Many2one( - 'stock.warehouse', - 'Source Warehouse', + "stock.warehouse", + "Source Warehouse", readonly=True, - states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, + states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, help="If a source warehouse is selected, " - "it will be used to define the route. " - "Otherwise, it will get the warehouse of " - "the sale order") + "it will be used to define the route. " + "Otherwise, it will get the warehouse of " + "the sale order", + ) @api.multi def _prepare_procurement_values(self, group_id=False): - """ Prepare specific key for moves or other components that will be created from a stock rule - comming from a sale order line. This method could be override in order to add other custom key that could + """Prepare specific key for moves or other components + that will be created from a stock rule + comming from a sale order line. This method could be + override in order to add other custom key that could be used in move/po creation. """ values = super(SaleOrderLine, self)._prepare_procurement_values(group_id) self.ensure_one() if self.warehouse_id: - values['warehouse_id'] = self.warehouse_id + values["warehouse_id"] = self.warehouse_id return values @api.multi def _get_procurement_group_key(self): - """ Return a key with priority to be used to regroup lines in multiple + """Return a key with priority to be used to regroup lines in multiple procurement groups """ @@ -65,6 +68,7 @@ def _get_procurement_group_key(self): # Check priority if key[0] >= priority: return key - wh_id = self.warehouse_id.id if self.warehouse_id else \ - self.order_id.warehouse_id.id + wh_id = ( + self.warehouse_id.id if self.warehouse_id else self.order_id.warehouse_id.id + ) return priority, wh_id diff --git a/sale_sourced_by_line/test/sale_order_multi_source.yml b/sale_sourced_by_line/test/sale_order_multi_source.yml index 2a3cccd0e20..2daad8e3ee0 100644 --- a/sale_sourced_by_line/test/sale_order_multi_source.yml +++ b/sale_sourced_by_line/test/sale_order_multi_source.yml @@ -1,9 +1,6 @@ -- - In order to check if the source warehouse of a sale order line - becomes the source warehouse of the delivery stock move. - I create a sale order. -- - !record {model: sale.order, id: sale_multi_source_01}: +- In order to check if the source warehouse of a sale order line becomes the source + warehouse of the delivery stock move. I create a sale order. +- !record {model: sale.order, id: sale_multi_source_01}: partner_id: base.res_partner_2 note: Invoice after delivery order_line: @@ -13,21 +10,14 @@ - product_id: product.product_product_24 product_uom_qty: 18 warehouse_id: stock.warehouse0 -- - When I confirm the sale order -- - !workflow {model: sale.order, action: order_confirm, ref: sale_multi_source_01} -- - Then a delivery order should have been generated -- - !python {model: sale.order, id: sale_multi_source_01}: | +- When I confirm the sale order +- !workflow {model: sale.order, action: order_confirm, ref: sale_multi_source_01} +- Then a delivery order should have been generated +- !python {model: sale.order, id: sale_multi_source_01}: | assert len(self.picking_ids) == 2, ( "2 delivery order expected, got %d" % len(self.picking_ids)) -- - And the source location of the stock move should be the one of - the sale order line -- - !python {model: sale.order, id: sale_multi_source_01}: | +- And the source location of the stock move should be the one of the sale order line +- !python {model: sale.order, id: sale_multi_source_01}: | for line in self.order_line: expected_location = line.warehouse_id.lot_stock_id for pick in self.picking_ids: diff --git a/sale_sourced_by_line/test/sale_order_not_sourced.yml b/sale_sourced_by_line/test/sale_order_not_sourced.yml index 3315d2c3cad..06bf63807a5 100644 --- a/sale_sourced_by_line/test/sale_order_not_sourced.yml +++ b/sale_sourced_by_line/test/sale_order_not_sourced.yml @@ -1,30 +1,21 @@ -- - In order to check if the source location of a sale order line - still use the location of the shop if not specified on the - sale order line. -- - !record {model: sale.order, id: sale_notsourced_01}: +- In order to check if the source location of a sale order line still use the location + of the shop if not specified on the sale order line. +- !record {model: sale.order, id: sale_notsourced_01}: partner_id: base.res_partner_2 note: Invoice after delivery order_line: - product_id: product.product_product_32 product_uom_qty: 8 -- - When I confirm the sale order -- - !workflow {model: sale.order, action: order_confirm, ref: sale_notsourced_01} -- - Then a delivery order should have been generated -- - !python {model: sale.order}: | +- When I confirm the sale order +- !workflow {model: sale.order, action: order_confirm, ref: sale_notsourced_01} +- Then a delivery order should have been generated +- !python {model: sale.order}: | sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) assert len(sale_order.picking_ids) == 1, ( "1 delivery order expected, got %d" % len(sale_order.picking_ids)) -- - And the source location of the stock move should be the one of - the sales order's warehouse -- - !python {model: sale.order, id: sale_notsourced_01}: | +- And the source location of the stock move should be the one of the sales order's + warehouse +- !python {model: sale.order, id: sale_notsourced_01}: | picking = self.picking_ids[0] expected_location = self.warehouse_id.lot_stock_id for move in picking.move_lines: diff --git a/sale_sourced_by_line/test/sale_order_source.yml b/sale_sourced_by_line/test/sale_order_source.yml index e482db0fb4b..4ac08ca26de 100644 --- a/sale_sourced_by_line/test/sale_order_source.yml +++ b/sale_sourced_by_line/test/sale_order_source.yml @@ -1,30 +1,20 @@ -- - In order to check if the source warehouse of a sale order line - becomes the source warehouse of the delivery stock move. - I create a sale order. -- - !record {model: sale.order, id: sale_source_01}: +- In order to check if the source warehouse of a sale order line becomes the source + warehouse of the delivery stock move. I create a sale order. +- !record {model: sale.order, id: sale_source_01}: partner_id: base.res_partner_2 note: Invoice after delivery order_line: - product_id: product.product_product_32 product_uom_qty: 8 warehouse_id: stock.stock_warehouse_shop0 -- - When I confirm the sale order -- - !workflow {model: sale.order, action: order_confirm, ref: sale_source_01} -- - Then a delivery order should have been generated -- - !python {model: sale.order, id: sale_source_01}: | +- When I confirm the sale order +- !workflow {model: sale.order, action: order_confirm, ref: sale_source_01} +- Then a delivery order should have been generated +- !python {model: sale.order, id: sale_source_01}: | assert len(self.picking_ids) == 1, ( "1 delivery order expected, got %d" % len(self.picking_ids)) -- - And the source location of the stock move should be the one of - the sale order line -- - !python {model: sale.order, id: sale_source_01}: | +- And the source location of the stock move should be the one of the sale order line +- !python {model: sale.order, id: sale_source_01}: | picking = self.picking_ids[0] for move in picking.move_lines: expected_location = move.warehouse_id.lot_stock_id diff --git a/sale_sourced_by_line/tests/__init__.py b/sale_sourced_by_line/tests/__init__.py index cbc3428a5f8..487347a027d 100644 --- a/sale_sourced_by_line/tests/__init__.py +++ b/sale_sourced_by_line/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier # © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. diff --git a/sale_sourced_by_line/tests/test_sale_is_delivered.py b/sale_sourced_by_line/tests/test_sale_is_delivered.py index 0186d25f341..44a888333ba 100644 --- a/sale_sourced_by_line/tests/test_sale_is_delivered.py +++ b/sale_sourced_by_line/tests/test_sale_is_delivered.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2014 Camptocamp SA - Yannick Vaucher # Copyright 2017 Eficent Business and IT Consulting Services S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). @@ -26,26 +25,24 @@ def test_sale_no_proc_all_services(self): def test_sale_not_all_proc(self): """False, when one line with and one without procurement done""" self.sale_line1.procurement_group_id = self.proc_group1 - self.proc1.state = 'done' + self.proc1.state = "done" self.assertFalse(self.sale.shipped) def test_sale_proc_and_service(self): - """True when, one line with procurement done and one line for service - """ + """True when, one line with procurement done and one line for service""" self.sale_line1.procurement_group_id = self.proc_group1 - self.proc1.state = 'done' + self.proc1.state = "done" self.sale_line2.product_id = self.service_product self.assertTrue(self.sale.shipped) def test_sale_partially_delivered(self): - """False when, all lines with procurement, one is partially delivered - """ + """False when, all lines with procurement, one is partially delivered""" self.sale_line1.procurement_group_id = self.proc_group1 self.sale_line2.procurement_group_id = self.proc_group2 - self.proc1.state = 'done' - self.proc2.state = 'running' + self.proc1.state = "done" + self.proc2.state = "running" self.assertFalse(self.sale.shipped) @@ -53,8 +50,8 @@ def test_sale_is_delivered(self): """True, when both line have a done procurement""" self.sale_line1.procurement_group_id = self.proc_group1 self.sale_line2.procurement_group_id = self.proc_group2 - self.proc1.state = 'done' - self.proc2.state = 'done' + self.proc1.state = "done" + self.proc2.state = "done" self.assertTrue(self.sale.shipped) @@ -67,19 +64,18 @@ def setUp(self): """ super(TestSaleIsDelivered, self).setUp() - so = self.env['sale.order'] - sol = self.env['sale.order.line'] - product = self.env['product.product'] - procurement = self.env['procurement.order'] - procurement_group = self.env['procurement.group'] + so = self.env["sale.order"] + sol = self.env["sale.order.line"] + product = self.env["product.product"] + procurement = self.env["procurement.order"] + procurement_group = self.env["procurement.group"] self.sale = so.new() self.sale_line1 = sol.new() self.sale_line2 = sol.new() self.sale_line1.order_id = self.sale self.sale_line2.order_id = self.sale - self.sale.order_line = sol.browse([self.sale_line1.id, - self.sale_line2.id]) + self.sale.order_line = sol.browse([self.sale_line1.id, self.sale_line2.id]) self.proc1 = procurement.new() self.proc_group1 = procurement_group.new() @@ -89,4 +85,4 @@ def setUp(self): self.proc_group2 = procurement_group.new() self.proc_group2.procurement_ids = self.proc2 - self.service_product = product.new({'type': 'service'}) + self.service_product = product.new({"type": "service"}) diff --git a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py index c786e68fc18..7c1d71a2574 100644 --- a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py +++ b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2013-2014 Camptocamp SA - Guewen Baconnier # © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Serpent Consulting Services Pvt. Ltd. @@ -8,104 +7,124 @@ class TestSaleSourcedByLine(TransactionCase): - def setUp(self): super(TestSaleSourcedByLine, self).setUp() - self.sale_order_model = self.env['sale.order'] - self.sale_order_line_model = self.env['sale.order.line'] - self.stock_move_model = self.env['stock.move'] + self.sale_order_model = self.env["sale.order"] + self.sale_order_line_model = self.env["sale.order.line"] + self.stock_move_model = self.env["stock.move"] # Refs - self.customer = self.env.ref('base.res_partner_2') - self.product_1 = self.env.ref('product.product_product_27') - self.product_2 = self.env.ref('product.product_product_24') - self.warehouse_shop0 = self.env.ref('stock.stock_warehouse_shop0') - self.warehouse0 = self.env.ref('stock.warehouse0') + self.customer = self.env.ref("base.res_partner_2") + self.product_1 = self.env.ref("product.product_product_27") + self.product_2 = self.env.ref("product.product_product_24") + self.warehouse_shop0 = self.env.ref("stock.stock_warehouse_shop0") + self.warehouse0 = self.env.ref("stock.warehouse0") def test_sales_order_multi_source(self): - so = self.sale_order_model.create({ - 'partner_id': self.customer.id, - }) - self.sale_order_line_model.create({ - 'product_id': self.product_1.id, - 'product_uom_qty': 8, - 'warehouse_id': self.warehouse_shop0.id, - 'order_id': so.id - }) - self.sale_order_line_model.create({ - 'product_id': self.product_2.id, - 'product_uom_qty': 8, - 'warehouse_id': self.warehouse0.id, - 'order_id': so.id - }) + so = self.sale_order_model.create( + { + "partner_id": self.customer.id, + } + ) + self.sale_order_line_model.create( + { + "product_id": self.product_1.id, + "product_uom_qty": 8, + "warehouse_id": self.warehouse_shop0.id, + "order_id": so.id, + } + ) + self.sale_order_line_model.create( + { + "product_id": self.product_2.id, + "product_uom_qty": 8, + "warehouse_id": self.warehouse0.id, + "order_id": so.id, + } + ) # confirm quotation so.action_confirm() - self.assertEquals(len(so.picking_ids), 2, - "2 delivery orders expected. Got %s instead" % - len(so.picking_ids)) + self.assertEquals( + len(so.picking_ids), + 2, + "2 delivery orders expected. Got %s instead" % len(so.picking_ids), + ) for line in so.order_line: - self.assertEquals(line.procurement_group_id.name, - line.order_id.name + '/' + - line.warehouse_id.name, - "The name of the procurement group is not " - "correct.") + self.assertEquals( + line.procurement_group_id.name, + line.order_id.name + "/" + line.warehouse_id.name, + "The name of the procurement group is not " "correct.", + ) for procurement in line.procurement_ids: - moves = self.stock_move_model.search([('procurement_id', '=', - procurement.id)]) + moves = self.stock_move_model.search( + [("procurement_id", "=", procurement.id)] + ) for move in moves: - self.assertEquals(move.group_id, - line.procurement_group_id, - "The group in the stock move does not " - "match with the procurement group in " - "the sales order line.") - self.assertEquals(move.picking_id.group_id, - line.procurement_group_id, - "The group in the stock picking does " - "not match with the procurement group " - "in the sales order line.") + self.assertEquals( + move.group_id, + line.procurement_group_id, + "The group in the stock move does not " + "match with the procurement group in " + "the sales order line.", + ) + self.assertEquals( + move.picking_id.group_id, + line.procurement_group_id, + "The group in the stock picking does " + "not match with the procurement group " + "in the sales order line.", + ) def test_sales_order_no_source(self): - so = self.sale_order_model.create({ - 'partner_id': self.customer.id, - 'warehouse_id': self.warehouse_shop0.id, - }) - self.sale_order_line_model.create({ - 'product_id': self.product_1.id, - 'product_uom_qty': 8, - 'order_id': so.id - }) - self.sale_order_line_model.create({ - 'product_id': self.product_2.id, - 'product_uom_qty': 8, - 'order_id': so.id - }) + so = self.sale_order_model.create( + { + "partner_id": self.customer.id, + "warehouse_id": self.warehouse_shop0.id, + } + ) + self.sale_order_line_model.create( + {"product_id": self.product_1.id, "product_uom_qty": 8, "order_id": so.id} + ) + self.sale_order_line_model.create( + {"product_id": self.product_2.id, "product_uom_qty": 8, "order_id": so.id} + ) # confirm quotation so.action_confirm() - self.assertEquals(len(so.picking_ids), 1, - "1 delivery order expected. Got %s instead" % - len(so.picking_ids)) + self.assertEquals( + len(so.picking_ids), + 1, + "1 delivery order expected. Got %s instead" % len(so.picking_ids), + ) def test_sale_order_source(self): - so = self.sale_order_model.create({ - 'partner_id': self.customer.id, - }) - self.sale_order_line_model.create({ - 'product_id': self.product_1.id, - 'product_uom_qty': 8, - 'warehouse_id': self.warehouse_shop0.id, - 'order_id': so.id - }) - self.sale_order_line_model.create({ - 'product_id': self.product_2.id, - 'product_uom_qty': 8, - 'warehouse_id': self.warehouse0.id, - 'order_id': so.id - }) + so = self.sale_order_model.create( + { + "partner_id": self.customer.id, + } + ) + self.sale_order_line_model.create( + { + "product_id": self.product_1.id, + "product_uom_qty": 8, + "warehouse_id": self.warehouse_shop0.id, + "order_id": so.id, + } + ) + self.sale_order_line_model.create( + { + "product_id": self.product_2.id, + "product_uom_qty": 8, + "warehouse_id": self.warehouse0.id, + "order_id": so.id, + } + ) # confirm quotation so.action_confirm() for line in so.order_line: for procurement in line.procurement_ids: - self.assertEquals(procurement.warehouse_id, - line.warehouse_id, - "The warehouse in the procurement does not " - "match with the Sales order line.") + self.assertEquals( + procurement.warehouse_id, + line.warehouse_id, + "The warehouse in the procurement does not " + "match with the Sales order line.", + ) diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index 861749ecbf8..61e10a17b79 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -1,28 +1,34 @@ - + - - sale.order.form - sale.order - - - - - - - - - sale.order.form - sale.order - - - - - - - {'default_warehouse_id': warehouse_id} - - - + + sale.order.form + sale.order + + + + + + + + + sale.order.form + sale.order + + + + + + + {'default_warehouse_id': warehouse_id} + + + From a992b05902fb5d1b85ddfff79199aa2d5b05b567 Mon Sep 17 00:00:00 2001 From: Murtuza Saleh Date: Tue, 15 Jun 2021 15:37:57 +0530 Subject: [PATCH 40/60] [14.0][MIG] sale_sourced_by_line --- sale_sourced_by_line/__manifest__.py | 1 - sale_sourced_by_line/model/sale.py | 3 +- .../test/sale_order_multi_source.yml | 31 ------- .../test/sale_order_not_sourced.yml | 27 ------ .../test/sale_order_source.yml | 26 ------ .../tests/test_sale_is_delivered.py | 88 ------------------- .../tests/test_sale_sourced_by_line.py | 63 +++++++------ 7 files changed, 35 insertions(+), 204 deletions(-) delete mode 100644 sale_sourced_by_line/test/sale_order_multi_source.yml delete mode 100644 sale_sourced_by_line/test/sale_order_not_sourced.yml delete mode 100644 sale_sourced_by_line/test/sale_order_source.yml delete mode 100644 sale_sourced_by_line/tests/test_sale_is_delivered.py diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 5f354c5cccb..49e6ce47a8c 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -16,7 +16,6 @@ "license": "AGPL-3", "website": "https://github.com/OCA/sale-workflow", "depends": [ - "sale_stock", "sale_procurement_group_by_line", ], "data": ["view/sale_view.xml"], diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 84338aa8fab..799bc01d0b1 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -36,6 +36,7 @@ class SaleOrderLine(models.Model): "stock.warehouse", "Source Warehouse", readonly=True, + related="", states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, help="If a source warehouse is selected, " "it will be used to define the route. " @@ -43,7 +44,6 @@ class SaleOrderLine(models.Model): "the sale order", ) - @api.multi def _prepare_procurement_values(self, group_id=False): """Prepare specific key for moves or other components that will be created from a stock rule @@ -57,7 +57,6 @@ def _prepare_procurement_values(self, group_id=False): values["warehouse_id"] = self.warehouse_id return values - @api.multi def _get_procurement_group_key(self): """Return a key with priority to be used to regroup lines in multiple procurement groups diff --git a/sale_sourced_by_line/test/sale_order_multi_source.yml b/sale_sourced_by_line/test/sale_order_multi_source.yml deleted file mode 100644 index 2daad8e3ee0..00000000000 --- a/sale_sourced_by_line/test/sale_order_multi_source.yml +++ /dev/null @@ -1,31 +0,0 @@ -- In order to check if the source warehouse of a sale order line becomes the source - warehouse of the delivery stock move. I create a sale order. -- !record {model: sale.order, id: sale_multi_source_01}: - partner_id: base.res_partner_2 - note: Invoice after delivery - order_line: - - product_id: product.product_product_32 - product_uom_qty: 8 - warehouse_id: stock.stock_warehouse_shop0 - - product_id: product.product_product_24 - product_uom_qty: 18 - warehouse_id: stock.warehouse0 -- When I confirm the sale order -- !workflow {model: sale.order, action: order_confirm, ref: sale_multi_source_01} -- Then a delivery order should have been generated -- !python {model: sale.order, id: sale_multi_source_01}: | - assert len(self.picking_ids) == 2, ( - "2 delivery order expected, got %d" % len(self.picking_ids)) -- And the source location of the stock move should be the one of the sale order line -- !python {model: sale.order, id: sale_multi_source_01}: | - for line in self.order_line: - expected_location = line.warehouse_id.lot_stock_id - for pick in self.picking_ids: - for move in pick.move_lines: - if line.product_id == move.product_id: - assert move.location_id == expected_location, ( - "Wrong location_id in stock.move, expected %s, got %s" % - (expected_location, move.location_id)) - assert move.procurement_id.rule_id.location_src_id == expected_location, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (expected_location, move.procurement_id.rule_id.location_src_id)) diff --git a/sale_sourced_by_line/test/sale_order_not_sourced.yml b/sale_sourced_by_line/test/sale_order_not_sourced.yml deleted file mode 100644 index 06bf63807a5..00000000000 --- a/sale_sourced_by_line/test/sale_order_not_sourced.yml +++ /dev/null @@ -1,27 +0,0 @@ -- In order to check if the source location of a sale order line still use the location - of the shop if not specified on the sale order line. -- !record {model: sale.order, id: sale_notsourced_01}: - partner_id: base.res_partner_2 - note: Invoice after delivery - order_line: - - product_id: product.product_product_32 - product_uom_qty: 8 -- When I confirm the sale order -- !workflow {model: sale.order, action: order_confirm, ref: sale_notsourced_01} -- Then a delivery order should have been generated -- !python {model: sale.order}: | - sale_order = self.browse(cr, uid, ref("sale_notsourced_01")) - assert len(sale_order.picking_ids) == 1, ( - "1 delivery order expected, got %d" % len(sale_order.picking_ids)) -- And the source location of the stock move should be the one of the sales order's - warehouse -- !python {model: sale.order, id: sale_notsourced_01}: | - picking = self.picking_ids[0] - expected_location = self.warehouse_id.lot_stock_id - for move in picking.move_lines: - assert move.location_id == expected_location, ( - "Wrong location_id, expected %s, got %s" % - (expected_location, move.location_id)) - assert move.procurement_id.rule_id.location_src_id == expected_location, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (expected_location, move.procurement_id.rule_id.location_src_id)) diff --git a/sale_sourced_by_line/test/sale_order_source.yml b/sale_sourced_by_line/test/sale_order_source.yml deleted file mode 100644 index 4ac08ca26de..00000000000 --- a/sale_sourced_by_line/test/sale_order_source.yml +++ /dev/null @@ -1,26 +0,0 @@ -- In order to check if the source warehouse of a sale order line becomes the source - warehouse of the delivery stock move. I create a sale order. -- !record {model: sale.order, id: sale_source_01}: - partner_id: base.res_partner_2 - note: Invoice after delivery - order_line: - - product_id: product.product_product_32 - product_uom_qty: 8 - warehouse_id: stock.stock_warehouse_shop0 -- When I confirm the sale order -- !workflow {model: sale.order, action: order_confirm, ref: sale_source_01} -- Then a delivery order should have been generated -- !python {model: sale.order, id: sale_source_01}: | - assert len(self.picking_ids) == 1, ( - "1 delivery order expected, got %d" % len(self.picking_ids)) -- And the source location of the stock move should be the one of the sale order line -- !python {model: sale.order, id: sale_source_01}: | - picking = self.picking_ids[0] - for move in picking.move_lines: - expected_location = move.warehouse_id.lot_stock_id - assert move.location_id == expected_location, ( - "Wrong location_id in stock.move, expected %s, got %s" % - (expected_location, move.location_id)) - assert move.procurement_id.rule_id.location_src_id == expected_location, ( - "Wrong location_id in procurement.order, expected %s, got %s" % - (expected_location, move.procurement_id.rule_id.location_src_id)) diff --git a/sale_sourced_by_line/tests/test_sale_is_delivered.py b/sale_sourced_by_line/tests/test_sale_is_delivered.py deleted file mode 100644 index 44a888333ba..00000000000 --- a/sale_sourced_by_line/tests/test_sale_is_delivered.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2014 Camptocamp SA - Yannick Vaucher -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from odoo.tests.common import TransactionCase - - -class TestSaleIsDelivered(TransactionCase): - """Check the _get_shipped method of Sale Order. """ - - def test_sale_no_proc(self): - """False when no procurement on both sale.order.line""" - self.assertFalse(self.sale.shipped) - - def test_sale_no_proc_one_service(self): - """False when, no procurement on both line but one is service""" - self.sale_line1.product_id = self.service_product - self.assertFalse(self.sale.shipped) - - def test_sale_no_proc_all_services(self): - """True when, no procurement on both lines but both are services""" - self.sale_line1.product_id = self.service_product - self.sale_line2.product_id = self.service_product - self.assertTrue(self.sale.shipped) - - def test_sale_not_all_proc(self): - """False, when one line with and one without procurement done""" - self.sale_line1.procurement_group_id = self.proc_group1 - self.proc1.state = "done" - - self.assertFalse(self.sale.shipped) - - def test_sale_proc_and_service(self): - """True when, one line with procurement done and one line for service""" - self.sale_line1.procurement_group_id = self.proc_group1 - self.proc1.state = "done" - self.sale_line2.product_id = self.service_product - - self.assertTrue(self.sale.shipped) - - def test_sale_partially_delivered(self): - """False when, all lines with procurement, one is partially delivered""" - self.sale_line1.procurement_group_id = self.proc_group1 - self.sale_line2.procurement_group_id = self.proc_group2 - self.proc1.state = "done" - self.proc2.state = "running" - - self.assertFalse(self.sale.shipped) - - def test_sale_is_delivered(self): - """True, when both line have a done procurement""" - self.sale_line1.procurement_group_id = self.proc_group1 - self.sale_line2.procurement_group_id = self.proc_group2 - self.proc1.state = "done" - self.proc2.state = "done" - - self.assertTrue(self.sale.shipped) - - def setUp(self): - """Setup a Sale Order with 2 lines. - And prepare procurements - - I use Model.new to get a model instance that is not saved to the - database, but has working methods. - - """ - super(TestSaleIsDelivered, self).setUp() - so = self.env["sale.order"] - sol = self.env["sale.order.line"] - product = self.env["product.product"] - procurement = self.env["procurement.order"] - procurement_group = self.env["procurement.group"] - self.sale = so.new() - self.sale_line1 = sol.new() - self.sale_line2 = sol.new() - self.sale_line1.order_id = self.sale - self.sale_line2.order_id = self.sale - - self.sale.order_line = sol.browse([self.sale_line1.id, self.sale_line2.id]) - - self.proc1 = procurement.new() - self.proc_group1 = procurement_group.new() - self.proc_group1.procurement_ids = self.proc1 - - self.proc2 = procurement.new() - self.proc_group2 = procurement_group.new() - self.proc_group2.procurement_ids = self.proc2 - - self.service_product = product.new({"type": "service"}) diff --git a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py index 7c1d71a2574..41aad827f7e 100644 --- a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py +++ b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py @@ -12,13 +12,16 @@ def setUp(self): self.sale_order_model = self.env["sale.order"] self.sale_order_line_model = self.env["sale.order.line"] self.stock_move_model = self.env["stock.move"] + self.stock_warehouse_model = self.env["stock.warehouse"] # Refs self.customer = self.env.ref("base.res_partner_2") self.product_1 = self.env.ref("product.product_product_27") self.product_2 = self.env.ref("product.product_product_24") - self.warehouse_shop0 = self.env.ref("stock.stock_warehouse_shop0") self.warehouse0 = self.env.ref("stock.warehouse0") + self.warehouse1 = self.stock_warehouse_model.create( + {"name": "Test Warehouse", "code": "TWH"} + ) def test_sales_order_multi_source(self): so = self.sale_order_model.create( @@ -30,7 +33,7 @@ def test_sales_order_multi_source(self): { "product_id": self.product_1.id, "product_uom_qty": 8, - "warehouse_id": self.warehouse_shop0.id, + "warehouse_id": self.warehouse1.id, "order_id": so.id, } ) @@ -44,42 +47,41 @@ def test_sales_order_multi_source(self): ) # confirm quotation so.action_confirm() - self.assertEquals( + self.assertEqual( len(so.picking_ids), 2, "2 delivery orders expected. Got %s instead" % len(so.picking_ids), ) for line in so.order_line: - self.assertEquals( + self.assertEqual( line.procurement_group_id.name, line.order_id.name + "/" + line.warehouse_id.name, "The name of the procurement group is not " "correct.", ) - for procurement in line.procurement_ids: - moves = self.stock_move_model.search( - [("procurement_id", "=", procurement.id)] + moves = self.stock_move_model.search( + [("group_id", "=", line.procurement_group_id.id)] + ) + for move in moves: + self.assertEqual( + move.group_id, + line.procurement_group_id, + "The group in the stock move does not " + "match with the procurement group in " + "the sales order line.", + ) + self.assertEqual( + move.picking_id.group_id, + line.procurement_group_id, + "The group in the stock picking does " + "not match with the procurement group " + "in the sales order line.", ) - for move in moves: - self.assertEquals( - move.group_id, - line.procurement_group_id, - "The group in the stock move does not " - "match with the procurement group in " - "the sales order line.", - ) - self.assertEquals( - move.picking_id.group_id, - line.procurement_group_id, - "The group in the stock picking does " - "not match with the procurement group " - "in the sales order line.", - ) def test_sales_order_no_source(self): so = self.sale_order_model.create( { "partner_id": self.customer.id, - "warehouse_id": self.warehouse_shop0.id, + "warehouse_id": self.warehouse1.id, } ) self.sale_order_line_model.create( @@ -90,7 +92,7 @@ def test_sales_order_no_source(self): ) # confirm quotation so.action_confirm() - self.assertEquals( + self.assertEqual( len(so.picking_ids), 1, "1 delivery order expected. Got %s instead" % len(so.picking_ids), @@ -106,7 +108,7 @@ def test_sale_order_source(self): { "product_id": self.product_1.id, "product_uom_qty": 8, - "warehouse_id": self.warehouse_shop0.id, + "warehouse_id": self.warehouse1.id, "order_id": so.id, } ) @@ -121,10 +123,13 @@ def test_sale_order_source(self): # confirm quotation so.action_confirm() for line in so.order_line: - for procurement in line.procurement_ids: - self.assertEquals( - procurement.warehouse_id, + moves = self.stock_move_model.search( + [("group_id", "=", line.procurement_group_id.id)] + ) + for move in moves: + self.assertEqual( + move.warehouse_id, line.warehouse_id, - "The warehouse in the procurement does not " + "The warehouse in the stock move does not " "match with the Sales order line.", ) From 9ff4fedb12f2e919298192b6f2d65922b249982f Mon Sep 17 00:00:00 2001 From: Joan Mateu Jordi Date: Tue, 15 Mar 2022 12:58:17 +0100 Subject: [PATCH 41/60] [MIG][15.0] sale_source_by_line: migrate to version 15.0 --- sale_sourced_by_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 49e6ce47a8c..d2374589ff9 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Sale Sourced by Line", "summary": "Multiple warehouse source locations for Sale order", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "author": "Camptocamp," "Eficent," "SerpentCS," From d6f82797afb4c83acdb2c3c3edf4c44170386dac Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 10 May 2022 07:08:27 +0000 Subject: [PATCH 42/60] [UPD] Update sale_sourced_by_line.pot --- .../i18n/sale_sourced_by_line.pot | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot index 5cc5f2a447d..c2670d17604 100644 --- a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot +++ b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * sale_sourced_by_line +# * sale_sourced_by_line # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 15.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,8 +14,22 @@ msgstr "" "Plural-Forms: \n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id -msgid "If a source warehouse is selected, it will be used to define the route. Otherwise, it will get the warehouse of the sale order" +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id +msgid "" +"If a source warehouse is selected, it will be used to define the route. " +"Otherwise, it will get the warehouse of the sale order" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " msgstr "" #. module: sale_sourced_by_line @@ -29,7 +43,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" - From dc59a6d2b261a687e58d0bc8aae18631c460472e Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 10 May 2022 07:12:47 +0000 Subject: [PATCH 43/60] sale_sourced_by_line 15.0.1.0.1 --- sale_sourced_by_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index d2374589ff9..599b6df6532 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Sale Sourced by Line", "summary": "Multiple warehouse source locations for Sale order", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "author": "Camptocamp," "Eficent," "SerpentCS," From 368474d8036d0b42c82f503f06e358df26537242 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Tue, 10 May 2022 10:51:43 +0000 Subject: [PATCH 44/60] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_sourced_by_line/ --- sale_sourced_by_line/i18n/ca.po | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sale_sourced_by_line/i18n/ca.po b/sale_sourced_by_line/i18n/ca.po index b9de269ba1f..a60b527329d 100644 --- a/sale_sourced_by_line/i18n/ca.po +++ b/sale_sourced_by_line/i18n/ca.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "Línia de comanda de vendes" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" From 7b97cc62dedf5cc2313110ee8338058a2005b5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miquel=20Ra=C3=AFch?= Date: Wed, 23 Nov 2022 17:26:21 +0100 Subject: [PATCH 45/60] [FIX] sale_sourced_by_line: adapt method to v15 --- sale_sourced_by_line/model/sale.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 799bc01d0b1..882e738727e 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -4,21 +4,12 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from odoo import api, fields, models +from odoo import fields, models class SaleOrder(models.Model): _inherit = "sale.order" - @api.model - def _prepare_procurement_group_by_line(self, line): - vals = super(SaleOrder, self)._prepare_procurement_group_by_line(line) - # for compatibility with sale_quotation_sourcing - if line._get_procurement_group_key()[0] == 10: - if line.warehouse_id: - vals["name"] += "/" + line.warehouse_id.name - return vals - warehouse_id = fields.Many2one( "stock.warehouse", string="Default Warehouse", @@ -44,6 +35,14 @@ class SaleOrderLine(models.Model): "the sale order", ) + def _prepare_procurement_group_vals(self): + vals = super(SaleOrderLine, self)._prepare_procurement_group_vals() + # for compatibility with sale_quotation_sourcing + if self._get_procurement_group_key()[0] == 10: + if self.warehouse_id: + vals["name"] += "/" + self.warehouse_id.name + return vals + def _prepare_procurement_values(self, group_id=False): """Prepare specific key for moves or other components that will be created from a stock rule From 4571964a51df485d0b4f13d5c03c0667b01f5eae Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 1 Dec 2022 11:03:25 +0000 Subject: [PATCH 46/60] sale_sourced_by_line 15.0.1.1.0 --- sale_sourced_by_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 599b6df6532..5c6975f66f5 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Sale Sourced by Line", "summary": "Multiple warehouse source locations for Sale order", - "version": "15.0.1.0.1", + "version": "15.0.1.1.0", "author": "Camptocamp," "Eficent," "SerpentCS," From 705fd588aa60f1c751ccd69e429c5d48d7c3c123 Mon Sep 17 00:00:00 2001 From: Francesco Foresti Date: Wed, 18 Jan 2023 09:22:31 +0000 Subject: [PATCH 47/60] Translated using Weblate (Italian) Currently translated at 50.0% (2 of 4 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_sourced_by_line/it/ --- sale_sourced_by_line/i18n/it.po | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po index 273107fbf09..5c3834c57d6 100644 --- a/sale_sourced_by_line/i18n/it.po +++ b/sale_sourced_by_line/i18n/it.po @@ -8,15 +8,16 @@ msgstr "" "Project-Id-Version: sale-workflow (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-10-02 17:59+0000\n" -"PO-Revision-Date: 2015-09-03 07:10+0000\n" -"Last-Translator: <>\n" +"PO-Revision-Date: 2023-01-18 11:46+0000\n" +"Last-Translator: Francesco Foresti \n" "Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" "language/it/)\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.14.1\n" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id @@ -28,7 +29,7 @@ msgstr "" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" -msgstr "Ordini vendita" +msgstr "Ordine di vendita" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order_line From 7dea1e1e8e5a13978c68256a96a575df39057f81 Mon Sep 17 00:00:00 2001 From: mymage Date: Fri, 12 May 2023 10:40:21 +0000 Subject: [PATCH 48/60] Translated using Weblate (Italian) Currently translated at 50.0% (2 of 4 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_sourced_by_line/it/ --- sale_sourced_by_line/i18n/it.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po index 5c3834c57d6..53bc32b6e2a 100644 --- a/sale_sourced_by_line/i18n/it.po +++ b/sale_sourced_by_line/i18n/it.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: sale-workflow (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-10-02 17:59+0000\n" -"PO-Revision-Date: 2023-01-18 11:46+0000\n" -"Last-Translator: Francesco Foresti \n" +"PO-Revision-Date: 2023-05-12 12:57+0000\n" +"Last-Translator: mymage \n" "Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" "language/it/)\n" "Language: it\n" @@ -34,7 +34,7 @@ msgstr "Ordine di vendita" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order_line msgid "Sales Order Line" -msgstr "Linea d'ordine di vendita" +msgstr "Riga ordine di vendita" #. module: sale_sourced_by_line #: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id From a460dac701b2a3657b5355a7c82e538abf1df80e Mon Sep 17 00:00:00 2001 From: Fabiola-Auz Date: Thu, 1 Jun 2023 16:38:09 -0500 Subject: [PATCH 49/60] [MIG] sale_sourced_by_line: Migration to 16.0 --- sale_sourced_by_line/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 5c6975f66f5..7f07f3d74e8 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Sale Sourced by Line", "summary": "Multiple warehouse source locations for Sale order", - "version": "15.0.1.1.0", + "version": "16.0.1.0.0", "author": "Camptocamp," "Eficent," "SerpentCS," From cd4967f73fc5bc7619f843dd325a8de626b59207 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 14 Dec 2023 13:15:31 +0000 Subject: [PATCH 50/60] [UPD] Update sale_sourced_by_line.pot --- sale_sourced_by_line/i18n/sale_sourced_by_line.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot index c2670d17604..d93b3c7c761 100644 --- a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot +++ b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" From 3126b33498ddf8cdb7b2cd093397ff191c2a36fc Mon Sep 17 00:00:00 2001 From: jappi00 Date: Thu, 14 Dec 2023 16:18:04 +0000 Subject: [PATCH 51/60] Translated using Weblate (German) Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/de/ --- sale_sourced_by_line/i18n/de.po | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sale_sourced_by_line/i18n/de.po b/sale_sourced_by_line/i18n/de.po index a6533a64d25..49fbbc61611 100644 --- a/sale_sourced_by_line/i18n/de.po +++ b/sale_sourced_by_line/i18n/de.po @@ -9,14 +9,15 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-11-23 01:51+0000\n" -"PO-Revision-Date: 2017-11-23 01:51+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"PO-Revision-Date: 2023-12-14 18:35+0000\n" +"Last-Translator: jappi00 \n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id @@ -24,6 +25,8 @@ msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +"Wenn ein Ausgangslager ausgewählt wird, wird es für die Definition der Route " +"verwendet. Andernfalls wird das Lager des Verkaufsauftrags verwendet." #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order @@ -38,4 +41,4 @@ msgstr "Auftragsposition" #. module: sale_sourced_by_line #: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" -msgstr "" +msgstr "Quelllagerhaus" From 8e8067dab461bf179b4b6e28f677c4fa5de155eb Mon Sep 17 00:00:00 2001 From: mymage Date: Fri, 15 Dec 2023 15:33:01 +0000 Subject: [PATCH 52/60] Translated using Weblate (Italian) Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/it/ --- sale_sourced_by_line/i18n/it.po | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po index 53bc32b6e2a..249c34a90a9 100644 --- a/sale_sourced_by_line/i18n/it.po +++ b/sale_sourced_by_line/i18n/it.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: sale-workflow (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-10-02 17:59+0000\n" -"PO-Revision-Date: 2023-05-12 12:57+0000\n" +"PO-Revision-Date: 2023-12-15 15:36+0000\n" "Last-Translator: mymage \n" "Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" "language/it/)\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.14.1\n" +"X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id @@ -25,6 +25,8 @@ msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +"Se è selezionata una origine magazzino, verrà utilizzata per definire la " +"rotta. Altrimenti, verrà preso il magazzino dell'ordine di vendita" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order @@ -39,4 +41,4 @@ msgstr "Riga ordine di vendita" #. module: sale_sourced_by_line #: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" -msgstr "" +msgstr "MagazzIno origine" From 65719d606d2aee991cc2c1aaf0909ffe6b09072b Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Mon, 18 Dec 2023 17:41:46 +0000 Subject: [PATCH 53/60] Translated using Weblate (Spanish) Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/es/ --- sale_sourced_by_line/i18n/es.po | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sale_sourced_by_line/i18n/es.po b/sale_sourced_by_line/i18n/es.po index 4c70633376c..07a3c6949f2 100644 --- a/sale_sourced_by_line/i18n/es.po +++ b/sale_sourced_by_line/i18n/es.po @@ -10,14 +10,15 @@ msgstr "" "Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-28 03:43+0000\n" -"PO-Revision-Date: 2017-02-28 03:43+0000\n" -"Last-Translator: Pedro M. Baeza , 2017\n" +"PO-Revision-Date: 2023-12-18 20:10+0000\n" +"Last-Translator: Ivorra78 \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id @@ -25,6 +26,8 @@ msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +"Si se selecciona un almacén de origen, se utilizará para definir la ruta. De " +"lo contrario, obtendrá el almacén de la orden de venta" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order @@ -39,4 +42,4 @@ msgstr "Línea de pedido de venta" #. module: sale_sourced_by_line #: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" -msgstr "" +msgstr "Almacén de Origen" From 4e23820ae47bd7a73460d6d8bf2e584d6e52191b Mon Sep 17 00:00:00 2001 From: Adriano Prado Date: Thu, 28 Dec 2023 21:09:59 +0000 Subject: [PATCH 54/60] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/pt_BR/ --- sale_sourced_by_line/i18n/pt_BR.po | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sale_sourced_by_line/i18n/pt_BR.po b/sale_sourced_by_line/i18n/pt_BR.po index ae2d8c72498..993aff3d662 100644 --- a/sale_sourced_by_line/i18n/pt_BR.po +++ b/sale_sourced_by_line/i18n/pt_BR.po @@ -10,15 +10,16 @@ msgstr "" "Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-02-28 03:43+0000\n" -"PO-Revision-Date: 2017-02-28 03:43+0000\n" -"Last-Translator: Paulo Ricardo , 2017\n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" -"teams/23907/pt_BR/)\n" +"PO-Revision-Date: 2023-12-28 23:43+0000\n" +"Last-Translator: Adriano Prado \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" +"23907/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id @@ -26,6 +27,8 @@ msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +"Se um armazém de origem for selecionado, ele será utilizado para definir a " +"rota. Caso contrário, obterá o armazém do pedido de venda" #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order @@ -40,4 +43,4 @@ msgstr "Linha Pedido de Venda" #. module: sale_sourced_by_line #: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id msgid "Source Warehouse" -msgstr "" +msgstr "Armazém de Origem" From e109f411d43b89d45559ecbbfebc0c6b647748af Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Mon, 22 Jan 2024 13:39:17 -0500 Subject: [PATCH 55/60] [IMP] sale_sourced_by_line: pre-commit auto fixes --- sale_sourced_by_line/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sale_sourced_by_line/pyproject.toml diff --git a/sale_sourced_by_line/pyproject.toml b/sale_sourced_by_line/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/sale_sourced_by_line/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" From fe144f55fccb7a3f1d9167897c730769c3086936 Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Mon, 22 Jan 2024 13:41:41 -0500 Subject: [PATCH 56/60] [MIG] sale_sourced_by_line: Migration to 17.0 --- sale_sourced_by_line/__manifest__.py | 2 +- sale_sourced_by_line/model/sale.py | 8 +++--- .../tests/test_sale_sourced_by_line.py | 27 ++++++++++--------- sale_sourced_by_line/view/sale_view.xml | 4 +-- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index 7f07f3d74e8..fbb30988faa 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Sale Sourced by Line", "summary": "Multiple warehouse source locations for Sale order", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "author": "Camptocamp," "Eficent," "SerpentCS," diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 882e738727e..1609ade7351 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -14,7 +14,6 @@ class SaleOrder(models.Model): "stock.warehouse", string="Default Warehouse", readonly=True, - states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, help="If no source warehouse is selected on line, " "this warehouse is used as default. ", ) @@ -28,7 +27,6 @@ class SaleOrderLine(models.Model): "Source Warehouse", readonly=True, related="", - states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, help="If a source warehouse is selected, " "it will be used to define the route. " "Otherwise, it will get the warehouse of " @@ -36,7 +34,7 @@ class SaleOrderLine(models.Model): ) def _prepare_procurement_group_vals(self): - vals = super(SaleOrderLine, self)._prepare_procurement_group_vals() + vals = super()._prepare_procurement_group_vals() # for compatibility with sale_quotation_sourcing if self._get_procurement_group_key()[0] == 10: if self.warehouse_id: @@ -50,7 +48,7 @@ def _prepare_procurement_values(self, group_id=False): override in order to add other custom key that could be used in move/po creation. """ - values = super(SaleOrderLine, self)._prepare_procurement_values(group_id) + values = super()._prepare_procurement_values(group_id) self.ensure_one() if self.warehouse_id: values["warehouse_id"] = self.warehouse_id @@ -62,7 +60,7 @@ def _get_procurement_group_key(self): """ priority = 10 - key = super(SaleOrderLine, self)._get_procurement_group_key() + key = super()._get_procurement_group_key() # Check priority if key[0] >= priority: return key diff --git a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py index 41aad827f7e..9e66cd97037 100644 --- a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py +++ b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py @@ -3,23 +3,24 @@ # © 2016 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from odoo.tests.common import TransactionCase +from odoo.addons.base.tests.common import BaseCommon -class TestSaleSourcedByLine(TransactionCase): - def setUp(self): - super(TestSaleSourcedByLine, self).setUp() - self.sale_order_model = self.env["sale.order"] - self.sale_order_line_model = self.env["sale.order.line"] - self.stock_move_model = self.env["stock.move"] - self.stock_warehouse_model = self.env["stock.warehouse"] +class TestSaleSourcedByLine(BaseCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.sale_order_model = cls.env["sale.order"] + cls.sale_order_line_model = cls.env["sale.order.line"] + cls.stock_move_model = cls.env["stock.move"] + cls.stock_warehouse_model = cls.env["stock.warehouse"] # Refs - self.customer = self.env.ref("base.res_partner_2") - self.product_1 = self.env.ref("product.product_product_27") - self.product_2 = self.env.ref("product.product_product_24") - self.warehouse0 = self.env.ref("stock.warehouse0") - self.warehouse1 = self.stock_warehouse_model.create( + cls.customer = cls.env.ref("base.res_partner_2") + cls.product_1 = cls.env.ref("product.product_product_27") + cls.product_2 = cls.env.ref("product.product_product_24") + cls.warehouse0 = cls.env.ref("stock.warehouse0") + cls.warehouse1 = cls.stock_warehouse_model.create( {"name": "Test Warehouse", "code": "TWH"} ) diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index 61e10a17b79..db10e85645e 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -9,7 +9,7 @@ expr="//field[@name='order_line']/tree/field[@name='price_subtotal']" position="after" > - + @@ -22,7 +22,7 @@ expr="//field[@name='order_line']/form//field[@name='route_id']" position="before" > - + Date: Fri, 13 Sep 2024 05:58:42 +0000 Subject: [PATCH 57/60] [UPD] Update sale_sourced_by_line.pot --- sale_sourced_by_line/i18n/sale_sourced_by_line.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot index d93b3c7c761..f01e358cadb 100644 --- a/sale_sourced_by_line/i18n/sale_sourced_by_line.pot +++ b/sale_sourced_by_line/i18n/sale_sourced_by_line.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" From 8c9d6aeb2667dcdca35a7e03b3fda7d5b5fae3b0 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 13 Sep 2024 06:42:46 +0000 Subject: [PATCH 58/60] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-17.0/sale-workflow-17.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_sourced_by_line/ --- sale_sourced_by_line/i18n/de.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/el_GR.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/es.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/es_ES.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/es_VE.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/fi.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/fr.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/hr.po | 20 ++++++++++++++++---- sale_sourced_by_line/i18n/hr_HR.po | 20 ++++++++++++++++---- sale_sourced_by_line/i18n/hu.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/it.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/nl.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/nl_NL.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/pt.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/pt_BR.po | 20 ++++++++++++++++---- sale_sourced_by_line/i18n/ro.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/sk.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/sl.po | 20 ++++++++++++++++---- sale_sourced_by_line/i18n/tr.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/tr_TR.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/vi_VN.po | 16 ++++++++++++++-- sale_sourced_by_line/i18n/zh_CN.po | 16 ++++++++++++++-- 22 files changed, 316 insertions(+), 52 deletions(-) diff --git a/sale_sourced_by_line/i18n/de.po b/sale_sourced_by_line/i18n/de.po index 49fbbc61611..c3ad292990c 100644 --- a/sale_sourced_by_line/i18n/de.po +++ b/sale_sourced_by_line/i18n/de.po @@ -20,7 +20,12 @@ msgstr "" "X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" @@ -28,6 +33,13 @@ msgstr "" "Wenn ein Ausgangslager ausgewählt wird, wird es für die Definition der Route " "verwendet. Andernfalls wird das Lager des Verkaufsauftrags verwendet." +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -39,6 +51,6 @@ msgid "Sales Order Line" msgstr "Auftragsposition" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "Quelllagerhaus" diff --git a/sale_sourced_by_line/i18n/el_GR.po b/sale_sourced_by_line/i18n/el_GR.po index 19087251722..cb442b8a305 100644 --- a/sale_sourced_by_line/i18n/el_GR.po +++ b/sale_sourced_by_line/i18n/el_GR.po @@ -20,12 +20,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/es.po b/sale_sourced_by_line/i18n/es.po index 07a3c6949f2..746a7146c77 100644 --- a/sale_sourced_by_line/i18n/es.po +++ b/sale_sourced_by_line/i18n/es.po @@ -21,7 +21,12 @@ msgstr "" "X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" @@ -29,6 +34,13 @@ msgstr "" "Si se selecciona un almacén de origen, se utilizará para definir la ruta. De " "lo contrario, obtendrá el almacén de la orden de venta" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -40,6 +52,6 @@ msgid "Sales Order Line" msgstr "Línea de pedido de venta" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "Almacén de Origen" diff --git a/sale_sourced_by_line/i18n/es_ES.po b/sale_sourced_by_line/i18n/es_ES.po index 918b647ab4b..99cea5d532a 100644 --- a/sale_sourced_by_line/i18n/es_ES.po +++ b/sale_sourced_by_line/i18n/es_ES.po @@ -20,12 +20,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/es_VE.po b/sale_sourced_by_line/i18n/es_VE.po index 863d50cc8b5..b2f051b80f5 100644 --- a/sale_sourced_by_line/i18n/es_VE.po +++ b/sale_sourced_by_line/i18n/es_VE.po @@ -20,12 +20,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "Línea de pedido de venta" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/fi.po b/sale_sourced_by_line/i18n/fi.po index 5aa7d1c762e..3c59a521c95 100644 --- a/sale_sourced_by_line/i18n/fi.po +++ b/sale_sourced_by_line/i18n/fi.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/fr.po b/sale_sourced_by_line/i18n/fr.po index d88024ba89f..8b6023d4177 100644 --- a/sale_sourced_by_line/i18n/fr.po +++ b/sale_sourced_by_line/i18n/fr.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "Sales Order Line" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/hr.po b/sale_sourced_by_line/i18n/hr.po index 29ef32ad14b..6e6be4a85be 100644 --- a/sale_sourced_by_line/i18n/hr.po +++ b/sale_sourced_by_line/i18n/hr.po @@ -17,16 +17,28 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"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: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -38,6 +50,6 @@ msgid "Sales Order Line" msgstr "Stavka ponude" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/hr_HR.po b/sale_sourced_by_line/i18n/hr_HR.po index fb0b7c503cd..070bdcf7af5 100644 --- a/sale_sourced_by_line/i18n/hr_HR.po +++ b/sale_sourced_by_line/i18n/hr_HR.po @@ -17,16 +17,28 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"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: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -38,6 +50,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/hu.po b/sale_sourced_by_line/i18n/hu.po index 7128a92c359..8be5d2058ca 100644 --- a/sale_sourced_by_line/i18n/hu.po +++ b/sale_sourced_by_line/i18n/hu.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po index 249c34a90a9..84124a830d2 100644 --- a/sale_sourced_by_line/i18n/it.po +++ b/sale_sourced_by_line/i18n/it.po @@ -20,7 +20,12 @@ msgstr "" "X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" @@ -28,6 +33,13 @@ msgstr "" "Se è selezionata una origine magazzino, verrà utilizzata per definire la " "rotta. Altrimenti, verrà preso il magazzino dell'ordine di vendita" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -39,6 +51,6 @@ msgid "Sales Order Line" msgstr "Riga ordine di vendita" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "MagazzIno origine" diff --git a/sale_sourced_by_line/i18n/nl.po b/sale_sourced_by_line/i18n/nl.po index 766ac4af53e..648e8835d52 100644 --- a/sale_sourced_by_line/i18n/nl.po +++ b/sale_sourced_by_line/i18n/nl.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/nl_NL.po b/sale_sourced_by_line/i18n/nl_NL.po index 1d4d276ef80..2225e40e652 100644 --- a/sale_sourced_by_line/i18n/nl_NL.po +++ b/sale_sourced_by_line/i18n/nl_NL.po @@ -20,12 +20,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "Verkooporderregel" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/pt.po b/sale_sourced_by_line/i18n/pt.po index f0b0c58e408..18b77ae209b 100644 --- a/sale_sourced_by_line/i18n/pt.po +++ b/sale_sourced_by_line/i18n/pt.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/pt_BR.po b/sale_sourced_by_line/i18n/pt_BR.po index 993aff3d662..bdcaeab5070 100644 --- a/sale_sourced_by_line/i18n/pt_BR.po +++ b/sale_sourced_by_line/i18n/pt_BR.po @@ -12,8 +12,8 @@ msgstr "" "POT-Creation-Date: 2017-02-28 03:43+0000\n" "PO-Revision-Date: 2023-12-28 23:43+0000\n" "Last-Translator: Adriano Prado \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" @@ -22,7 +22,12 @@ msgstr "" "X-Generator: Weblate 4.17\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" @@ -30,6 +35,13 @@ msgstr "" "Se um armazém de origem for selecionado, ele será utilizado para definir a " "rota. Caso contrário, obterá o armazém do pedido de venda" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -41,6 +53,6 @@ msgid "Sales Order Line" msgstr "Linha Pedido de Venda" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "Armazém de Origem" diff --git a/sale_sourced_by_line/i18n/ro.po b/sale_sourced_by_line/i18n/ro.po index d34c4f45e73..297a71dd64c 100644 --- a/sale_sourced_by_line/i18n/ro.po +++ b/sale_sourced_by_line/i18n/ro.po @@ -20,12 +20,24 @@ msgstr "" "2:1));\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "Linie comandă vânzare" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/sk.po b/sale_sourced_by_line/i18n/sk.po index 06f4c1a691f..8bb6701b984 100644 --- a/sale_sourced_by_line/i18n/sk.po +++ b/sale_sourced_by_line/i18n/sk.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/sl.po b/sale_sourced_by_line/i18n/sl.po index e719c93cb42..0356d662a49 100644 --- a/sale_sourced_by_line/i18n/sl.po +++ b/sale_sourced_by_line/i18n/sl.po @@ -16,16 +16,28 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" -"%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "Postavka prodajnega naloga" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/tr.po b/sale_sourced_by_line/i18n/tr.po index 6c7e90bc042..069bd338d3e 100644 --- a/sale_sourced_by_line/i18n/tr.po +++ b/sale_sourced_by_line/i18n/tr.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "Satış Siparişi Hattı" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/tr_TR.po b/sale_sourced_by_line/i18n/tr_TR.po index 97aba352ede..3c6f77fc009 100644 --- a/sale_sourced_by_line/i18n/tr_TR.po +++ b/sale_sourced_by_line/i18n/tr_TR.po @@ -20,12 +20,24 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "Sipariş emri satırı " #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/vi_VN.po b/sale_sourced_by_line/i18n/vi_VN.po index b55b09c246e..0c437c1a6f1 100644 --- a/sale_sourced_by_line/i18n/vi_VN.po +++ b/sale_sourced_by_line/i18n/vi_VN.po @@ -20,12 +20,24 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -37,6 +49,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" diff --git a/sale_sourced_by_line/i18n/zh_CN.po b/sale_sourced_by_line/i18n/zh_CN.po index 6e6ee074825..b87bd138235 100644 --- a/sale_sourced_by_line/i18n/zh_CN.po +++ b/sale_sourced_by_line/i18n/zh_CN.po @@ -19,12 +19,24 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #. module: sale_sourced_by_line -#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "Default Warehouse" +msgstr "" + +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "" "If a source warehouse is selected, it will be used to define the route. " "Otherwise, it will get the warehouse of the sale order" msgstr "" +#. module: sale_sourced_by_line +#: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order__warehouse_id +msgid "" +"If no source warehouse is selected on line, this warehouse is used as " +"default. " +msgstr "" + #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order msgid "Sales Order" @@ -36,6 +48,6 @@ msgid "Sales Order Line" msgstr "" #. module: sale_sourced_by_line -#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line_warehouse_id +#: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order_line__warehouse_id msgid "Source Warehouse" msgstr "" From 6d1cc1c25b9692eb7af2099d26042a68172f11c3 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 16 Sep 2024 07:12:37 +0000 Subject: [PATCH 59/60] Translated using Weblate (Italian) Currently translated at 100.0% (6 of 6 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_sourced_by_line/it/ --- sale_sourced_by_line/i18n/it.po | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sale_sourced_by_line/i18n/it.po b/sale_sourced_by_line/i18n/it.po index 84124a830d2..34c6442e37f 100644 --- a/sale_sourced_by_line/i18n/it.po +++ b/sale_sourced_by_line/i18n/it.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: sale-workflow (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-10-02 17:59+0000\n" -"PO-Revision-Date: 2023-12-15 15:36+0000\n" +"PO-Revision-Date: 2024-09-16 10:06+0000\n" "Last-Translator: mymage \n" "Language-Team: Italian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" "language/it/)\n" @@ -17,12 +17,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.17\n" +"X-Generator: Weblate 5.6.2\n" #. module: sale_sourced_by_line #: model:ir.model.fields,field_description:sale_sourced_by_line.field_sale_order__warehouse_id msgid "Default Warehouse" -msgstr "" +msgstr "Magazzino predefinito" #. module: sale_sourced_by_line #: model:ir.model.fields,help:sale_sourced_by_line.field_sale_order_line__warehouse_id @@ -39,6 +39,8 @@ msgid "" "If no source warehouse is selected on line, this warehouse is used as " "default. " msgstr "" +"Ne non viene selezionato un magazzino on line, questo magazzino è utilizzato " +"come predefinito. " #. module: sale_sourced_by_line #: model:ir.model,name:sale_sourced_by_line.model_sale_order From e071c42c7d1091a4a8720177c312955669f661b1 Mon Sep 17 00:00:00 2001 From: Ajay Javiya Date: Tue, 17 Dec 2024 10:11:00 +0530 Subject: [PATCH 60/60] [MIG] sale_sourced_by_line: Migration to 18.0 [FIX] pylint error --- sale_sourced_by_line/README.rst | 1 + sale_sourced_by_line/__manifest__.py | 2 +- sale_sourced_by_line/model/sale.py | 18 ++++++++---------- .../tests/test_sale_sourced_by_line.py | 4 ++-- sale_sourced_by_line/view/sale_view.xml | 2 +- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/sale_sourced_by_line/README.rst b/sale_sourced_by_line/README.rst index e4a8c3cb0bc..71d5c24dc70 100644 --- a/sale_sourced_by_line/README.rst +++ b/sale_sourced_by_line/README.rst @@ -47,6 +47,7 @@ Contributors * Eficent Business and IT Consulting Services S.L. * Serpent Consulting Services Pvt. Ltd. * Info A Tout Prix +* Ajay Javiya Do not contact contributors directly about support or help with technical issues. diff --git a/sale_sourced_by_line/__manifest__.py b/sale_sourced_by_line/__manifest__.py index fbb30988faa..484b72b3845 100644 --- a/sale_sourced_by_line/__manifest__.py +++ b/sale_sourced_by_line/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Sale Sourced by Line", "summary": "Multiple warehouse source locations for Sale order", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "author": "Camptocamp," "Eficent," "SerpentCS," diff --git a/sale_sourced_by_line/model/sale.py b/sale_sourced_by_line/model/sale.py index 1609ade7351..b27b34d31dd 100644 --- a/sale_sourced_by_line/model/sale.py +++ b/sale_sourced_by_line/model/sale.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from odoo import fields, models +from odoo import api, fields, models class SaleOrder(models.Model): @@ -22,16 +22,14 @@ class SaleOrder(models.Model): class SaleOrderLine(models.Model): _inherit = "sale.order.line" - warehouse_id = fields.Many2one( - "stock.warehouse", - "Source Warehouse", - readonly=True, - related="", - help="If a source warehouse is selected, " - "it will be used to define the route. " - "Otherwise, it will get the warehouse of " - "the sale order", + @api.depends( + "route_id", "order_id.warehouse_id", "product_packaging_id", "product_id" ) + def _compute_warehouse_id(self): + """compute the warehouse for the lines only + if it has not already been set.""" + lines = self.filtered(lambda rec: not rec.warehouse_id) + return super(SaleOrderLine, lines)._compute_warehouse_id() def _prepare_procurement_group_vals(self): vals = super()._prepare_procurement_group_vals() diff --git a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py index 9e66cd97037..fcfc516647c 100644 --- a/sale_sourced_by_line/tests/test_sale_sourced_by_line.py +++ b/sale_sourced_by_line/tests/test_sale_sourced_by_line.py @@ -51,7 +51,7 @@ def test_sales_order_multi_source(self): self.assertEqual( len(so.picking_ids), 2, - "2 delivery orders expected. Got %s instead" % len(so.picking_ids), + f"2 delivery orders expected. Got {len(so.picking_ids)} instead", ) for line in so.order_line: self.assertEqual( @@ -96,7 +96,7 @@ def test_sales_order_no_source(self): self.assertEqual( len(so.picking_ids), 1, - "1 delivery order expected. Got %s instead" % len(so.picking_ids), + f"1 delivery order expected. Got {len(so.picking_ids)} instead", ) def test_sale_order_source(self): diff --git a/sale_sourced_by_line/view/sale_view.xml b/sale_sourced_by_line/view/sale_view.xml index db10e85645e..389d301a42b 100644 --- a/sale_sourced_by_line/view/sale_view.xml +++ b/sale_sourced_by_line/view/sale_view.xml @@ -6,7 +6,7 @@