From e9fba18c644b4f1b6279d45af2dcc361af99545b Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Mon, 26 Feb 2024 13:57:57 +0100 Subject: [PATCH 01/13] [ADD] ddmrp_exclude_moves_adu_calc_sales --- ddmrp_exclude_moves_adu_calc_sales/README.rst | 86 ++++ .../__init__.py | 1 + .../__manifest__.py | 17 + .../models/__init__.py | 1 + .../models/sale_order_line.py | 22 + .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 2 + .../static/description/icon.png | Bin 0 -> 2440 bytes .../static/description/index.html | 425 ++++++++++++++++++ .../views/sale_order_view.xml | 20 + 10 files changed, 576 insertions(+) create mode 100644 ddmrp_exclude_moves_adu_calc_sales/README.rst create mode 100644 ddmrp_exclude_moves_adu_calc_sales/__init__.py create mode 100644 ddmrp_exclude_moves_adu_calc_sales/__manifest__.py create mode 100644 ddmrp_exclude_moves_adu_calc_sales/models/__init__.py create mode 100644 ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py create mode 100644 ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst create mode 100644 ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst create mode 100644 ddmrp_exclude_moves_adu_calc_sales/static/description/icon.png create mode 100644 ddmrp_exclude_moves_adu_calc_sales/static/description/index.html create mode 100644 ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml diff --git a/ddmrp_exclude_moves_adu_calc_sales/README.rst b/ddmrp_exclude_moves_adu_calc_sales/README.rst new file mode 100644 index 000000000..062dbcb76 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/README.rst @@ -0,0 +1,86 @@ +================================== +DDMRP Exclude Moves ADU Calc Sales +================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:204b406d71182833133ad4a4b55ba6b475ae2c4ebd9bf2b5ffcb44ae8431ddcd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github + :target: https://github.com/OCA/ddmrp/tree/16.0/ddmrp_exclude_moves_adu_calc_sales + :alt: OCA/ddmrp +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_exclude_moves_adu_calc_sales + :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/ddmrp&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends ddmrp_exclude_moves_adu_calc to be able to +mark sale order lines to be excluded from adu calculation + +**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 +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Lois Rilo +* David Jiménez + +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. + +.. |maintainer-DavidJForgeFlow| image:: https://github.com/DavidJForgeFlow.png?size=40px + :target: https://github.com/DavidJForgeFlow + :alt: DavidJForgeFlow + +Current `maintainer `__: + +|maintainer-DavidJForgeFlow| + +This module is part of the `OCA/ddmrp `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ddmrp_exclude_moves_adu_calc_sales/__init__.py b/ddmrp_exclude_moves_adu_calc_sales/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py new file mode 100644 index 000000000..bd8a90c01 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +{ + "name": "DDMRP Exclude Moves ADU Calc Sales", + "summary": "DDMRP Exclude Moves ADU Calc integration with Sales app.", + "version": "16.0.1.0.0", + "development_status": "Beta", + "author": "ForgeFlow, Odoo Community Association (OCA)", + "maintainers": ["DavidJForgeFlow"], + "website": "https://github.com/OCA/ddmrp", + "category": "Warehouse Management", + "depends": ["sale", "ddmrp_exclude_moves_adu_calc"], + "data": ["views/sale_order_view.xml"], + "license": "LGPL-3", + "installable": True, +} diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py b/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py new file mode 100644 index 000000000..8eb9d1d40 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py @@ -0,0 +1 @@ +from . import sale_order_line diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py b/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py new file mode 100644 index 000000000..3a6ca7a83 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py @@ -0,0 +1,22 @@ +# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import fields, models + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + exclude_from_adu = fields.Boolean( + string="Exclude from ADU calculation", + copy=False, + help="If this flag is set related stock moves will be excluded from " + "ADU calculation", + ) + + def write(self, vals): + if "exclude_from_adu" in vals: + self.mapped("move_ids").write( + {"exclude_from_adu": vals.get("exclude_from_adu")} + ) + return super().write(vals) diff --git a/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst b/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..47817b319 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Lois Rilo +* David Jiménez diff --git a/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst b/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst new file mode 100644 index 000000000..20518e5a9 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends ddmrp_exclude_moves_adu_calc to be able to +mark sale order lines to be excluded from adu calculation diff --git a/ddmrp_exclude_moves_adu_calc_sales/static/description/icon.png b/ddmrp_exclude_moves_adu_calc_sales/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f95fc7269c40d169477766bae2f39ae6eccee046 GIT binary patch literal 2440 zcmb7G`9Bl>AK!*7=E@y0N{-xeN!q zEh&nRWNdC9Ifu!yk7J+hPx!tckJsz8up#Eyyq000RWgo779 z;spji#P=W027l!TVT`?t512nvz}N5c=Z9ku{uls29VIZ}>)3zd`AKE0qaW5gIt&{h z9E%3T$HyDqjEca72FIWcqhrHM*tSRcLJ=2-b3O^BD`j83Rh-rEu*1j8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`0hg-KR&^6&*vT$K3z7?#xpd*}4e8Z@)BWyN$!7s=U_5;twt(L?%+j zLqo$$ivK>)vPmYAF2tQEs<@ZdV4|e7R%@y^znY~oJu`tlkgCx0re6Un1lnQr^?H0V zDn#8pY+CWe#J^^ErWCOtriHWeg2dwmu!lPbvEUID$g*5tmi)a}F{Q`1(>A%+? zpQ1R~vr$2(^-DvfQ06blL0PeIG_i|)f3Z?A#? z%j^rX8s^ea6eoP=%1LQZ`_*elg!1#Hr5uJ>8VawsP_7$P7{GA7;PJ8Y1RiVX@90e} z(J%(-Q_2;Enxf8WPI;hNRc&pfB0tDWoF<+%AG7t}BPq=<-p&T6U}9q5CK;Mn-AdSR zQ%jSfy%j4(OsEnZETLuR2O4!o#tjb`Vrepfpz~LKOpkziU!eH62WipvzM|-~c^$}| zgsrtnD1iWeh7DYq{q7{}imxuL!X#MrzM&EJZe`qCQpd3i;D>`kF){k)dBFTAm>MMoIcJ1)9m;tFZNMUvMda|2}=B4ZX@qJuOEd_$&pUm%f8TgS2ULTZhnz zmwJpFL0&x6O9q7sNRmmD1q6kA9Mu(n4)7|&pm8;+=9;;n_9X38j4}4ZhjlBK!m$1L z#u^h>Ho4S}PqGc%$)l!jPTJ-oXk%?di9*3ak&vV+y81go*MMnqlk>B=w+m~vFPYsr zSPR~Vfvo~@f_5R*OGoD)aK@X6KOKP zzduufBko|4yyk5>Bt9(tmbeN-0lJ)_!3`2#%OIanCjjbYYi84BXqUSlr5J;nos{yW zoB&tA5u8qNze%wBStX#g=5mkdaX8aKAi8n?g+OE=Tg?|e)v6STPG6Mci|{pf{}70B zb+q|}q9dCEf}yp5typ=1k4(aA`6)QOiSH*N#{~PpCj^ + + + + + +DDMRP Exclude Moves ADU Calc Sales + + + +
+

