diff --git a/eslint.config.cjs b/eslint.config.cjs index dd0cbe0aef0..5c9f06e99b2 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -22,7 +22,7 @@ const config = [{ }, ecmaVersion: 2024, - sourceType: "script", + sourceType: "module", }, rules: { diff --git a/sale_delivery_split_date/README.rst b/sale_delivery_split_date/README.rst new file mode 100644 index 00000000000..22aba11ff67 --- /dev/null +++ b/sale_delivery_split_date/README.rst @@ -0,0 +1,99 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +======================== +Sale Delivery Split Date +======================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:69652f1972b11818ac88de151e78405313708c3ac7722d9f26939bfa20c21a44 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/sale-workflow/tree/19.0/sale_delivery_split_date + :alt: OCA/sale-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_delivery_split_date + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +When this module is installed, each sale order you confirm will generate +one delivery order per requested date indicated in the sale order lines. + +Furthermore, the delivery orders can be searched by selecting the +scheduled date, which is now displayed in the delivery tree view. + +**Table of contents** + +.. contents:: + :local: + +Known issues / Roadmap +====================== + +- Incompatible with + `sale_procurement_group_by_commitment_date `__ + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Agile Business Group + +Contributors +------------ + +- Alex Comba (https://www.agilebg.com/) +- Carmen Rondon Regalado + (https://odoo.archeti.com/) +- Tatiana Deribina + +Other credits +------------- + +The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/sale-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_delivery_split_date/__init__.py b/sale_delivery_split_date/__init__.py new file mode 100644 index 00000000000..31660d6a965 --- /dev/null +++ b/sale_delivery_split_date/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/sale_delivery_split_date/__manifest__.py b/sale_delivery_split_date/__manifest__.py new file mode 100644 index 00000000000..4ac998cfaa3 --- /dev/null +++ b/sale_delivery_split_date/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2018 Alex Comba - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Sale Delivery Split Date", + "version": "19.0.1.0.0", + "summary": "Sale Deliveries split by date", + "category": "Sales Management", + "license": "AGPL-3", + "author": "Agile Business Group, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/sale-workflow", + "depends": [ + "sale_order_line_date", + "sale_procurement_group_by_line", + ], + "data": [ + "views/stock_picking.xml", + ], + "installable": True, +} diff --git a/sale_delivery_split_date/i18n/ca.po b/sale_delivery_split_date/i18n/ca.po new file mode 100644 index 00000000000..fa70c5c823c --- /dev/null +++ b/sale_delivery_split_date/i18n/ca.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_delivery_split_date +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-03-10 10:45+0000\n" +"Last-Translator: Daniel Martinez Vila \n" +"Language-Team: none\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_delivery_split_date +#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línia de comandes de vendes" + +#. module: sale_delivery_split_date +#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search +msgid "Scheduled Date" +msgstr "Data prevista" + +#~ msgid "Sale Order" +#~ msgstr "Comanda de venda" + +#~ msgid "Scheduled Date (for filter purpose only)" +#~ msgstr "Data programada (només per al filtre)" + +#~ msgid "Transfer" +#~ msgstr "Transferència" diff --git a/sale_delivery_split_date/i18n/es.po b/sale_delivery_split_date/i18n/es.po new file mode 100644 index 00000000000..818ab4ed1e0 --- /dev/null +++ b/sale_delivery_split_date/i18n/es.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_delivery_split_date +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-03-10 10:45+0000\n" +"Last-Translator: Daniel Martinez Vila \n" +"Language-Team: none\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_delivery_split_date +#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" + +#. module: sale_delivery_split_date +#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search +msgid "Scheduled Date" +msgstr "Fecha prevista" + +#~ msgid "Sale Order" +#~ msgstr "Pedido de venta" + +#~ msgid "Scheduled Date (for filter purpose only)" +#~ msgstr "Fecha programada (solo para fines de filtrado)" + +#~ msgid "Transfer" +#~ msgstr "Transferir" diff --git a/sale_delivery_split_date/i18n/it.po b/sale_delivery_split_date/i18n/it.po new file mode 100644 index 00000000000..17a02d760ae --- /dev/null +++ b/sale_delivery_split_date/i18n/it.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_delivery_split_date +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-31 14:57+0000\n" +"PO-Revision-Date: 2024-01-25 15:34+0000\n" +"Last-Translator: mymage \n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: sale_delivery_split_date +#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Riga ordine di vendita" + +#. module: sale_delivery_split_date +#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search +msgid "Scheduled Date" +msgstr "Data schedulata" + +#~ msgid "Sale Order" +#~ msgstr "Ordine di vendita" + +#~ msgid "Scheduled Date (for filter purpose only)" +#~ msgstr "Data pianificata (solo per i filtri)" + +#~ msgid "Transfer" +#~ msgstr "Trasferimento" diff --git a/sale_delivery_split_date/i18n/pt_PT.po b/sale_delivery_split_date/i18n/pt_PT.po new file mode 100644 index 00000000000..76e2cabaf54 --- /dev/null +++ b/sale_delivery_split_date/i18n/pt_PT.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_delivery_split_date +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-21 20:47+0000\n" +"Last-Translator: educasilva \n" +"Language-Team: none\n" +"Language: pt_PT\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_delivery_split_date +#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linha de encomendas de venda" + +#. module: sale_delivery_split_date +#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search +msgid "Scheduled Date" +msgstr "Data programada" + +#~ msgid "Sale Order" +#~ msgstr "Ordem de venda" + +#~ msgid "Scheduled Date (for filter purpose only)" +#~ msgstr "Data programada (apenas para fins de filtragem)" + +#~ msgid "Transfer" +#~ msgstr "Transferir" diff --git a/sale_delivery_split_date/i18n/sale_delivery_split_date.pot b/sale_delivery_split_date/i18n/sale_delivery_split_date.pot new file mode 100644 index 00000000000..cd695a0753a --- /dev/null +++ b/sale_delivery_split_date/i18n/sale_delivery_split_date.pot @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_delivery_split_date +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.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_delivery_split_date +#: model:ir.model,name:sale_delivery_split_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_delivery_split_date +#: model_terms:ir.ui.view,arch_db:sale_delivery_split_date.view_picking_internal_search +msgid "Scheduled Date" +msgstr "" diff --git a/sale_delivery_split_date/models/__init__.py b/sale_delivery_split_date/models/__init__.py new file mode 100644 index 00000000000..15e7252a511 --- /dev/null +++ b/sale_delivery_split_date/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import sale_order_line diff --git a/sale_delivery_split_date/models/sale_order_line.py b/sale_delivery_split_date/models/sale_order_line.py new file mode 100644 index 00000000000..93b62fac046 --- /dev/null +++ b/sale_delivery_split_date/models/sale_order_line.py @@ -0,0 +1,52 @@ +# Copyright 2018 Alex Comba - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from datetime import timedelta + +from odoo import models +from odoo.tools import format_date + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + def _prepare_reference_vals(self): + vals = super()._prepare_reference_vals() + if self._get_stock_reference_key()[0] == 24: + if self.commitment_date: + comm_date = self._get_security_lead_time_commitment_date() + vals["name"] = ( + f"{vals['name']}/{format_date(self.env, comm_date.date())}" + ) + return vals + + def _get_stock_reference_key(self): + """Return a key with priority to be used to regroup lines in multiple + procurement groups + """ + priority = 24 + key = super()._get_stock_reference_key() + # Check priority + if key[0] < priority: + if self.commitment_date: + # group by date instead of datetime + comm_date = self._get_security_lead_time_commitment_date() + key = (priority, comm_date.date()) + return key + + def _prepare_procurement_values(self): + vals = super()._prepare_procurement_values() + line_com_date = self.commitment_date + if line_com_date: + comm_date = self._get_security_lead_time_commitment_date() + vals.update( + date_planned=comm_date, + date_deadline=line_com_date, + ) + return vals + + def _get_security_lead_time_commitment_date(self): + """Return the commitment date with security lead time""" + return self.commitment_date - timedelta( + days=self.order_id.company_id.security_lead + ) diff --git a/sale_delivery_split_date/pyproject.toml b/sale_delivery_split_date/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/sale_delivery_split_date/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/sale_delivery_split_date/readme/CONTRIBUTORS.md b/sale_delivery_split_date/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..1a7d37f5726 --- /dev/null +++ b/sale_delivery_split_date/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Alex Comba \<\> () +- Carmen Rondon Regalado \<\> + () +- Tatiana Deribina \<\> diff --git a/sale_delivery_split_date/readme/CREDITS.md b/sale_delivery_split_date/readme/CREDITS.md new file mode 100644 index 00000000000..47e2d463523 --- /dev/null +++ b/sale_delivery_split_date/readme/CREDITS.md @@ -0,0 +1,2 @@ +The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd. diff --git a/sale_delivery_split_date/readme/DESCRIPTION.md b/sale_delivery_split_date/readme/DESCRIPTION.md new file mode 100644 index 00000000000..d42a50e915c --- /dev/null +++ b/sale_delivery_split_date/readme/DESCRIPTION.md @@ -0,0 +1,5 @@ +When this module is installed, each sale order you confirm will generate +one delivery order per requested date indicated in the sale order lines. + +Furthermore, the delivery orders can be searched by selecting the +scheduled date, which is now displayed in the delivery tree view. diff --git a/sale_delivery_split_date/readme/ROADMAP.md b/sale_delivery_split_date/readme/ROADMAP.md new file mode 100644 index 00000000000..fd1df7e5cdf --- /dev/null +++ b/sale_delivery_split_date/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- Incompatible with + [sale_procurement_group_by_commitment_date](https://github.com/OCA/sale-workflow/tree/12.0/sale_procurement_group_by_commitment_date) diff --git a/sale_delivery_split_date/static/description/icon.png b/sale_delivery_split_date/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/sale_delivery_split_date/static/description/icon.png differ diff --git a/sale_delivery_split_date/static/description/index.html b/sale_delivery_split_date/static/description/index.html new file mode 100644 index 00000000000..8deae8ff5f2 --- /dev/null +++ b/sale_delivery_split_date/static/description/index.html @@ -0,0 +1,449 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Sale Delivery Split Date

+ +

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runboat

+

When this module is installed, each sale order you confirm will generate +one delivery order per requested date indicated in the sale order lines.

+

Furthermore, the delivery orders can be searched by selecting the +scheduled date, which is now displayed in the delivery tree view.

+

Table of contents

+ + +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Agile Business Group
  • +
+
+ +
+

Other credits

+

The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd.

+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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

+

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

+

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

+
+
+
+
+ + diff --git a/sale_delivery_split_date/tests/__init__.py b/sale_delivery_split_date/tests/__init__.py new file mode 100644 index 00000000000..d4fe79507a5 --- /dev/null +++ b/sale_delivery_split_date/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_sale_delivery diff --git a/sale_delivery_split_date/tests/test_sale_delivery.py b/sale_delivery_split_date/tests/test_sale_delivery.py new file mode 100644 index 00000000000..8c0e84839b4 --- /dev/null +++ b/sale_delivery_split_date/tests/test_sale_delivery.py @@ -0,0 +1,251 @@ +# Copyright 2018 Alex Comba - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import datetime + +from odoo.tools import format_date + +from odoo.addons.sale_stock.tests.common import TestSaleStockCommon + + +class TestSaleDelivery(TestSaleStockCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + customer = cls.partner_a + p1 = cls._create_product( + name="test_product1", + is_storable=True, + ) + p2 = cls._create_product( + name="test_product2", + is_storable=True, + ) + today = datetime.datetime(2020, 1, 1) + cls.dt1 = today + datetime.timedelta(days=9) + cls.dt2 = today + datetime.timedelta(days=10) + cls.date_sooner = cls.dt1 + cls.date_later = cls.dt2 + cls.so = cls._create_sale_order(customer) + cls.so_line1 = cls._create_sale_order_line(cls.so, p1, 10, 100.0, cls.dt1) + cls.so_line2 = cls._create_sale_order_line(cls.so, p2, 10, 200.0, cls.dt1) + + @classmethod + def _create_sale_order(cls, customer): + return cls.env["sale.order"].create({"partner_id": customer.id}) + + @classmethod + def _create_sale_order_line(cls, sale, product, qty, price, date): + return cls.env["sale.order.line"].create( + { + "product_id": product.id, + "name": "cool product", + "order_id": sale.id, + "price_unit": price, + "product_uom_qty": qty, + "commitment_date": date, + } + ) + + def test_check_single_date(self): + self.assertEqual( + len(self.so.picking_ids), + 0, + "There must not be pickings for the SO when draft", + ) + self.so.action_confirm() + self.assertEqual( + len(self.so.picking_ids), + 1, + "There must be 1 picking for the SO when confirmed", + ) + self.assertEqual( + self.so.picking_ids[0].scheduled_date, + self.date_sooner, + "The picking must be planned at the expected date", + ) + self.assertEqual( + self.so_line1.stock_reference_id, + self.so_line2.stock_reference_id, + "The procurement group must be the same", + ) + self.assertIn( + format_date(self.env, self.date_sooner.date()), + self.so_line1.stock_reference_id.name, + ) + + def test_check_multiple_dates(self): + # Change the date of the second line + self.so_line2.commitment_date = self.dt2 + self.assertEqual( + len(self.so.picking_ids), + 0, + "There must not be pickings for the SO when draft", + ) + self.so.action_confirm() + self.assertEqual( + len(self.so.picking_ids), + 2, + "There must be 2 pickings for the SO when confirmed", + ) + sorted_pickings = self.so.picking_ids.sorted(lambda x: x.scheduled_date) + self.assertEqual( + sorted_pickings[0].scheduled_date, + self.date_sooner, + "The first picking must be planned at the soonest date", + ) + self.assertEqual( + sorted_pickings[1].scheduled_date, + self.date_later, + "The second picking must be planned at the latest date", + ) + self.assertNotEqual( + self.so_line1.stock_reference_id, + self.so_line2.stock_reference_id, + "The procurement group must be different", + ) + self.assertIn( + format_date(self.env, self.date_sooner.date()), + self.so_line1.stock_reference_id.name, + ) + self.assertIn( + format_date(self.env, self.date_later.date()), + self.so_line2.stock_reference_id.name, + ) + + def test_check_same_dates(self): + # Change the date of the second line by just adding 1 hour + same_date = self.dt1 + datetime.timedelta(hours=1) + self.so_line2.commitment_date = same_date + self.assertEqual( + len(self.so.picking_ids), + 0, + "There must not be pickings for the SO when draft", + ) + self.so.action_confirm() + self.assertEqual( + len(self.so.picking_ids), + 1, + "There must be only one picking for the SO when confirmed", + ) + self.assertEqual( + self.so.picking_ids.scheduled_date, + self.date_sooner, + "The picking must be planned at the expected date", + ) + self.assertEqual( + self.so_line1.move_ids.date_deadline, + self.so_line1.commitment_date, + "First SO Line move deadline must be equal to commitment date", + ) + self.assertEqual( + self.so_line2.move_ids.date_deadline, + self.so_line2.commitment_date, + "Second SO Line move deadline must be equal to commitment date", + ) + + self.assertEqual( + self.so_line1.stock_reference_id, + self.so_line2.stock_reference_id, + "The procurement group must be the same", + ) + self.assertIn( + format_date(self.env, self.date_sooner.date()), + self.so_line1.stock_reference_id.name, + ) + + def test_security_lead_time_same_dates(self): + same_date = self.dt1 + datetime.timedelta(hours=1) + self.so_line2.commitment_date = same_date + self.so.company_id.security_lead = 2 + security_date = self.date_sooner - datetime.timedelta(days=2) + self.assertEqual( + len(self.so.picking_ids), + 0, + "There must not be pickings for the SO when draft", + ) + self.so.action_confirm() + self.assertEqual( + len(self.so.picking_ids), + 1, + "There must be only one picking for the SO when confirmed", + ) + self.assertEqual( + self.so.picking_ids.scheduled_date, + security_date, + "The picking must be planned at the expected date " + "(with security lead time)", + ) + self.assertEqual( + self.so_line1.move_ids.date_deadline, + self.so_line1.commitment_date, + "First SO Line move deadline must be equal to commitment date", + ) + self.assertEqual( + self.so_line2.move_ids.date_deadline, + self.so_line2.commitment_date, + "Second SO Line move deadline must be equal to commitment date", + ) + self.assertEqual( + self.so_line1.stock_reference_id, + self.so_line2.stock_reference_id, + "The procurement group must be the same", + ) + self.assertIn( + format_date(self.env, security_date.date()), + self.so_line1.stock_reference_id.name, + ) + + def test_security_lead_time_multiple_dates(self): + self.so_line2.commitment_date = self.dt2 + self.so.company_id.security_lead = 3 + security_date_sooner = self.date_sooner - datetime.timedelta(days=3) + security_date_later = self.date_later - datetime.timedelta(days=3) + self.assertEqual( + len(self.so.picking_ids), + 0, + "There must not be pickings for the SO when draft", + ) + self.so.action_confirm() + self.assertEqual( + len(self.so.picking_ids), + 2, + "There must be 2 pickings for the SO when confirmed", + ) + sorted_pickings = self.so.picking_ids.sorted(lambda x: x.scheduled_date) + self.assertEqual( + sorted_pickings[0].scheduled_date, + security_date_sooner, + "The first picking must be planned at the soonest date " + "(with security lead time)", + ) + self.assertEqual( + sorted_pickings[0].date_deadline, + self.so_line1.commitment_date, + "The picking deadline must be equal to commitment date", + ) + self.assertEqual( + sorted_pickings[1].scheduled_date, + security_date_later, + "The second picking must be planned at the latest date " + "(with security lead time)", + ) + self.assertEqual( + sorted_pickings[1].date_deadline, + self.so_line2.commitment_date, + "The picking deadline must be equal to commitment date", + ) + self.assertNotEqual( + self.so_line1.stock_reference_id, + self.so_line2.stock_reference_id, + "The procurement group must be different", + ) + self.assertIn( + format_date(self.env, security_date_sooner.date()), + self.so_line1.stock_reference_id.name, + ) + self.assertIn( + format_date(self.env, security_date_later.date()), + self.so_line2.stock_reference_id.name, + ) diff --git a/sale_delivery_split_date/views/stock_picking.xml b/sale_delivery_split_date/views/stock_picking.xml new file mode 100644 index 00000000000..4a45a5bc907 --- /dev/null +++ b/sale_delivery_split_date/views/stock_picking.xml @@ -0,0 +1,26 @@ + + + + + stock.picking.tree + stock.picking + + + + 0 + + + + + + stock.picking.internal.search + stock.picking + + + + + + + + diff --git a/sale_order_line_date/README.rst b/sale_order_line_date/README.rst new file mode 100644 index 00000000000..428273855c4 --- /dev/null +++ b/sale_order_line_date/README.rst @@ -0,0 +1,115 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +==================== +Sale Order Line Date +==================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f4e35671eaf723733759de9fa762683394377cfc4057b2df2fa9e23a7b5eaf08 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/sale-workflow/tree/19.0/sale_order_line_date + :alt: OCA/sale-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_order_line_date + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds a commitment date to each sale order line and propagate +it to stock moves and pickings. The commitment date of the wholesale +order is computed based on each sale order line date and the sale order +shipping policy. It can't be modified. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Create a Quotation or a Sales Order and it fills the requested date in +the sale order line + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* OdooMRP team +* AvanzOSC +* Serv. Tecnol. Avanzados - Pedro M. Baeza +* SprintIT Ltd. + +Contributors +------------ + +- Oihane Crucelaegui +- Esther Martín +- Pedro M. Baeza +- Ana Juaristi +- Jordi Ballester +- Aaron Henriquez +- Serpent Consulting Services Pvt. Ltd. +- Francesco Apruzzese +- Mykhailo Panarin +- Open-Net Sàrl +- Miquel Raïch +- Moaad Bourhim +- Bernat Puig +- Nhan Tran +- Tatiana Deribina + +Other credits +------------- + +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp + +The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/sale-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_order_line_date/__init__.py b/sale_order_line_date/__init__.py new file mode 100644 index 00000000000..0650744f6bc --- /dev/null +++ b/sale_order_line_date/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/sale_order_line_date/__manifest__.py b/sale_order_line_date/__manifest__.py new file mode 100644 index 00000000000..dba15ae8dab --- /dev/null +++ b/sale_order_line_date/__manifest__.py @@ -0,0 +1,30 @@ +# © 2016 OdooMRP team +# © 2016 AvanzOSC +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2016 ForgeFlow, S.L. +# Copyright 2017 Serpent Consulting Services Pvt. Ltd. +# Copyright 2018 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) + +{ + "name": "Sale Order Line Date", + "version": "19.0.1.0.0", + "summary": "Adds a commitment date to each sale order line.", + "author": ( + "OdooMRP team," + "AvanzOSC," + "Serv. Tecnol. Avanzados - Pedro M. Baeza," + "Odoo Community Association (OCA)" + ", SprintIT Ltd." + ), + "website": "https://github.com/OCA/sale-workflow", + "category": "Sale", + "license": "AGPL-3", + "depends": ["sale_stock"], + "data": ["views/sale_order_view.xml", "reports/sale_order_report.xml"], + "assets": { + "web.assets_backend": [ + "sale_order_line_date/static/src/js/sale_order_line_field/*", + ], + }, +} diff --git a/sale_order_line_date/i18n/ca.po b/sale_order_line_date/i18n/ca.po new file mode 100644 index 00000000000..b8c8c139dc3 --- /dev/null +++ b/sale_order_line_date/i18n/ca.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 2022-03-21 14:17+0000\n" +"Last-Translator: Noel estudillo \n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Data de compromís" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Data de lliurament" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +msgid "Sales Order" +msgstr "Comandes de venda" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línia de comanda de vendes" diff --git a/sale_order_line_date/i18n/de.po b/sale_order_line_date/i18n/de.po new file mode 100644 index 00000000000..735e9809cce --- /dev/null +++ b/sale_order_line_date/i18n/de.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 2021-07-09 15:48+0000\n" +"Last-Translator: Maria Sparenberg \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" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Bestätigtes Datum" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Lieferdatum" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +msgid "Sales Order" +msgstr "Verkaufsauftrag" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Auftragsposition" + +#~ msgid "Quotation" +#~ msgstr "Angebot" + +#~ msgid "Requested Date" +#~ msgstr "Wunsch-Lieferdatum" diff --git a/sale_order_line_date/i18n/el_GR.po b/sale_order_line_date/i18n/el_GR.po new file mode 100644 index 00000000000..bdb11ba17b8 --- /dev/null +++ b/sale_order_line_date/i18n/el_GR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Εντολή Πώλησης" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/es.po b/sale_order_line_date/i18n/es.po new file mode 100644 index 00000000000..9ceb92891aa --- /dev/null +++ b/sale_order_line_date/i18n/es.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 2020-07-27 10:19+0000\n" +"Last-Translator: Daniel Martinez Vila \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" +"X-Generator: Weblate 3.10\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Fecha de compromiso" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Fecha de entrega" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +msgid "Sales Order" +msgstr "Órdenes de venta" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea pedido de venta" diff --git a/sale_order_line_date/i18n/es_ES.po b/sale_order_line_date/i18n/es_ES.po new file mode 100644 index 00000000000..33595526b28 --- /dev/null +++ b/sale_order_line_date/i18n/es_ES.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Pedido de venta" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/es_VE.po b/sale_order_line_date/i18n/es_VE.po new file mode 100644 index 00000000000..3da26d12353 --- /dev/null +++ b/sale_order_line_date/i18n/es_VE.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Pedidos de venta" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" diff --git a/sale_order_line_date/i18n/fi.po b/sale_order_line_date/i18n/fi.po new file mode 100644 index 00000000000..876e3eb40d6 --- /dev/null +++ b/sale_order_line_date/i18n/fi.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Myyntitilaus" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/fr.po b/sale_order_line_date/i18n/fr.po new file mode 100644 index 00000000000..a81ba8c4220 --- /dev/null +++ b/sale_order_line_date/i18n/fr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Bon de commande" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sales Order Line" diff --git a/sale_order_line_date/i18n/hr.po b/sale_order_line_date/i18n/hr.po new file mode 100644 index 00000000000..65fb4ed267b --- /dev/null +++ b/sale_order_line_date/i18n/hr.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# Translators: +# OCA Transbot , 2018 +# Bole , 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: 2025-10-03 10:28+0000\n" +"Last-Translator: vladimiruvid \n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 5.10.4\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Obećani datum" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Datum dostave" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Prodajni nalog" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Stavka ponude" diff --git a/sale_order_line_date/i18n/hr_HR.po b/sale_order_line_date/i18n/hr_HR.po new file mode 100644 index 00000000000..b1012c55f57 --- /dev/null +++ b/sale_order_line_date/i18n/hr_HR.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"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_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Prodjani nalog" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/hu.po b/sale_order_line_date/i18n/hu.po new file mode 100644 index 00000000000..23c0cdf129b --- /dev/null +++ b/sale_order_line_date/i18n/hu.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Vevői megrendelés" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/it.po b/sale_order_line_date/i18n/it.po new file mode 100644 index 00000000000..2df57aaf4aa --- /dev/null +++ b/sale_order_line_date/i18n/it.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 2023-12-01 15:35+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Data impegno" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Data consegna" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +msgid "Sales Order" +msgstr "Ordine di vendita" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Riga ordine di vendita" diff --git a/sale_order_line_date/i18n/nl.po b/sale_order_line_date/i18n/nl.po new file mode 100644 index 00000000000..dc786989193 --- /dev/null +++ b/sale_order_line_date/i18n/nl.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Verkooporder" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/nl_NL.po b/sale_order_line_date/i18n/nl_NL.po new file mode 100644 index 00000000000..078ebac9131 --- /dev/null +++ b/sale_order_line_date/i18n/nl_NL.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# Translators: +# Peter Hageman , 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: 2020-11-05 09:08+0000\n" +"Last-Translator: Cas Vissers \n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Bevestigde datum" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Leverdatum" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Verkooporder" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Verkooporderregel" diff --git a/sale_order_line_date/i18n/pt.po b/sale_order_line_date/i18n/pt.po new file mode 100644 index 00000000000..77af19304e8 --- /dev/null +++ b/sale_order_line_date/i18n/pt.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Ordem de Venda" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/pt_BR.po b/sale_order_line_date/i18n/pt_BR.po new file mode 100644 index 00000000000..58496779e97 --- /dev/null +++ b/sale_order_line_date/i18n/pt_BR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 2023-11-14 14:36+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" +"X-Generator: Weblate 4.17\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "Data do compromisso" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "Data Entrega" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +msgid "Sales Order" +msgstr "Pedido de Venda" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linha pedido de venda" diff --git a/sale_order_line_date/i18n/ro.po b/sale_order_line_date/i18n/ro.po new file mode 100644 index 00000000000..5dbf3abf869 --- /dev/null +++ b/sale_order_line_date/i18n/ro.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: odoomrp-wip (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-20 18:11+0000\n" +"PO-Revision-Date: 2015-09-10 16:42+0000\n" +"Last-Translator: <>\n" +"Language-Team: Romanian (http://www.transifex.com/oca/odoomrp-wip-8-0/" +"language/ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Comandă vânzare" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linie comandă vânzare" diff --git a/sale_order_line_date/i18n/sale_order_line_date.pot b/sale_order_line_date/i18n/sale_order_line_date.pot new file mode 100644 index 00000000000..10c2a7f924a --- /dev/null +++ b/sale_order_line_date/i18n/sale_order_line_date.pot @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.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_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/sk.po b/sale_order_line_date/i18n/sk.po new file mode 100644 index 00000000000..54e8a8cbcc5 --- /dev/null +++ b/sale_order_line_date/i18n/sk.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Objednávka predaja" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/sl.po b/sale_order_line_date/i18n/sl.po new file mode 100644 index 00000000000..3a56f753e7f --- /dev/null +++ b/sale_order_line_date/i18n/sl.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Prodajni nalog" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Postavka prodajnega naloga" diff --git a/sale_order_line_date/i18n/tr.po b/sale_order_line_date/i18n/tr.po new file mode 100644 index 00000000000..cb727483bce --- /dev/null +++ b/sale_order_line_date/i18n/tr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Sipariş Emri" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Satış Siparişi Hattı" diff --git a/sale_order_line_date/i18n/tr_TR.po b/sale_order_line_date/i18n/tr_TR.po new file mode 100644 index 00000000000..e12e7ccef85 --- /dev/null +++ b/sale_order_line_date/i18n/tr_TR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/" +"tr_TR/)\n" +"Language: tr_TR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Satış emri" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sipariş emri satırı " diff --git a/sale_order_line_date/i18n/vi_VN.po b/sale_order_line_date/i18n/vi_VN.po new file mode 100644 index 00000000000..a68f7451fd8 --- /dev/null +++ b/sale_order_line_date/i18n/vi_VN.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: 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" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "Đơn hàng Bán" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/i18n/zh_CN.po b/sale_order_line_date/i18n/zh_CN.po new file mode 100644 index 00000000000..b02c4d6305c --- /dev/null +++ b/sale_order_line_date/i18n/zh_CN.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_order_line_date +# +# 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: Chinese (China) (https://www.transifex.com/oca/teams/23907/" +"zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_order_line_date +#: model_terms:ir.ui.view,arch_db:sale_order_line_date.report_saleorder_document +msgid "Commitment Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model.fields,field_description:sale_order_line_date.field_sale_order_line__commitment_date +msgid "Delivery Date" +msgstr "" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order +#, fuzzy +msgid "Sales Order" +msgstr "销售订单" + +#. module: sale_order_line_date +#: model:ir.model,name:sale_order_line_date.model_sale_order_line +msgid "Sales Order Line" +msgstr "" diff --git a/sale_order_line_date/models/__init__.py b/sale_order_line_date/models/__init__.py new file mode 100644 index 00000000000..2d7ee6c3dc7 --- /dev/null +++ b/sale_order_line_date/models/__init__.py @@ -0,0 +1,2 @@ +from . import sale_order +from . import sale_order_line diff --git a/sale_order_line_date/models/sale_order.py b/sale_order_line_date/models/sale_order.py new file mode 100644 index 00000000000..f428f587e78 --- /dev/null +++ b/sale_order_line_date/models/sale_order.py @@ -0,0 +1,24 @@ +# © 2016 OdooMRP team +# © 2016 AvanzOSC +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2016 ForgeFlow S.L. (https://forgeflow.com) +# Copyright 2017 Serpent Consulting Services Pvt. Ltd. +# Copyright 2018 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) + +from odoo import api, models + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + @api.onchange("commitment_date", "expected_date") + def _onchange_commitment_date(self): + """Update empty commitment date order lines + with commitment date from sale order""" + result = super()._onchange_commitment_date() or {} + if "warning" not in result: + for line in self.order_line: + if not line.commitment_date: + line.commitment_date = self.commitment_date + return result diff --git a/sale_order_line_date/models/sale_order_line.py b/sale_order_line_date/models/sale_order_line.py new file mode 100644 index 00000000000..e45e6a9db47 --- /dev/null +++ b/sale_order_line_date/models/sale_order_line.py @@ -0,0 +1,64 @@ +# © 2016 OdooMRP team +# © 2016 AvanzOSC +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2016 ForgeFlow S.L. (https://forgeflow.com) +# Copyright 2017 Serpent Consulting Services Pvt. Ltd. +# Copyright 2018 Camptocamp SA +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) + +from datetime import timedelta + +from odoo import api, fields, models + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + commitment_date = fields.Datetime( + "Delivery Date", + compute="_compute_commitment_date", + store=True, + readonly=False, + recursive=True, + copy=False, + ) + + @api.depends("linked_line_id", "linked_line_id.commitment_date") + def _compute_commitment_date(self): + for record in self: + combo_line = record.linked_line_id + if combo_line: + record.commitment_date = combo_line.commitment_date + + def _prepare_procurement_values(self): + vals = super()._prepare_procurement_values() # has ensure_one already + com_date = self.commitment_date + if com_date: + vals.update( + date_planned=com_date + - timedelta(days=self.order_id.company_id.security_lead), + date_deadline=com_date, + ) + return vals + + def write(self, vals): + # Propagate a new commitment date to pending stock moves + res = super().write(vals) + if "commitment_date" in vals: + commitment_date = vals.get("commitment_date") + if commitment_date: + self._propagate_date_deadline_to_moves(commitment_date) + else: + for line in self: + date = line.order_id.commitment_date or line._expected_date() + line._propagate_date_deadline_to_moves(date) + return res + + def _propagate_date_deadline_to_moves(self, date): + moves_todo = self.move_ids.filtered( + lambda sm: sm.state not in ["cancel", "done"] + ) + move_values = { + "date_deadline": date, + } + moves_todo.write(move_values) diff --git a/sale_order_line_date/pyproject.toml b/sale_order_line_date/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/sale_order_line_date/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/sale_order_line_date/readme/CONTRIBUTORS.md b/sale_order_line_date/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..2fbf7b21e92 --- /dev/null +++ b/sale_order_line_date/readme/CONTRIBUTORS.md @@ -0,0 +1,15 @@ +- Oihane Crucelaegui \<\> +- Esther Martín \<\> +- Pedro M. Baeza \<\> +- Ana Juaristi \<\> +- Jordi Ballester \<\> +- Aaron Henriquez \<\> +- Serpent Consulting Services Pvt. Ltd. \<\> +- Francesco Apruzzese \<\> +- Mykhailo Panarin \<\> +- Open-Net Sàrl \<\> +- Miquel Raïch \<\> +- Moaad Bourhim \<\> +- Bernat Puig \<\> +- Nhan Tran \<\> +- Tatiana Deribina \<\> diff --git a/sale_order_line_date/readme/CREDITS.md b/sale_order_line_date/readme/CREDITS.md new file mode 100644 index 00000000000..c0edd466f07 --- /dev/null +++ b/sale_order_line_date/readme/CREDITS.md @@ -0,0 +1,5 @@ +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp + +The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd. diff --git a/sale_order_line_date/readme/DESCRIPTION.md b/sale_order_line_date/readme/DESCRIPTION.md new file mode 100644 index 00000000000..4d2b6f4b8e7 --- /dev/null +++ b/sale_order_line_date/readme/DESCRIPTION.md @@ -0,0 +1,4 @@ +This module adds a commitment date to each sale order line and propagate +it to stock moves and pickings. The commitment date of the wholesale +order is computed based on each sale order line date and the sale order +shipping policy. It can't be modified. diff --git a/sale_order_line_date/readme/USAGE.md b/sale_order_line_date/readme/USAGE.md new file mode 100644 index 00000000000..a95b6c09211 --- /dev/null +++ b/sale_order_line_date/readme/USAGE.md @@ -0,0 +1,2 @@ +Create a Quotation or a Sales Order and it fills the requested date in +the sale order line diff --git a/sale_order_line_date/reports/sale_order_report.xml b/sale_order_line_date/reports/sale_order_report.xml new file mode 100644 index 00000000000..7e302556387 --- /dev/null +++ b/sale_order_line_date/reports/sale_order_report.xml @@ -0,0 +1,19 @@ + + + + diff --git a/sale_order_line_date/static/description/icon.png b/sale_order_line_date/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/sale_order_line_date/static/description/icon.png differ diff --git a/sale_order_line_date/static/description/index.html b/sale_order_line_date/static/description/index.html new file mode 100644 index 00000000000..28cfafee8bc --- /dev/null +++ b/sale_order_line_date/static/description/index.html @@ -0,0 +1,463 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Sale Order Line Date

+ +

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runboat

+

This module adds a commitment date to each sale order line and propagate +it to stock moves and pickings. The commitment date of the wholesale +order is computed based on each sale order line date and the sale order +shipping policy. It can’t be modified.

+

Table of contents

+ +
+

Usage

+

Create a Quotation or a Sales Order and it fills the requested date in +the sale order line

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • OdooMRP team
  • +
  • AvanzOSC
  • +
  • Serv. Tecnol. Avanzados - Pedro M. Baeza
  • +
  • SprintIT Ltd.
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp

+

The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd.

+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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

+

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

+

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

+
+
+
+
+ + diff --git a/sale_order_line_date/static/src/js/sale_order_line_field/sale_order_line_field.js b/sale_order_line_date/static/src/js/sale_order_line_field/sale_order_line_field.js new file mode 100644 index 00000000000..e371eb0733a --- /dev/null +++ b/sale_order_line_date/static/src/js/sale_order_line_field/sale_order_line_field.js @@ -0,0 +1,12 @@ +/* Copyright 2025 SpritIT Ltd - Tatiana Deribina */ + +import {SaleOrderLineListRenderer} from "@sale/js/sale_order_line_field/sale_order_line_field"; +import {patch} from "@web/core/utils/patch"; + +patch(SaleOrderLineListRenderer.prototype, { + get comboColumns() { + const columns = super.comboColumns; + columns.push("commitment_date"); + return columns; + }, +}); diff --git a/sale_order_line_date/tests/__init__.py b/sale_order_line_date/tests/__init__.py new file mode 100644 index 00000000000..96149d2f9fb --- /dev/null +++ b/sale_order_line_date/tests/__init__.py @@ -0,0 +1 @@ +from . import test_sale_order_line_date diff --git a/sale_order_line_date/tests/test_sale_order_line_date.py b/sale_order_line_date/tests/test_sale_order_line_date.py new file mode 100644 index 00000000000..2fa701972c0 --- /dev/null +++ b/sale_order_line_date/tests/test_sale_order_line_date.py @@ -0,0 +1,229 @@ +# © 2016 OdooMRP team +# © 2016 AvanzOSC +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# © 2016-22 ForgeFlow S.L. (https://forgeflow.com) +# Copyright 2017 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +import datetime + +from odoo import Command, fields + +from odoo.addons.sale.tests.common import TestSaleCommon + + +class TestSaleOrderLineDates(TestSaleCommon): + @classmethod + def setUpClass(cls): + """Setup a Sale Order with 4 lines.""" + super().setUpClass() + customer = cls.partner_a + cls.company = cls.env.company + cls.company.security_lead = 1 + + price = 100.0 + qty = 5 + product_id = cls.product + + combo_vals = { + "name": "Box", + "combo_item_ids": [ + Command.create({"product_id": product_id.id}), + ], + } + combo = cls.env["product.combo"].create(combo_vals) + product_combo = cls._create_product( + name="Box with Box", + list_price=10.0, + type="combo", + combo_ids=[ + Command.link(combo.id), + ], + ) + + cls.today = fields.Datetime.now() + cls.dt1 = cls.today + datetime.timedelta(days=9) + cls.dt2 = cls.today + datetime.timedelta(days=10) + cls.dt3 = cls.today + datetime.timedelta(days=3) + cls.sale1 = cls._create_sale_order(customer, cls.dt2) + cls.sale_line1 = cls._create_sale_order_line( + cls.sale1, product_id, qty, price, cls.dt1 + ) + cls.sale_line2 = cls._create_sale_order_line( + cls.sale1, product_id, qty, price, cls.dt2 + ) + cls.sale_line3 = cls._create_sale_order_line( + cls.sale1, product_id, qty, price, None + ) + cls.sale2 = cls._create_sale_order(customer, cls.dt2) + cls.sale_line4 = cls._create_sale_order_line( + cls.sale2, product_id, qty, price, cls.dt3 + ) + cls.sale_line5 = cls._create_sale_order_line( + cls.sale2, product_id, qty, price, cls.dt2 + ) + cls.sale_line6 = cls._create_sale_order_line( + cls.sale2, product_id, qty, price, cls.dt1 + ) + + cls.sale3 = cls._create_sale_order(customer, cls.dt3) + cls.sale_line_combo = cls._create_sale_order_line( + cls.sale2, product_combo, qty, price, cls.dt1 + ) + + extra_combo_sol_vals = { + "combo_item_id": combo.combo_item_ids.id, + "linked_line_id": cls.sale_line_combo.id, + } + cls.sale_line_combo_child = cls._create_sale_order_line( + cls.sale3, product_id, qty, price, False, extra_combo_sol_vals + ) + + @classmethod + def _create_sale_order(cls, customer, date): + sale = cls.env["sale.order"].create( + { + "partner_id": customer.id, + "partner_invoice_id": customer.id, + "partner_shipping_id": customer.id, + "commitment_date": date, + "picking_policy": "direct", + } + ) + return sale + + @classmethod + def _create_sale_order_line(cls, sale, product, qty, price, date, extra_vals=None): + values = { + "product_id": product.id, + "name": "cool product", + "order_id": sale.id, + "price_unit": price, + "product_uom_qty": qty, + "commitment_date": date, + } + if extra_vals: + values.update(extra_vals) + sale_line = cls.env["sale.order.line"].create(values) + return sale_line + + def _assert_equal_dates(self, date1, date2): + if isinstance(date1, datetime.datetime): + date1 = date1.date() + if isinstance(date2, datetime.datetime): + date2 = date2.date() + self.assertEqual(date1, date2) + + def test_01_so_commitment_dates(self): + """Test if commitment date in sale_order_line fills + with SO commitment_date only when is empty""" + self.assertEqual(self.sale_line3.commitment_date, False) + self.assertEqual(self.sale1.commitment_date, self.dt2) + self.sale1.write({"commitment_date": self.dt3}) + self.sale1._onchange_commitment_date() + self.assertEqual(self.sale_line1.commitment_date, self.dt1) + self.assertEqual(self.sale_line2.commitment_date, self.dt2) + self.assertEqual(self.sale_line3.commitment_date, self.dt3) + + def test_02_shipping_policies(self): + """Test if dates are propagated correctly taking into + account Shipping Policy""" + self.sale1.action_confirm() + picking = self.sale1.picking_ids + self.assertEqual(len(picking), 1) + # it should be the earliest (3 line commitment_date is not set) -> dt1 + self.assertEqual(picking.scheduled_date, self.dt1 - datetime.timedelta(days=1)) + self.assertEqual(picking.date_deadline, self.dt1) + self.assertEqual(self.sale2.picking_policy, "direct") + self.sale2.picking_policy = "one" + self.sale2.action_confirm() + picking = self.sale2.picking_ids + self.assertEqual(len(picking), 1) + # It should be the latest -> dt2 + self.assertEqual(picking.scheduled_date, self.dt2 - datetime.timedelta(days=1)) + self.assertEqual(picking.date_deadline, self.dt2) + # security_lead 1 day. + self._assert_equal_dates( + self.sale_line4.commitment_date - datetime.timedelta(days=1), + self.sale_line4.move_ids.date, + ) + self._assert_equal_dates( + self.sale_line4.commitment_date, self.sale_line4.move_ids.date_deadline + ) + self._assert_equal_dates( + self.sale_line5.commitment_date - datetime.timedelta(days=1), + self.sale_line5.move_ids.date, + ) + self._assert_equal_dates( + self.sale_line5.commitment_date, self.sale_line5.move_ids.date_deadline + ) + self._assert_equal_dates( + self.sale_line6.commitment_date - datetime.timedelta(days=1), + self.sale_line6.move_ids.date, + ) + self._assert_equal_dates( + self.sale_line6.commitment_date, self.sale_line6.move_ids.date_deadline + ) + + def test_03_line_commitment_date_picking_propagation(self): + """Test if dates are propagated correctly in stock moves""" + self.sale1.write({"commitment_date": self.dt1}) + self.sale1._onchange_commitment_date() + self._assert_equal_dates(self.sale_line3.commitment_date, self.dt1) + self.sale1.action_confirm() + # security_lead 1 day. + self._assert_equal_dates( + self.sale_line1.commitment_date - datetime.timedelta(days=1), + self.sale_line1.move_ids.date, + ) + self._assert_equal_dates( + self.sale_line1.commitment_date, self.sale_line1.move_ids.date_deadline + ) + self._assert_equal_dates( + self.sale_line2.commitment_date - datetime.timedelta(days=1), + self.sale_line2.move_ids.date, + ) + self._assert_equal_dates( + self.sale_line2.commitment_date, self.sale_line2.move_ids.date_deadline + ) + self._assert_equal_dates( + self.sale_line3.commitment_date - datetime.timedelta(days=1), + self.sale_line3.move_ids.date, + ) + self._assert_equal_dates( + self.sale_line3.commitment_date, self.sale_line3.move_ids.date_deadline + ) + # Test line date change after confirmation + self.sale_line1.write({"commitment_date": self.dt2}) + self._assert_equal_dates( + self.sale_line1.commitment_date, self.sale_line1.move_ids.date_deadline + ) + + def test_04_line_commitment_date_removal(self): + self.sale1.commitment_date = False + self.sale1.action_confirm() + self._assert_equal_dates( + self.sale_line1.commitment_date, self.sale_line1.move_ids.date_deadline + ) + self.sale_line1.commitment_date = False + self._assert_equal_dates( + self.sale_line1._expected_date(), self.sale_line1.move_ids.date_deadline + ) + + def test_05_commitment_date_duplication(self): + """ + Test if commitment_date field is empty when duplicating a sale order line. + """ + self._assert_equal_dates(self.sale_line1.commitment_date, self.dt1) + duplicated_order = self.sale1.copy() + for duplicated_line in duplicated_order.order_line: + self.assertFalse(duplicated_line.commitment_date) + + def test_06_commitment_date_propagated_to_combo_subproducts(self): + """ + Test if commitment_date field is correctly updated to items from combo. + Note: On the form view possible to update only date of combo line + """ + self._assert_equal_dates(self.sale_line_combo_child.commitment_date, self.dt1) + self.sale_line_combo.commitment_date = self.dt2 + self._assert_equal_dates(self.sale_line_combo_child.commitment_date, self.dt2) diff --git a/sale_order_line_date/views/sale_order_view.xml b/sale_order_line_date/views/sale_order_view.xml new file mode 100644 index 00000000000..a0c5bc97e50 --- /dev/null +++ b/sale_order_line_date/views/sale_order_view.xml @@ -0,0 +1,37 @@ + + + + sale.order.commitment.date.form + sale.order + + + + {'default_commitment_date': commitment_date} + + + + + + + + + + + sale.order.line.ext.list + sale.order.line + + + + + + + + diff --git a/sale_procurement_group_by_line/README.rst b/sale_procurement_group_by_line/README.rst new file mode 100644 index 00000000000..2d192d650e1 --- /dev/null +++ b/sale_procurement_group_by_line/README.rst @@ -0,0 +1,99 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +============================ +Sale Stock Reference by Line +============================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:3422322fe14e454647825eae76770bf4bea1d86e11d8398210ce21917badbde1 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/sale-workflow/tree/19.0/sale_procurement_group_by_line + :alt: OCA/sale-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/sale-workflow-19-0/sale-workflow-19-0-sale_procurement_group_by_line + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module was written to extend the functionality of stock references +(aka procurement groups) created from a sale order. + +On itself, this module does nothing it is a requirement for modules +which needs to create stock references (aka procurement groups) per sale +order line basis. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Camptocamp +* ForgeFlow +* Serpent Consulting Services Pvt. Ltd. +* SprintIT Ltd. + +Contributors +------------ + +- Guewen Baconnier +- Yannick Vaucher +- Jordi Ballester +- Serpent Consulting Services Pvt. Ltd. +- Carmen Rondon Regalado +- Tatiana Deribina + +Other credits +------------- + +The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd. + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/sale-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_procurement_group_by_line/__init__.py b/sale_procurement_group_by_line/__init__.py new file mode 100644 index 00000000000..c8748f360d6 --- /dev/null +++ b/sale_procurement_group_by_line/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import model diff --git a/sale_procurement_group_by_line/__manifest__.py b/sale_procurement_group_by_line/__manifest__.py new file mode 100644 index 00000000000..d61e568883b --- /dev/null +++ b/sale_procurement_group_by_line/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016-20 ForgeFlow S.L. (https://www.forgeflow.com) +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Sale Stock Reference by Line", + "summary": ( + "Base module for definition of stock references creation rules for Sale order" + ), + "version": "19.0.1.0.1", + "author": ( + "Camptocamp," + "ForgeFlow," + "Serpent Consulting Services Pvt. Ltd.," + "Odoo Community Association (OCA)" + ", SprintIT Ltd." + ), + "category": "Warehouse", + "license": "AGPL-3", + "development_status": "Production/Stable", + "website": "https://github.com/OCA/sale-workflow", + "depends": ["sale_stock"], + "installable": True, +} diff --git a/sale_procurement_group_by_line/i18n/ca.po b/sale_procurement_group_by_line/i18n/ca.po new file mode 100644 index 00000000000..3afdece5370 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/ca.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_by_line +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-14 06:38+0000\n" +"PO-Revision-Date: 2022-03-21 14:17+0000\n" +"Last-Translator: Noel estudillo \n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/ca/)\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "Grup de contractació" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línia de comanda de vendes" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#~ msgid "Sales Order" +#~ msgstr "Comandes de venda" + +#~ msgid "Display Name" +#~ msgstr "Nom de visualització" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última modificació el" diff --git a/sale_procurement_group_by_line/i18n/de.po b/sale_procurement_group_by_line/i18n/de.po new file mode 100644 index 00000000000..f1e42edaa20 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/de.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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: 2023-10-11 11:38+0000\n" +"Last-Translator: David Brühlmeier \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" +"X-Generator: Weblate 4.17\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "Einkaufsgruppe" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Auftragsposition" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "Lagerbuchung" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Verkaufsauftrag" + +#~ msgid "Quotation" +#~ msgstr "Angebot" diff --git a/sale_procurement_group_by_line/i18n/el_GR.po b/sale_procurement_group_by_line/i18n/el_GR.po new file mode 100644 index 00000000000..e6378d35c68 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/el_GR.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: el_GR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Εντολή Πώλησης" diff --git a/sale_procurement_group_by_line/i18n/es.po b/sale_procurement_group_by_line/i18n/es.po new file mode 100644 index 00000000000..5261fdff19f --- /dev/null +++ b/sale_procurement_group_by_line/i18n/es.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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: 2023-07-25 12: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" +"X-Generator: Weblate 4.17\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "Grupo de adquisiciones" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "movimiento de existencias" + +#~ msgid "Sales Order" +#~ msgstr "Órdenes de venta" diff --git a/sale_procurement_group_by_line/i18n/es_ES.po b/sale_procurement_group_by_line/i18n/es_ES.po new file mode 100644 index 00000000000..768ad420a04 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/es_ES.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_by_line +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-10-04 13:41+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Spain) (http://www.transifex.com/oca/OCA-sale-" +"workflow-8-0/language/es_ES/)\n" +"Language: es_ES\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Pedido de venta" diff --git a/sale_procurement_group_by_line/i18n/es_VE.po b/sale_procurement_group_by_line/i18n/es_VE.po new file mode 100644 index 00000000000..92b40dcce07 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/es_VE.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: es_VE\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedido de venta" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Pedidos de venta" diff --git a/sale_procurement_group_by_line/i18n/fi.po b/sale_procurement_group_by_line/i18n/fi.po new file mode 100644 index 00000000000..329bccdc16d --- /dev/null +++ b/sale_procurement_group_by_line/i18n/fi.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Myyntitilaus" diff --git a/sale_procurement_group_by_line/i18n/fr.po b/sale_procurement_group_by_line/i18n/fr.po new file mode 100644 index 00000000000..31e7b0fb1eb --- /dev/null +++ b/sale_procurement_group_by_line/i18n/fr.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sales Order Line" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Bon de commande" diff --git a/sale_procurement_group_by_line/i18n/hr.po b/sale_procurement_group_by_line/i18n/hr.po new file mode 100644 index 00000000000..9d7ed74a7b9 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/hr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Stavka ponude" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Prodajni nalog" diff --git a/sale_procurement_group_by_line/i18n/hr_HR.po b/sale_procurement_group_by_line/i18n/hr_HR.po new file mode 100644 index 00000000000..c2d249b4311 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/hr_HR.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: hr_HR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Prodjani nalog" diff --git a/sale_procurement_group_by_line/i18n/hu.po b/sale_procurement_group_by_line/i18n/hu.po new file mode 100644 index 00000000000..4580a56f9c0 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/hu.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_by_line +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: sale-workflow (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-10 05:55+0000\n" +"PO-Revision-Date: 2015-09-03 07:09+0000\n" +"Last-Translator: <>\n" +"Language-Team: Hungarian (http://www.transifex.com/oca/OCA-sale-workflow-8-0/" +"language/hu/)\n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Vevői megrendelés" diff --git a/sale_procurement_group_by_line/i18n/it.po b/sale_procurement_group_by_line/i18n/it.po new file mode 100644 index 00000000000..c9a454ecc55 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/it.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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: 2023-10-09 07:41+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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "Gruppo di approvvigionamento" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Riga ordine di vendita" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "Movimento di magazzino" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Ordini vendita" diff --git a/sale_procurement_group_by_line/i18n/nl.po b/sale_procurement_group_by_line/i18n/nl.po new file mode 100644 index 00000000000..322e55a5226 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/nl.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Verkooporder" diff --git a/sale_procurement_group_by_line/i18n/nl_NL.po b/sale_procurement_group_by_line/i18n/nl_NL.po new file mode 100644 index 00000000000..b81541c6d1a --- /dev/null +++ b/sale_procurement_group_by_line/i18n/nl_NL.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Verkooporderregel" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Verkooporder" diff --git a/sale_procurement_group_by_line/i18n/pt.po b/sale_procurement_group_by_line/i18n/pt.po new file mode 100644 index 00000000000..ab30273e264 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/pt.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Ordem de Venda" diff --git a/sale_procurement_group_by_line/i18n/pt_BR.po b/sale_procurement_group_by_line/i18n/pt_BR.po new file mode 100644 index 00000000000..c263d64f4a0 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/pt_BR.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linha Pedido de Venda" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Pedido de Venda" diff --git a/sale_procurement_group_by_line/i18n/ro.po b/sale_procurement_group_by_line/i18n/ro.po new file mode 100644 index 00000000000..2e1f6c102e0 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/ro.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Linie comandă vânzare" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Comandă vânzare" diff --git a/sale_procurement_group_by_line/i18n/sale_procurement_group_by_line.pot b/sale_procurement_group_by_line/i18n/sale_procurement_group_by_line.pot new file mode 100644 index 00000000000..bf24292d984 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/sale_procurement_group_by_line.pot @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_by_line +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.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_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" diff --git a/sale_procurement_group_by_line/i18n/sk.po b/sale_procurement_group_by_line/i18n/sk.po new file mode 100644 index 00000000000..f63a9e429eb --- /dev/null +++ b/sale_procurement_group_by_line/i18n/sk.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Objednávka predaja" diff --git a/sale_procurement_group_by_line/i18n/sl.po b/sale_procurement_group_by_line/i18n/sl.po new file mode 100644 index 00000000000..02f61020169 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/sl.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Postavka prodajnega naloga" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Prodajni nalog" diff --git a/sale_procurement_group_by_line/i18n/tr.po b/sale_procurement_group_by_line/i18n/tr.po new file mode 100644 index 00000000000..e08d7ab42fc --- /dev/null +++ b/sale_procurement_group_by_line/i18n/tr.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Satış Siparişi Hattı" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Sipariş Emri" diff --git a/sale_procurement_group_by_line/i18n/tr_TR.po b/sale_procurement_group_by_line/i18n/tr_TR.po new file mode 100644 index 00000000000..8a6d93adf72 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/tr_TR.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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 (Turkey) (https://www.transifex.com/oca/teams/23907/" +"tr_TR/)\n" +"Language: tr_TR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "Sipariş emri satırı " + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Satış emri" diff --git a/sale_procurement_group_by_line/i18n/vi_VN.po b/sale_procurement_group_by_line/i18n/vi_VN.po new file mode 100644 index 00000000000..42ad523e0dd --- /dev/null +++ b/sale_procurement_group_by_line/i18n/vi_VN.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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" +"Language: vi_VN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "Đơn hàng Bán" diff --git a/sale_procurement_group_by_line/i18n/zh_CN.po b/sale_procurement_group_by_line/i18n/zh_CN.po new file mode 100644 index 00000000000..7cac7ff96d0 --- /dev/null +++ b/sale_procurement_group_by_line/i18n/zh_CN.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * sale_procurement_group_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:09+0000\n" +"Last-Translator: <>\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" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: sale_procurement_group_by_line +#: model:ir.model.fields,field_description:sale_procurement_group_by_line.field_sale_order_line__procurement_group_id +msgid "Procurement group" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: sale_procurement_group_by_line +#: model:ir.model,name:sale_procurement_group_by_line.model_stock_move +msgid "Stock Move" +msgstr "" + +#, fuzzy +#~ msgid "Sales Order" +#~ msgstr "销售订单" diff --git a/sale_procurement_group_by_line/migrations/19.0.1.0.0/post-migrate.py b/sale_procurement_group_by_line/migrations/19.0.1.0.0/post-migrate.py new file mode 100644 index 00000000000..97ef6494cbf --- /dev/null +++ b/sale_procurement_group_by_line/migrations/19.0.1.0.0/post-migrate.py @@ -0,0 +1,6 @@ +def migrate(cr, version): + """ + TODO recalculate `stock_reference_id` once Odoo migration scripts are ready + and we know how to map old "procurement.group" to new "stock.reference" + """ + pass diff --git a/sale_procurement_group_by_line/migrations/19.0.1.0.0/pre-migrate.py b/sale_procurement_group_by_line/migrations/19.0.1.0.0/pre-migrate.py new file mode 100644 index 00000000000..1437717ad96 --- /dev/null +++ b/sale_procurement_group_by_line/migrations/19.0.1.0.0/pre-migrate.py @@ -0,0 +1,13 @@ +from odoo.upgrade import util + + +def migrate(cr, version): + util.rename_field( + cr, + "sale.order.line", + "procurement_group_id", + "stock_reference_id", + update_references=True, + domain_adapter=None, + skip_inherit=(), + ) diff --git a/sale_procurement_group_by_line/model/__init__.py b/sale_procurement_group_by_line/model/__init__.py new file mode 100644 index 00000000000..8d632c02319 --- /dev/null +++ b/sale_procurement_group_by_line/model/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import sale +from . import stock_move diff --git a/sale_procurement_group_by_line/model/sale.py b/sale_procurement_group_by_line/model/sale.py new file mode 100644 index 00000000000..20c731d2b07 --- /dev/null +++ b/sale_procurement_group_by_line/model/sale.py @@ -0,0 +1,106 @@ +# Copyright 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016-20 ForgeFlow S.L. (https://www.forgeflow.com) +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models +from odoo.tools.float_utils import float_compare + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + stock_reference_id = fields.Many2one( + "stock.reference", "Procurement Reference", copy=False + ) + + def _get_stock_reference(self): + return self.stock_reference_id or False + + def _get_stock_reference_key(self): + """Return a key with priority to be used to regroup lines in multiple + procurement groups + + """ + return 8, self.order_id.id + + def _prepare_procurement_values(self): + """ + Overload core method to modify stock references to the line specific + """ + values = super()._prepare_procurement_values() + values["reference_ids"] = self.stock_reference_id + return values + + def _action_launch_stock_rule(self, *, previous_product_uom_qty=False): + """ + Launch procurement group run method. + """ + if self.env.context.get("skip_procurement"): + return True + precision = self.env["decimal.precision"].precision_get("Product Unit") + procurements = [] + groups = {} + if not previous_product_uom_qty: + previous_product_uom_qty = {} + for line in self: + line = line.with_company(line.company_id) + if ( + line.state != "sale" + or line.order_id.locked + or line.product_id.type != "consu" + ): + continue + qty = line._get_qty_procurement(previous_product_uom_qty) + if ( + float_compare(qty, line.product_uom_qty, precision_digits=precision) + == 0 + ): + continue + + group = line._get_stock_reference() + + # Group the sales order lines with same procurement group + # according to the group key + for order_line in line.order_id.order_line: + line_group = order_line.stock_reference_id or False + if line_group: + groups[order_line._get_stock_reference_key()] = line_group + if not group: + group = groups.get(line._get_stock_reference_key()) + + if not group: + vals = line._prepare_reference_vals() + group = self.env["stock.reference"].create(vals) + + line.stock_reference_id = group + + values = line._prepare_procurement_values() + product_qty = line.product_uom_qty - qty + + line_uom = line.product_uom_id + quant_uom = line.product_id.uom_id + product_qty, procurement_uom = line_uom._adjust_uom_quantities( + product_qty, quant_uom + ) + procurements += line._create_procurements( + product_qty, procurement_uom, values + ) + # We store the procured quantity in the UoM of the line to avoid + # duplicated procurements, specially for dropshipping and kits. + previous_product_uom_qty[line.id] = line.product_uom_qty + if procurements: + self.env["stock.rule"].run(procurements) + # This next block is currently needed only because the scheduler trigger is done + # by picking confirmation rather than stock.move confirmation + orders = self.mapped("order_id") + for order in orders: + pickings_to_confirm = order.picking_ids.filtered( + lambda p: p.state not in ["cancel", "done"] + ) + if pickings_to_confirm: + # Trigger the Scheduler for Pickings + pickings_to_confirm.action_confirm() + return super( + SaleOrderLine, self.with_context(sale_group_by_line=True) + )._action_launch_stock_rule(previous_product_uom_qty=previous_product_uom_qty) diff --git a/sale_procurement_group_by_line/model/stock_move.py b/sale_procurement_group_by_line/model/stock_move.py new file mode 100644 index 00000000000..cb5de1bc641 --- /dev/null +++ b/sale_procurement_group_by_line/model/stock_move.py @@ -0,0 +1,17 @@ +# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class StockMove(models.Model): + _inherit = "stock.move" + + def _update_candidate_moves_list(self, candidate_moves_set): + """ + We want to merge stock moves within the stock reference only + """ + res = super()._update_candidate_moves_list(candidate_moves_set) + if self.env.context.get("sale_group_by_line"): + candidate_moves_set.add(self.sale_line_id.stock_reference_id.move_ids) + return res diff --git a/sale_procurement_group_by_line/pyproject.toml b/sale_procurement_group_by_line/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/sale_procurement_group_by_line/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/sale_procurement_group_by_line/readme/CONTRIBUTORS.md b/sale_procurement_group_by_line/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..235cf324fd1 --- /dev/null +++ b/sale_procurement_group_by_line/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- Guewen Baconnier \<\> +- Yannick Vaucher \<\> +- Jordi Ballester \<\> +- Serpent Consulting Services Pvt. Ltd. \<\> +- Carmen Rondon Regalado \<\> +- Tatiana Deribina \<\> diff --git a/sale_procurement_group_by_line/readme/CREDITS.md b/sale_procurement_group_by_line/readme/CREDITS.md new file mode 100644 index 00000000000..47e2d463523 --- /dev/null +++ b/sale_procurement_group_by_line/readme/CREDITS.md @@ -0,0 +1,2 @@ +The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd. diff --git a/sale_procurement_group_by_line/readme/DESCRIPTION.md b/sale_procurement_group_by_line/readme/DESCRIPTION.md new file mode 100644 index 00000000000..c225f579ac2 --- /dev/null +++ b/sale_procurement_group_by_line/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +This module was written to extend the functionality of stock references +(aka procurement groups) created from a sale order. + +On itself, this module does nothing it is a requirement for modules +which needs to create stock references (aka procurement groups) per +sale order line basis. diff --git a/sale_procurement_group_by_line/static/description/icon.png b/sale_procurement_group_by_line/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/sale_procurement_group_by_line/static/description/icon.png differ diff --git a/sale_procurement_group_by_line/static/description/index.html b/sale_procurement_group_by_line/static/description/index.html new file mode 100644 index 00000000000..9e9022ef097 --- /dev/null +++ b/sale_procurement_group_by_line/static/description/index.html @@ -0,0 +1,447 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Sale Stock Reference by Line

+ +

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

+

This module was written to extend the functionality of stock references +(aka procurement groups) created from a sale order.

+

On itself, this module does nothing it is a requirement for modules +which needs to create stock references (aka procurement groups) per sale +order line basis.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
  • ForgeFlow
  • +
  • Serpent Consulting Services Pvt. Ltd.
  • +
  • SprintIT Ltd.
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

The migration of this module from 18.0 to 19.0 was financially supported +by SprintIT Ltd.

+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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

+

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

+

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

+
+
+
+
+ + diff --git a/sale_procurement_group_by_line/tests/__init__.py b/sale_procurement_group_by_line/tests/__init__.py new file mode 100644 index 00000000000..2a1fd983b44 --- /dev/null +++ b/sale_procurement_group_by_line/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_sale_procurement_group_by_line diff --git a/sale_procurement_group_by_line/tests/test_sale_procurement_group_by_line.py b/sale_procurement_group_by_line/tests/test_sale_procurement_group_by_line.py new file mode 100644 index 00000000000..f3d716cf1de --- /dev/null +++ b/sale_procurement_group_by_line/tests/test_sale_procurement_group_by_line.py @@ -0,0 +1,149 @@ +# Copyright 2013-2014 Camptocamp SA - Guewen Baconnier +# © 2016-20 ForgeFlow S.L. (https://www.forgeflow.com) +# © 2016 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests import Form + +from odoo.addons.sale_stock.tests.common import TestSaleStockCommon + + +class TestSaleProcurementGroupByLine(TestSaleStockCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + # Required Models + cls.product_model = cls.env["product.product"] + cls.product_ctg_model = cls.env["product.category"] + cls.proc_group_model = cls.env["stock.reference"] + cls.sale_model = cls.env["sale.order"] + cls.order_line_model = cls.env["sale.order.line"] + # Warehouse + cls.warehouse_id = cls.env.ref("stock.warehouse0") + # Create product category + cls.product_ctg = cls._create_product_category() + # Create Products + cls.new_product1 = cls._create_product( + name="test_product1", + categ_id=cls.product_ctg.id, + is_storable=True, + ) + cls.new_product2 = cls._create_product( + name="test_product2", + categ_id=cls.product_ctg.id, + is_storable=True, + ) + cls.sale = cls._create_sale_order() + + @classmethod + def _create_product_category(cls): + product_ctg = cls.product_ctg_model.create({"name": "test_product_ctg"}) + return product_ctg + + @classmethod + def _create_sale_order(cls): + """Create a Sale Order.""" + cls.sale = cls.sale_model.create( + { + "partner_id": cls.partner_a.id, + "warehouse_id": cls.warehouse_id.id, + "picking_policy": "direct", + } + ) + cls.line1 = cls.order_line_model.create( + { + "order_id": cls.sale.id, + "product_id": cls.new_product1.id, + "product_uom_qty": 10.0, + "name": "Sale Order Line Demo1", + } + ) + cls.line2 = cls.order_line_model.create( + { + "order_id": cls.sale.id, + "product_id": cls.new_product2.id, + "product_uom_qty": 5.0, + "name": "Sale Order Line Demo2", + } + ) + return cls.sale + + def test_01_procurement_group_by_line(self): + self.sale.action_confirm() + self.assertEqual( + self.line2.stock_reference_id, + self.line1.stock_reference_id, + """Both Sale Order line should belong + to Stock Reference""", + ) + self.picking_ids = self.env["stock.picking"].search( + [("reference_ids", "in", self.line2.stock_reference_id.ids)] + ) + self.picking_ids.move_ids.write({"quantity": 5}) + wiz_act = self.picking_ids.button_validate() + wiz = Form( + self.env[wiz_act["res_model"]].with_context(**wiz_act["context"]) + ).save() + wiz.process() + self.assertTrue(self.picking_ids, "Stock reference should have picking") + + def test_02_action_launch_procurement_rule_1(self): + stock_ref = self.proc_group_model.create( + { + "sale_ids": [(6, 0, self.sale.ids)], + "name": self.sale.name, + }, + ) + self.line1.stock_reference_id = stock_ref + self.line2.stock_reference_id = stock_ref + self.sale.action_confirm() + self.assertEqual(self.sale.state, "sale") + self.assertEqual(len(self.line1.move_ids), 1) + self.assertEqual(len(self.line2.move_ids), 1) + + def test_03_action_launch_procurement_rule_2(self): + stock_ref = self.proc_group_model.create( + { + "sale_ids": [(6, 0, self.sale.ids)], + "name": self.sale.name, + }, + ) + self.line1.stock_reference_id = stock_ref + self.line2.stock_reference_id = False + self.sale.action_confirm() + self.assertEqual(self.line2.stock_reference_id, stock_ref) + + def test_04_action_launch_procurement_rule_3(self): + stock_ref = self.proc_group_model.create( + { + "sale_ids": [(6, 0, self.sale.ids)], + "name": self.sale.name, + }, + ) + self.line1.stock_reference_id = False + self.line2.stock_reference_id = False + self.sale.action_confirm() + self.assertNotEqual(self.line1.stock_reference_id, stock_ref) + self.assertEqual(self.line1.stock_reference_id, self.line2.stock_reference_id) + + def test_05_merged_stock_moves_from_same_procurement(self): + """ + Reduce the qty in the sale order and check no extra picking is created + """ + self.sale.action_confirm() + self.sale.order_line[1].product_uom_qty = 0.0 + self.assertEqual( + len(self.sale.picking_ids), 1, "Negative stock move should me merged" + ) + + def test_06_update_sale_order_line_respect_stock_reference(self): + """ + When launching the stock rule again, + use maintain same stock reference in lines + """ + self.sale.action_confirm() + stock_ref = self.sale.order_line[1].stock_reference_id + self.assertEqual(len(self.line1.move_ids), 1) + self.sale.order_line[1].product_uom_qty += 1 + self.assertEqual(self.sale.order_line[1].stock_reference_id, stock_ref) + self.assertEqual(len(self.line1.move_ids), 1)