DDMRP Exclude Moves ADU Calc Sales

+ + +

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

+

This module extends ddmrp_exclude_moves_adu_calc to be able to +mark sale order lines to be excluded from adu calculation

+

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

+
    +
  • ForgeFlow
  • +
+
+ +
+

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.

+

Current maintainer:

+

DavidJForgeFlow

+

This module is part of the OCA/ddmrp project on GitHub.

+

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

+
+
+
+ + diff --git a/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml b/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml new file mode 100644 index 000000000..b658cdf4b --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml @@ -0,0 +1,20 @@ + + + + + sale.order.form - ddmrp_exclude_moves_adu_calc_sales + sale.order + + + + + + + + From ffd6e7f77afdae9550561cce71711efab9eb0654 Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Wed, 28 Feb 2024 10:43:17 +0100 Subject: [PATCH 02/13] [IMP] ddmrp_exclude_moves_adu_calc_sales Add tests and also maintain a logic between sale.order.line and stock.move exclude_from_adu. If all the stock moves have the same value, it will propagate to the sale order line. --- ddmrp_exclude_moves_adu_calc_sales/README.rst | 2 +- .../__manifest__.py | 2 +- .../models/__init__.py | 1 + .../models/stock_move.py | 16 ++++ .../static/description/index.html | 2 +- .../tests/__init__.py | 1 + ...test_ddmrp_exclude_moves_adu_calc_sales.py | 85 +++++++++++++++++++ 7 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py create mode 100644 ddmrp_exclude_moves_adu_calc_sales/tests/__init__.py create mode 100644 ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py diff --git a/ddmrp_exclude_moves_adu_calc_sales/README.rst b/ddmrp_exclude_moves_adu_calc_sales/README.rst index 062dbcb76..94fcf6f23 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/README.rst +++ b/ddmrp_exclude_moves_adu_calc_sales/README.rst @@ -7,7 +7,7 @@ DDMRP Exclude Moves ADU Calc Sales !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:204b406d71182833133ad4a4b55ba6b475ae2c4ebd9bf2b5ffcb44ae8431ddcd + !! source digest: sha256:163c3ca3a8bcd57981cc71fdfa2b359dd59d7a3cffdb590d9888cbffb5735a80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py index bd8a90c01..84872b732 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py +++ b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py @@ -1,4 +1,4 @@ -# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com) +# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com) # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). { diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py b/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py index 8eb9d1d40..c7ec7126e 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py +++ b/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py @@ -1 +1,2 @@ from . import sale_order_line +from . import stock_move diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py b/ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py new file mode 100644 index 000000000..c01945d2f --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py @@ -0,0 +1,16 @@ +# Copyright 2024 ForgeFlow (http://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + +from odoo import models + + +class StockMove(models.Model): + _inherit = "stock.move" + + def _toggle_exclude_from_adu(self): + res = super()._toggle_exclude_from_adu() + for sl in self.mapped("sale_line_id"): + value = sl.move_ids.mapped("exclude_from_adu") + if len(value) == 1: + sl.exclude_from_adu = value[0] + return res diff --git a/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html b/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html index 1ce750134..44934468f 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html +++ b/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html @@ -367,7 +367,7 @@

DDMRP Exclude Moves ADU Calc Sales

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:204b406d71182833133ad4a4b55ba6b475ae2c4ebd9bf2b5ffcb44ae8431ddcd +!! source digest: sha256:163c3ca3a8bcd57981cc71fdfa2b359dd59d7a3cffdb590d9888cbffb5735a80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

This module extends ddmrp_exclude_moves_adu_calc to be able to diff --git a/ddmrp_exclude_moves_adu_calc_sales/tests/__init__.py b/ddmrp_exclude_moves_adu_calc_sales/tests/__init__.py new file mode 100644 index 000000000..06cd57239 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/tests/__init__.py @@ -0,0 +1 @@ +from . import test_ddmrp_exclude_moves_adu_calc_sales diff --git a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py new file mode 100644 index 000000000..04f84131d --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py @@ -0,0 +1,85 @@ +# Copyright 2024 ForgeFlow (http://www.forgeflow.com) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). + + +import odoo.tests.common as common + + +class TestDdmrp(common.TransactionCase): + def setUp(self): + super().setUp() + + # Models + self.productModel = self.env["product.product"] + self.bufferModel = self.env["stock.buffer"] + + # Refs + self.main_company = self.env.ref("base.main_company") + self.warehouse = self.env.ref("stock.warehouse0") + self.stock_location = self.env.ref("stock.stock_location_stock") + self.uom_unit = self.env.ref("uom.product_uom_unit") + self.buffer_profile_pur = self.env.ref( + "ddmrp.stock_buffer_profile_replenish_purchased_short_low" + ) + + self.product_a = self.productModel.create( + { + "name": "product A", + "standard_price": 1, + "type": "product", + "uom_id": self.uom_unit.id, + "default_code": "A", + } + ) + + self.customer = self.env["res.partner"].create( + { + "name": "Caroline Customer", + "email": "customer@example.com", + } + ) + + def create_sale_order(self): + return self.env["sale.order"].create( + { + "partner_id": self.customer.id, + "order_line": [ + (0, 0, ope) + for ope in [ + { + "name": p.name, + "product_id": p.id, + "product_uom_qty": 2, + "product_uom": p.uom_id.id, + "price_unit": 10, + } + for p in self.product_a + ] + ], + } + ) + + def test_01_exclude_so_from_adu(self): + method = self.env.ref("ddmrp.adu_calculation_method_past_120") + self.bufferModel.create( + { + "buffer_profile_id": self.buffer_profile_pur.id, + "product_id": self.product_a.id, + "location_id": self.stock_location.id, + "warehouse_id": self.warehouse.id, + "qty_multiple": 0.0, + "dlt": 10, + "adu_calculation_method": method.id, + "adu_fixed": 4, + } + ) + so = self.create_sale_order() + so.action_confirm() + self.assertFalse(so.order_line.exclude_from_adu) + self.assertFalse(so.picking_ids.move_ids.exclude_from_adu) + so.order_line.write({"exclude_from_adu": True}) + self.assertTrue(so.order_line.exclude_from_adu) + self.assertTrue(so.picking_ids.move_ids.exclude_from_adu) + so.picking_ids.move_ids._toggle_exclude_from_adu() + self.assertFalse(so.order_line.exclude_from_adu) + self.assertFalse(so.picking_ids.move_ids.exclude_from_adu) From 0fc8862763600014b941d15b529ccc5c290c738b Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 4 Mar 2024 07:24:54 +0000 Subject: [PATCH 03/13] Added translation using Weblate (Italian) --- ddmrp_exclude_moves_adu_calc_sales/i18n/it.po | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ddmrp_exclude_moves_adu_calc_sales/i18n/it.po diff --git a/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po b/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po new file mode 100644 index 000000000..fbc1801f5 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * ddmrp_exclude_moves_adu_calc_sales +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model.fields,field_description:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu +msgid "Exclude from ADU calculation" +msgstr "" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model.fields,help:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu +msgid "" +"If this flag is set related stock moves will be excluded from ADU " +"calculation" +msgstr "" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_stock_move +msgid "Stock Move" +msgstr "" From 0a5c0e70e1a586514d93a98e8dfaff31e74dc6c3 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 4 Mar 2024 07:25:24 +0000 Subject: [PATCH 04/13] Translated using Weblate (Italian) Currently translated at 100.0% (4 of 4 strings) Translation: ddmrp-16.0/ddmrp-16.0-ddmrp_exclude_moves_adu_calc_sales Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_exclude_moves_adu_calc_sales/it/ --- ddmrp_exclude_moves_adu_calc_sales/i18n/it.po | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po b/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po index fbc1801f5..baf979b71 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po +++ b/ddmrp_exclude_moves_adu_calc_sales/i18n/it.po @@ -6,18 +6,20 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2024-03-04 09:35+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\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: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model.fields,field_description:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu msgid "Exclude from ADU calculation" -msgstr "" +msgstr "Escudere dal calcolo ADU" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model.fields,help:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu @@ -25,13 +27,15 @@ msgid "" "If this flag is set related stock moves will be excluded from ADU " "calculation" msgstr "" +"Se questa opzione è attiva, i movimenti di magazzino relativi verranno " +"esclusi dal calcolo ADU" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_sale_order_line msgid "Sales Order Line" -msgstr "" +msgstr "Riga ordine di vendita" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_stock_move msgid "Stock Move" -msgstr "" +msgstr "Movimento di magazzino" From 94e78c89707a5480b90b65a27503335164a3d070 Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Wed, 20 Mar 2024 17:42:13 +0000 Subject: [PATCH 05/13] Added translation using Weblate (Spanish) --- ddmrp_exclude_moves_adu_calc_sales/i18n/es.po | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ddmrp_exclude_moves_adu_calc_sales/i18n/es.po diff --git a/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po b/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po new file mode 100644 index 000000000..50a3074ae --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * ddmrp_exclude_moves_adu_calc_sales +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\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" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model.fields,field_description:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu +msgid "Exclude from ADU calculation" +msgstr "" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model.fields,help:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu +msgid "" +"If this flag is set related stock moves will be excluded from ADU " +"calculation" +msgstr "" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: ddmrp_exclude_moves_adu_calc_sales +#: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_stock_move +msgid "Stock Move" +msgstr "" From e67336bff56649d0ab9d5f810502ab74c75eb067 Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Wed, 20 Mar 2024 17:42:59 +0000 Subject: [PATCH 06/13] Translated using Weblate (Spanish) Currently translated at 100.0% (4 of 4 strings) Translation: ddmrp-16.0/ddmrp-16.0-ddmrp_exclude_moves_adu_calc_sales Translate-URL: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_exclude_moves_adu_calc_sales/es/ --- ddmrp_exclude_moves_adu_calc_sales/i18n/es.po | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po b/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po index 50a3074ae..c64c7126f 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po +++ b/ddmrp_exclude_moves_adu_calc_sales/i18n/es.po @@ -6,18 +6,20 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2024-03-20 20:35+0000\n" +"Last-Translator: Ivorra78 \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.17\n" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model.fields,field_description:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu msgid "Exclude from ADU calculation" -msgstr "" +msgstr "Excluir del cálculo ADU" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model.fields,help:ddmrp_exclude_moves_adu_calc_sales.field_sale_order_line__exclude_from_adu @@ -25,13 +27,15 @@ msgid "" "If this flag is set related stock moves will be excluded from ADU " "calculation" msgstr "" +"Si se activa este indicador, los movimientos de existencias relacionados se " +"excluirán del cálculo de ADU" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_sale_order_line msgid "Sales Order Line" -msgstr "" +msgstr "Línea de Orden de Venta" #. module: ddmrp_exclude_moves_adu_calc_sales #: model:ir.model,name:ddmrp_exclude_moves_adu_calc_sales.model_stock_move msgid "Stock Move" -msgstr "" +msgstr "Movimiento de Almacén" From 0c7c91f90ea3a28e3ac79bb34bfc337ca5848be0 Mon Sep 17 00:00:00 2001 From: ArnauCForgeFlow Date: Thu, 25 Jul 2024 12:30:25 +0200 Subject: [PATCH 07/13] [IMP] ddmrp_exclude_moves_adu_calc_sales: pre-commit stuff --- ddmrp_exclude_moves_adu_calc_sales/README.rst | 24 +++++++++---------- .../pyproject.toml | 3 +++ .../readme/CONTRIBUTORS.md | 2 ++ .../readme/CONTRIBUTORS.rst | 2 -- .../readme/DESCRIPTION.md | 2 ++ .../readme/DESCRIPTION.rst | 2 -- .../static/description/index.html | 21 +++++++++------- 7 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 ddmrp_exclude_moves_adu_calc_sales/pyproject.toml create mode 100644 ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.md delete mode 100644 ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst create mode 100644 ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.md delete mode 100644 ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst diff --git a/ddmrp_exclude_moves_adu_calc_sales/README.rst b/ddmrp_exclude_moves_adu_calc_sales/README.rst index 94fcf6f23..f58d82f6f 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/README.rst +++ b/ddmrp_exclude_moves_adu_calc_sales/README.rst @@ -17,19 +17,19 @@ DDMRP Exclude Moves ADU Calc Sales :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github - :target: https://github.com/OCA/ddmrp/tree/16.0/ddmrp_exclude_moves_adu_calc_sales + :target: https://github.com/OCA/ddmrp/tree/17.0/ddmrp_exclude_moves_adu_calc_sales :alt: OCA/ddmrp .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/ddmrp-16-0/ddmrp-16-0-ddmrp_exclude_moves_adu_calc_sales + :target: https://translation.odoo-community.org/projects/ddmrp-17-0/ddmrp-17-0-ddmrp_exclude_moves_adu_calc_sales :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/ddmrp&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/ddmrp&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends ddmrp_exclude_moves_adu_calc to be able to -mark sale order lines to be excluded from adu calculation +This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale +order lines to be excluded from adu calculation **Table of contents** @@ -42,7 +42,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -50,18 +50,18 @@ Credits ======= Authors -~~~~~~~ +------- * ForgeFlow Contributors -~~~~~~~~~~~~ +------------ -* Lois Rilo -* David Jiménez +- Lois Rilo +- David Jiménez Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -81,6 +81,6 @@ Current `maintainer `__: |maintainer-DavidJForgeFlow| -This module is part of the `OCA/ddmrp `_ project on GitHub. +This module is part of the `OCA/ddmrp `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ddmrp_exclude_moves_adu_calc_sales/pyproject.toml b/ddmrp_exclude_moves_adu_calc_sales/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.md b/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..c77e7c6de --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Lois Rilo \<\> +- David Jiménez \<\> diff --git a/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst b/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst deleted file mode 100644 index 47817b319..000000000 --- a/ddmrp_exclude_moves_adu_calc_sales/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Lois Rilo -* David Jiménez diff --git a/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.md b/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.md new file mode 100644 index 000000000..a8cef1512 --- /dev/null +++ b/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale +order lines to be excluded from adu calculation diff --git a/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst b/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst deleted file mode 100644 index 20518e5a9..000000000 --- a/ddmrp_exclude_moves_adu_calc_sales/readme/DESCRIPTION.rst +++ /dev/null @@ -1,2 +0,0 @@ -This module extends ddmrp_exclude_moves_adu_calc to be able to -mark sale order lines to be excluded from adu calculation diff --git a/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html b/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html index 44934468f..c4824a340 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html +++ b/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html @@ -9,10 +9,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +276,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +302,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,9 +370,9 @@

DDMRP Exclude Moves ADU Calc Sales

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:163c3ca3a8bcd57981cc71fdfa2b359dd59d7a3cffdb590d9888cbffb5735a80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

-

This module extends ddmrp_exclude_moves_adu_calc to be able to -mark sale order lines to be excluded from adu calculation

+

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

+

This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale +order lines to be excluded from adu calculation

Table of contents

    @@ -389,7 +390,7 @@

    Bug Tracker

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

    +feedback.

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

@@ -410,13 +411,15 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +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.

Current maintainer:

DavidJForgeFlow

-

This module is part of the OCA/ddmrp project on GitHub.

+

This module is part of the OCA/ddmrp project on GitHub.

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

From 671ca7315e22785ea1fd4a711d923be37376f876 Mon Sep 17 00:00:00 2001 From: ArnauCForgeFlow Date: Thu, 25 Jul 2024 12:42:20 +0200 Subject: [PATCH 08/13] [MIG] ddmrp_exclude_moves_adu_calc_sales: Migration to 17.0 --- ddmrp_exclude_moves_adu_calc_sales/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py index 84872b732..f65380329 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py +++ b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py @@ -4,7 +4,7 @@ { "name": "DDMRP Exclude Moves ADU Calc Sales", "summary": "DDMRP Exclude Moves ADU Calc integration with Sales app.", - "version": "16.0.1.0.0", + "version": "17.0.1.0.1", "development_status": "Beta", "author": "ForgeFlow, Odoo Community Association (OCA)", "maintainers": ["DavidJForgeFlow"], From 5bac38c2eb0ccf9aca626e267bd951a5a2a61512 Mon Sep 17 00:00:00 2001 From: ThiagoMForgeFlow Date: Wed, 5 Mar 2025 14:26:28 +0100 Subject: [PATCH 09/13] [MIG] ddmrp_exclude_moves_adu_calc_sales: Migration to 18.0 --- ddmrp_exclude_moves_adu_calc_sales/README.rst | 10 +++++----- .../__manifest__.py | 2 +- .../static/description/icon.png | Bin 2440 -> 2505 bytes .../static/description/index.html | 6 +++--- ...test_ddmrp_exclude_moves_adu_calc_sales.py | 2 +- .../views/sale_order_view.xml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ddmrp_exclude_moves_adu_calc_sales/README.rst b/ddmrp_exclude_moves_adu_calc_sales/README.rst index f58d82f6f..402fb06eb 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/README.rst +++ b/ddmrp_exclude_moves_adu_calc_sales/README.rst @@ -17,13 +17,13 @@ DDMRP Exclude Moves ADU Calc Sales :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github - :target: https://github.com/OCA/ddmrp/tree/17.0/ddmrp_exclude_moves_adu_calc_sales + :target: https://github.com/OCA/ddmrp/tree/18.0/ddmrp_exclude_moves_adu_calc_sales :alt: OCA/ddmrp .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/ddmrp-17-0/ddmrp-17-0-ddmrp_exclude_moves_adu_calc_sales + :target: https://translation.odoo-community.org/projects/ddmrp-18-0/ddmrp-18-0-ddmrp_exclude_moves_adu_calc_sales :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/ddmrp&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/ddmrp&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -42,7 +42,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -81,6 +81,6 @@ Current `maintainer `__: |maintainer-DavidJForgeFlow| -This module is part of the `OCA/ddmrp `_ project on GitHub. +This module is part of the `OCA/ddmrp `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py index f65380329..6be650368 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py +++ b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py @@ -4,7 +4,7 @@ { "name": "DDMRP Exclude Moves ADU Calc Sales", "summary": "DDMRP Exclude Moves ADU Calc integration with Sales app.", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "development_status": "Beta", "author": "ForgeFlow, Odoo Community Association (OCA)", "maintainers": ["DavidJForgeFlow"], diff --git a/ddmrp_exclude_moves_adu_calc_sales/static/description/icon.png b/ddmrp_exclude_moves_adu_calc_sales/static/description/icon.png index f95fc7269c40d169477766bae2f39ae6eccee046..90c92e98de4d65be4f1b62cf9756293b4d887ee7 100644 GIT binary patch delta 2492 zcmV;t2}AaX6Uh@ciBL{Q4GJ0x0000DNk~Le0001F0001F2nGNE0C3`!Q~&?~32;bR za{vGX=Kuf$=K;gD{Be;+D1TN-L_t(|ob8=UY+P3v$A90s_GIiC$5xuAP~wKP0*SVX zkSHy*r9!0=bWs*aut7pdAi>b^L;Gto$=Tnk3FyJ>zVu8%sJeSJL`GLf%WppZ z=6Wadl*;1b9cS*i*9PrJ7^9smAfquN@}Udd&#r#%>LrMWEI}NDJei4+JZ5%8z5Y-T zfmo2^FCPD>nH|~Rs(ItUxTt^kdWWB64kitJJ@U z$hGOmrstvdwpW?lw;J_3HMXw`;>~A*>=U)N-w`dadHG3UdAQ z^<^B>`%|qxMtJLkhdx-Wc-`h}k_}r4v(@IC1o4v1BT3`&JAVr@c5Un;P)f8${ftl= zJ2G~uHfWO|Q(vDd337>yL=cmUQ+H2o>Hyo8-xbYVAx1)cwQuTSfVgBQ594%HN!k;CCr<}zhuue4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(J%(-Q_2;Enxf8WPI;hNRc&pfB0tDWoF<+%AG7t}BPq=<-p&T6U}9q5CK;Mn-AdSR zQ%jSfy%j4(OsEnZETLuR2O4!o#tjb`Vrepfpz~LKOpkziU!eH62WipvzM|-~c^$}| zgsrtnD1iWeh7DYq{q7{}imxuL!X#MrzM&EJZe`qCQpd3i;D>`kF){k)dBFTAm>MMoIcJ1)9m;tFZNMUvMda|2}=B4ZX@qJuOEd_$&pUm%f8TgS2ULTZhnz zmwJpFL0&x6O9q7sNRmmD1q6kA9Mu(n4)7|&pm8;+=9;;n_9X38j4}4ZhjlBK!m$1L z#u^h>Ho4S}PqGc%$)l!jPTJ-oXk%?di9*3ak&vV+y81go*MMnqlk>B=w+m~vFPYsr zSPR~Vfvo~@f_5R*OGoD)aK@X6KOKP zzduufBko|4yyk5>Bt9(tmbeN-0lJ)_!3`2#%OIanCjjbYYi84BXqUSlr5J;nos{yW zoB&tA5u8qNze%wBStX#g=5mkdaX8aKAi8n?g+OE=Tg?|e)v6STPG6Mci|{pf{}70B zb+q|}q9dCEf}yp5typ=1k4(aA`6)QOiSH*N#{~PpCj^DDMRP Exclude Moves ADU Calc Sales !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:163c3ca3a8bcd57981cc71fdfa2b359dd59d7a3cffdb590d9888cbffb5735a80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale order lines to be excluded from adu calculation

Table of contents

@@ -390,7 +390,7 @@

Bug Tracker

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

+feedback.

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

@@ -419,7 +419,7 @@

Maintainers

promote its widespread use.

Current maintainer:

DavidJForgeFlow

-

This module is part of the OCA/ddmrp project on GitHub.

+

This module is part of the OCA/ddmrp project on GitHub.

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

diff --git a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py index 04f84131d..b0bc64b31 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py +++ b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py @@ -26,7 +26,7 @@ def setUp(self): { "name": "product A", "standard_price": 1, - "type": "product", + "is_storable": True, "uom_id": self.uom_unit.id, "default_code": "A", } diff --git a/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml b/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml index b658cdf4b..ecb3ad28e 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml +++ b/ddmrp_exclude_moves_adu_calc_sales/views/sale_order_view.xml @@ -7,12 +7,12 @@ sale.order - + From 7bc12bf9ee2e586ec989b7643a1180e843a5a7f2 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Wed, 11 Jun 2025 11:38:15 +0200 Subject: [PATCH 10/13] [REF] ddmrp_exclude_moves_adu_calc_sales: make boolean compute for robustness The previous approach was error prone as there could be corner cases in which the `exclude_from_adu` field in SO and moves is misaligned. With a compute and inverse methods approach we ensure that there are no misalignments and keep the field in the stock.move as the only source of truth. --- .../models/__init__.py | 1 - .../models/sale_order_line.py | 18 ++++++++++++------ .../models/stock_move.py | 16 ---------------- .../test_ddmrp_exclude_moves_adu_calc_sales.py | 1 + 4 files changed, 13 insertions(+), 23 deletions(-) delete mode 100644 ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py b/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py index c7ec7126e..8eb9d1d40 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py +++ b/ddmrp_exclude_moves_adu_calc_sales/models/__init__.py @@ -1,2 +1 @@ from . import sale_order_line -from . import stock_move diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py b/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py index 3a6ca7a83..af10efa89 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py +++ b/ddmrp_exclude_moves_adu_calc_sales/models/sale_order_line.py @@ -9,14 +9,20 @@ class SaleOrderLine(models.Model): exclude_from_adu = fields.Boolean( string="Exclude from ADU calculation", + compute="_compute_exclude_from_adu", + inverse="_inverse_exclude_from_adu", copy=False, help="If this flag is set related stock moves will be excluded from " "ADU calculation", ) - def write(self, vals): - if "exclude_from_adu" in vals: - self.mapped("move_ids").write( - {"exclude_from_adu": vals.get("exclude_from_adu")} - ) - return super().write(vals) + def _compute_exclude_from_adu(self): + for rec in self: + rec.exclude_from_adu = all(move.exclude_from_adu for move in rec.move_ids) + + def _inverse_exclude_from_adu(self): + for rec in self: + if rec.exclude_from_adu: + rec.move_ids.write({"exclude_from_adu": True}) + else: + rec.move_ids.write({"exclude_from_adu": False}) diff --git a/ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py b/ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py deleted file mode 100644 index c01945d2f..000000000 --- a/ddmrp_exclude_moves_adu_calc_sales/models/stock_move.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2024 ForgeFlow (http://www.forgeflow.com) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). - -from odoo import models - - -class StockMove(models.Model): - _inherit = "stock.move" - - def _toggle_exclude_from_adu(self): - res = super()._toggle_exclude_from_adu() - for sl in self.mapped("sale_line_id"): - value = sl.move_ids.mapped("exclude_from_adu") - if len(value) == 1: - sl.exclude_from_adu = value[0] - return res diff --git a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py index b0bc64b31..51bc0ea49 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py +++ b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py @@ -81,5 +81,6 @@ def test_01_exclude_so_from_adu(self): self.assertTrue(so.order_line.exclude_from_adu) self.assertTrue(so.picking_ids.move_ids.exclude_from_adu) so.picking_ids.move_ids._toggle_exclude_from_adu() + so.order_line.invalidate_recordset() self.assertFalse(so.order_line.exclude_from_adu) self.assertFalse(so.picking_ids.move_ids.exclude_from_adu) From 5c3c8ed4da63696e488f3cc1239372f99166a733 Mon Sep 17 00:00:00 2001 From: Don Kendall Date: Fri, 12 Jun 2026 09:48:58 -0400 Subject: [PATCH 11/13] [IMP] ddmrp_exclude_moves_adu_calc_sales: pre-commit auto fixes Signed-off-by: Don Kendall --- ddmrp_exclude_moves_adu_calc_sales/README.rst | 22 +++++++------ .../static/description/index.html | 31 +++++++++++-------- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/ddmrp_exclude_moves_adu_calc_sales/README.rst b/ddmrp_exclude_moves_adu_calc_sales/README.rst index 402fb06eb..3e6d020d8 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/README.rst +++ b/ddmrp_exclude_moves_adu_calc_sales/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ================================== DDMRP Exclude Moves ADU Calc Sales ================================== @@ -7,23 +11,23 @@ DDMRP Exclude Moves ADU Calc Sales !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:163c3ca3a8bcd57981cc71fdfa2b359dd59d7a3cffdb590d9888cbffb5735a80 + !! source digest: sha256:04ebcda948ba6e3e263541215705a43a8d4a8af9eae5a9c2ebd15848ba2c5899 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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/licence-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fddmrp-lightgray.png?logo=github - :target: https://github.com/OCA/ddmrp/tree/18.0/ddmrp_exclude_moves_adu_calc_sales + :target: https://github.com/OCA/ddmrp/tree/19.0/ddmrp_exclude_moves_adu_calc_sales :alt: OCA/ddmrp .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/ddmrp-18-0/ddmrp-18-0-ddmrp_exclude_moves_adu_calc_sales + :target: https://translation.odoo-community.org/projects/ddmrp-19-0/ddmrp-19-0-ddmrp_exclude_moves_adu_calc_sales :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/ddmrp&target_branch=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/ddmrp&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -42,7 +46,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -57,8 +61,8 @@ Authors Contributors ------------ -- Lois Rilo -- David Jiménez +- Lois Rilo +- David Jiménez Maintainers ----------- @@ -81,6 +85,6 @@ Current `maintainer `__: |maintainer-DavidJForgeFlow| -This module is part of the `OCA/ddmrp `_ project on GitHub. +This module is part of the `OCA/ddmrp `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html b/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html index 1b57f42a0..9e489cc9f 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html +++ b/ddmrp_exclude_moves_adu_calc_sales/static/description/index.html @@ -1,10 +1,9 @@ - -DDMRP Exclude Moves ADU Calc Sales +README.rst -
-

DDMRP Exclude Moves ADU Calc Sales

+
+ + +Odoo Community Association + +
+

DDMRP Exclude Moves ADU Calc Sales

-

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/ddmrp Translate me on Weblate Try me on Runboat

This module extends ddmrp_exclude_moves_adu_calc to be able to mark sale order lines to be excluded from adu calculation

Table of contents

@@ -386,30 +390,30 @@

DDMRP Exclude Moves ADU Calc Sales

-

Bug Tracker

+

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.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

  • ForgeFlow
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -419,10 +423,11 @@

Maintainers

promote its widespread use.

Current maintainer:

DavidJForgeFlow

-

This module is part of the OCA/ddmrp project on GitHub.

+

This module is part of the OCA/ddmrp project on GitHub.

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

+
From 927700964bc4c67e1043502b505b72f473c16879 Mon Sep 17 00:00:00 2001 From: Don Kendall Date: Mon, 15 Jun 2026 12:13:10 -0400 Subject: [PATCH 12/13] [MIG] ddmrp_exclude_moves_adu_calc_sales: Migration to 19.0 Signed-off-by: Don Kendall --- ddmrp_exclude_moves_adu_calc_sales/__manifest__.py | 4 ++-- .../tests/test_ddmrp_exclude_moves_adu_calc_sales.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py index 6be650368..6752a8b2e 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py +++ b/ddmrp_exclude_moves_adu_calc_sales/__manifest__.py @@ -4,13 +4,13 @@ { "name": "DDMRP Exclude Moves ADU Calc Sales", "summary": "DDMRP Exclude Moves ADU Calc integration with Sales app.", - "version": "18.0.1.0.0", + "version": "19.0.1.0.0", "development_status": "Beta", "author": "ForgeFlow, Odoo Community Association (OCA)", "maintainers": ["DavidJForgeFlow"], "website": "https://github.com/OCA/ddmrp", "category": "Warehouse Management", - "depends": ["sale", "ddmrp_exclude_moves_adu_calc"], + "depends": ["sale_stock", "ddmrp_exclude_moves_adu_calc"], "data": ["views/sale_order_view.xml"], "license": "LGPL-3", "installable": True, diff --git a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py index 51bc0ea49..879642ea5 100644 --- a/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py +++ b/ddmrp_exclude_moves_adu_calc_sales/tests/test_ddmrp_exclude_moves_adu_calc_sales.py @@ -8,6 +8,7 @@ class TestDdmrp(common.TransactionCase): def setUp(self): super().setUp() + self.env = self.env(context=dict(self.env.context, tracking_disable=True)) # Models self.productModel = self.env["product.product"] @@ -50,7 +51,7 @@ def create_sale_order(self): "name": p.name, "product_id": p.id, "product_uom_qty": 2, - "product_uom": p.uom_id.id, + "product_uom_id": p.uom_id.id, "price_unit": 10, } for p in self.product_a From 0dd93642c1606d19bf8f219e80b1e2700221a95a Mon Sep 17 00:00:00 2001 From: dkendall Date: Fri, 12 Jun 2026 19:16:35 -0400 Subject: [PATCH 13/13] [DO NOT MERGE] ddmrp_exclude_moves_adu_calc_sales: pin ddmrp_exclude_moves_adu_calc to open PR --- test-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test-requirements.txt diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..6d059a3da --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +# DO NOT MERGE — temporary pin until the ddmrp_exclude_moves_adu_calc 19.0 MIG lands. +odoo-addon-ddmrp_exclude_moves_adu_calc @ git+https://github.com/ledoent/ddmrp.git@19.0-mig-ddmrp_exclude_moves_adu_calc#subdirectory=ddmrp_exclude_moves_adu_calc