From 7cfcd36e1b0ca6760107c3cfe8c79ac80b003676 Mon Sep 17 00:00:00 2001 From: dessanhemrayev Date: Tue, 16 Jul 2024 02:20:41 +0300 Subject: [PATCH 01/18] [ADD] purchase_force_invoiced_quantity: add module This module add a new "Force Invoiced" field to purchase order lines. This field is used as modifier when computing quantity to be invoiced. --- purchase_force_invoiced_quantity/README.rst | 105 ++++ purchase_force_invoiced_quantity/__init__.py | 4 + .../__manifest__.py | 21 + .../demo/demo_product.xml | 14 + .../demo/demo_purchase_order.xml | 24 + .../models/__init__.py | 4 + .../models/purchase_order_line.py | 33 ++ .../readme/CONFIGURE.rst | 2 + .../readme/CONTEXT.rst | 6 + .../readme/CONTRIBUTORS.rst | 4 + .../readme/DESCRIPTION.rst | 5 + .../readme/USAGE.rst | 2 + .../static/description/index.html | 452 ++++++++++++++++++ .../tests/__init__.py | 4 + .../test_purchase_force_invoiced_quantity.py | 63 +++ .../views/purchase_order.xml | 21 + 16 files changed, 764 insertions(+) create mode 100644 purchase_force_invoiced_quantity/README.rst create mode 100644 purchase_force_invoiced_quantity/__init__.py create mode 100644 purchase_force_invoiced_quantity/__manifest__.py create mode 100644 purchase_force_invoiced_quantity/demo/demo_product.xml create mode 100644 purchase_force_invoiced_quantity/demo/demo_purchase_order.xml create mode 100644 purchase_force_invoiced_quantity/models/__init__.py create mode 100644 purchase_force_invoiced_quantity/models/purchase_order_line.py create mode 100644 purchase_force_invoiced_quantity/readme/CONFIGURE.rst create mode 100644 purchase_force_invoiced_quantity/readme/CONTEXT.rst create mode 100644 purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst create mode 100644 purchase_force_invoiced_quantity/readme/DESCRIPTION.rst create mode 100644 purchase_force_invoiced_quantity/readme/USAGE.rst create mode 100644 purchase_force_invoiced_quantity/static/description/index.html create mode 100644 purchase_force_invoiced_quantity/tests/__init__.py create mode 100644 purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py create mode 100644 purchase_force_invoiced_quantity/views/purchase_order.xml diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst new file mode 100644 index 00000000000..d76df6fbdc9 --- /dev/null +++ b/purchase_force_invoiced_quantity/README.rst @@ -0,0 +1,105 @@ +================================ +Purchase Force Invoiced Quantity +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:433528b8a418503fc9905eb9c34985e7e6363e3735091e0ad424d1f25479828c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-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%2Fpurchase--workflow-lightgray.png?logo=github + :target: https://github.com/OCA/purchase-workflow/tree/16.0/purchase_force_invoiced_quantity + :alt: OCA/purchase-workflow +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_force_invoiced_quantity + :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/purchase-workflow&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module add a new "Force Invoiced" field to purchase order lines. This field is used as modifier when computing quantity to be invoiced. + +Current behaviour: quantity to invoice = delivered - invoiced + +Implemented behaviour: quantity to invoice = delivered - invoiced - force invoiced + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +This module implements additional featured for the `Purchase Force Invoiced `_ module. + +It covers the following scenarios: + +* One need to modify the quantity to be invoiced after the products were received. Eg .you negotiated an extra discount from your vendor. +* You would like to fix some issues with quantities invoiced cause by incorrect data entry. + +Configuration +============= + +No configuration is required. + + +Usage +===== + +Open a purchase order and add an amount into the "Force Invoiced" field. Amount to invoice will be adjusted accordingly. +This field is optional so you can hide it if you don't need it. + +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 +~~~~~~~ + +* Cetmix + +Contributors +~~~~~~~~~~~~ + +* `Cetmix `_ + + * Ivan Sokolov + * Dessan Hemrayev + +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/purchase-workflow `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_force_invoiced_quantity/__init__.py b/purchase_force_invoiced_quantity/__init__.py new file mode 100644 index 00000000000..bf8e144111d --- /dev/null +++ b/purchase_force_invoiced_quantity/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/purchase_force_invoiced_quantity/__manifest__.py b/purchase_force_invoiced_quantity/__manifest__.py new file mode 100644 index 00000000000..f09052b2c10 --- /dev/null +++ b/purchase_force_invoiced_quantity/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Purchase Force Invoiced Quantity", + "summary": "Add manual invoice quantity in purchase order lines", + "version": "16.0.1.0.0", + "author": "Cetmix, Odoo Community Association (OCA)", + "category": "Purchase Management", + "license": "AGPL-3", + "website": "https://github.com/OCA/purchase-workflow", + "depends": ["purchase_force_invoiced"], + "data": [ + "views/purchase_order.xml", + ], + "demo": [ + "demo/demo_product.xml", + "demo/demo_purchase_order.xml", + ], + "installable": True, +} diff --git a/purchase_force_invoiced_quantity/demo/demo_product.xml b/purchase_force_invoiced_quantity/demo/demo_product.xml new file mode 100644 index 00000000000..67512fdc590 --- /dev/null +++ b/purchase_force_invoiced_quantity/demo/demo_product.xml @@ -0,0 +1,14 @@ + + + + Purchase Force Invoiced qty product 1 + service + receive + + + + Purchase Force Invoiced qty product 2 + service + receive + + diff --git a/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml b/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml new file mode 100644 index 00000000000..3c07a6ebacd --- /dev/null +++ b/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + 5 + 3 + 295.00 + + + + + + 5 + 0 + 145.00 + + + diff --git a/purchase_force_invoiced_quantity/models/__init__.py b/purchase_force_invoiced_quantity/models/__init__.py new file mode 100644 index 00000000000..a8311a30fe4 --- /dev/null +++ b/purchase_force_invoiced_quantity/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import purchase_order_line diff --git a/purchase_force_invoiced_quantity/models/purchase_order_line.py b/purchase_force_invoiced_quantity/models/purchase_order_line.py new file mode 100644 index 00000000000..fc6ee14ce90 --- /dev/null +++ b/purchase_force_invoiced_quantity/models/purchase_order_line.py @@ -0,0 +1,33 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class PurchaseOrderLine(models.Model): + _inherit = "purchase.order.line" + + force_invoiced = fields.Float( + digits="Product Unit of Measure", + help=( + "This amount will be deducted from quantity to invoice." + "\nquantity to invoice = delivered - invoiced - force invoiced" + ), + ) + + @api.depends("force_invoiced") + def _compute_qty_invoiced(self): + """ + Compute the quantity to invoice. + """ + res = super()._compute_qty_invoiced() + for line in self: + # compute qty_to_invoice + if ( + line.order_id.state in ["purchase", "done"] + and line.product_id.purchase_method != "purchase" + ): + line.qty_to_invoice = ( + line.qty_received - line.qty_invoiced - line.force_invoiced + ) + return res diff --git a/purchase_force_invoiced_quantity/readme/CONFIGURE.rst b/purchase_force_invoiced_quantity/readme/CONFIGURE.rst new file mode 100644 index 00000000000..d491629811a --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/CONFIGURE.rst @@ -0,0 +1,2 @@ +No configuration is required. + diff --git a/purchase_force_invoiced_quantity/readme/CONTEXT.rst b/purchase_force_invoiced_quantity/readme/CONTEXT.rst new file mode 100644 index 00000000000..ffd3a5729af --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/CONTEXT.rst @@ -0,0 +1,6 @@ +This module implements additional featured for the `Purchase Force Invoiced `_ module. + +It covers the following scenarios: + +* One need to modify the quantity to be invoiced after the products were received. Eg .you negotiated an extra discount from your vendor. +* You would like to fix some issues with quantities invoiced cause by incorrect data entry. \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..a3c11326022 --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Cetmix `_ + + * Ivan Sokolov + * Dessan Hemrayev \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/readme/DESCRIPTION.rst b/purchase_force_invoiced_quantity/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..60a35474e66 --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module add a new "Force Invoiced" field to purchase order lines. This field is used as modifier when computing quantity to be invoiced. + +Current behaviour: quantity to invoice = delivered - invoiced + +Implemented behaviour: quantity to invoice = delivered - invoiced - force invoiced \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/readme/USAGE.rst b/purchase_force_invoiced_quantity/readme/USAGE.rst new file mode 100644 index 00000000000..dc2460a4540 --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/USAGE.rst @@ -0,0 +1,2 @@ +Open a purchase order and add an amount into the "Force Invoiced" field. Amount to invoice will be adjusted accordingly. +This field is optional so you can hide it if you don't need it. \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html new file mode 100644 index 00000000000..b3e72212a45 --- /dev/null +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -0,0 +1,452 @@ + + + + + +Purchase Force Invoiced Quantity + + + +
+

Purchase Force Invoiced Quantity

+ + +

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

+

This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

+

Current behaviour: quantity to invoice = delivered - invoiced

+

Implemented behaviour: quantity to invoice = delivered - invoiced - force invoiced

+

Table of contents

+ +
+

Use Cases / Context

+

This module implements additional featured for the Purchase Force Invoiced module.

+

It covers the following scenarios:

+
    +
  • One need to modify the quantity to be invoiced after the products were received. Eg .you negotiated an extra discount from your vendor.
  • +
  • You would like to fix some issues with quantities invoiced cause by incorrect data entry.
  • +
+
+
+

Configuration

+

No configuration is required.

+
+
+

Usage

+

Open a purchase order and add an amount into the “Force Invoiced” field. Amount to invoice will be adjusted accordingly. +This field is optional so you can hide it if you don’t need it.

+
+
+

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

+
    +
  • Cetmix
  • +
+
+
+

Contributors

+ +
+
    +
  • Ivan Sokolov
  • +
  • Dessan Hemrayev
  • +
+
+
+
+

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/purchase-workflow project on GitHub.

+

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

+
+
+
+ + diff --git a/purchase_force_invoiced_quantity/tests/__init__.py b/purchase_force_invoiced_quantity/tests/__init__.py new file mode 100644 index 00000000000..0f68af56584 --- /dev/null +++ b/purchase_force_invoiced_quantity/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_purchase_force_invoiced_quantity diff --git a/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py b/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py new file mode 100644 index 00000000000..3303355fbe9 --- /dev/null +++ b/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py @@ -0,0 +1,63 @@ +# Copyright (C) 2024 Cetmix OÜ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestPurchaseForceInvoicedQTY(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + + cls.purchase_order_obj = cls.env["purchase.order"] + cls.purchase_order_line_obj = cls.env["purchase.order.line"] + + cls.customer = cls._create_customer("test_customer") + cls.product_1 = cls._create_product("test_product_1") + cls.product_2 = cls._create_product("test_product_2") + + @classmethod + def _create_customer(cls, name): + """Create a Partner.""" + return cls.env["res.partner"].create( + {"name": name, "email": "example@yourcompany.com"} + ) + + @classmethod + def _create_product(cls, name): + return cls.env["product.product"].create( + { + "name": name, + "type": "service", + "purchase_method": "receive", + } + ) + + def test_purchase_order(self): + po = self.purchase_order_obj.create({"partner_id": self.customer.id}) + pol1 = self.purchase_order_line_obj.create( + {"product_id": self.product_1.id, "product_uom_qty": 3, "order_id": po.id} + ) + pol2 = self.purchase_order_line_obj.create( + {"product_id": self.product_2.id, "product_uom_qty": 2, "order_id": po.id} + ) + + # confirm quotation + po.button_confirm() + # update quantities delivered + pol1.qty_received = 1 + pol2.qty_received = 2 + + pol2.force_invoiced = 3 + self.assertEqual( + pol2.qty_to_invoice, -1, msg="The quantity to invoice should be -1" + ) + self.assertEqual( + po.invoice_status, "to invoice", "The invoice status should be To Invoice" + ) + + po.action_create_invoice() + self.assertEqual( + po.invoice_status, "invoiced", "The invoice status should be Invoiced" + ) diff --git a/purchase_force_invoiced_quantity/views/purchase_order.xml b/purchase_force_invoiced_quantity/views/purchase_order.xml new file mode 100644 index 00000000000..42b9d1c015b --- /dev/null +++ b/purchase_force_invoiced_quantity/views/purchase_order.xml @@ -0,0 +1,21 @@ + + + + purchase.order.form + purchase.order + + + + + + + + + From 045a6f8da7ad1e1255b011e4915bc2ef31a73a3a Mon Sep 17 00:00:00 2001 From: Dessan Hemrayev <43703214+dessanhemrayev@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:06:30 +0000 Subject: [PATCH 02/18] [FIX] purchase_force_invoiced_quantity: Optimize qty_invoiced computation Add filtering for lines with force_invoiced set to improve efficiency. Update the method to compute qty_to_invoice only for relevant lines. Add readonly attribute --- purchase_force_invoiced_quantity/models/purchase_order_line.py | 2 +- purchase_force_invoiced_quantity/views/purchase_order.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase_force_invoiced_quantity/models/purchase_order_line.py b/purchase_force_invoiced_quantity/models/purchase_order_line.py index fc6ee14ce90..1aaa81443bb 100644 --- a/purchase_force_invoiced_quantity/models/purchase_order_line.py +++ b/purchase_force_invoiced_quantity/models/purchase_order_line.py @@ -21,7 +21,7 @@ def _compute_qty_invoiced(self): Compute the quantity to invoice. """ res = super()._compute_qty_invoiced() - for line in self: + for line in self.filtered(lambda l: l.force_invoiced): # compute qty_to_invoice if ( line.order_id.state in ["purchase", "done"] diff --git a/purchase_force_invoiced_quantity/views/purchase_order.xml b/purchase_force_invoiced_quantity/views/purchase_order.xml index 42b9d1c015b..eb6f633e954 100644 --- a/purchase_force_invoiced_quantity/views/purchase_order.xml +++ b/purchase_force_invoiced_quantity/views/purchase_order.xml @@ -13,7 +13,7 @@ From 7ed2772b80e687fa1ee46eef76a70be30bf7061a Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 19 Dec 2024 22:29:53 +0000 Subject: [PATCH 03/18] [UPD] Update purchase_force_invoiced_quantity.pot --- .../i18n/purchase_force_invoiced_quantity.pot | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot diff --git a/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot b/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot new file mode 100644 index 00000000000..17162848b98 --- /dev/null +++ b/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_force_invoiced_quantity +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +msgid "Force Invoiced" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_1_product_template +msgid "Purchase Force Invoiced qty product 1" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_2_product_template +msgid "Purchase Force Invoiced qty product 2" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model,name:purchase_force_invoiced_quantity.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +msgid "" +"This amount will be deducted from quantity to invoice.\n" +"quantity to invoice = delivered - invoiced - force invoiced" +msgstr "" From 5f23773d583368dcd7d84f45618569e47b3fdf1a Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 19 Dec 2024 22:36:16 +0000 Subject: [PATCH 04/18] [BOT] post-merge updates --- purchase_force_invoiced_quantity/README.rst | 2 +- .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 purchase_force_invoiced_quantity/static/description/icon.png diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index d76df6fbdc9..0694931a857 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/README.rst @@ -7,7 +7,7 @@ Purchase Force Invoiced Quantity !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:433528b8a418503fc9905eb9c34985e7e6363e3735091e0ad424d1f25479828c + !! source digest: sha256:e1885771b042f46156fefe89944fa3a364d4a3dd6f5682c87b2b4bd02a13027d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/purchase_force_invoiced_quantity/static/description/icon.png b/purchase_force_invoiced_quantity/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE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R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index b3e72212a45..d60ed2a6205 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -367,7 +367,7 @@

Purchase Force Invoiced Quantity

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:433528b8a418503fc9905eb9c34985e7e6363e3735091e0ad424d1f25479828c +!! source digest: sha256:e1885771b042f46156fefe89944fa3a364d4a3dd6f5682c87b2b4bd02a13027d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

From b03787aadf6663bb83b1ea3b2cf762edf8b81941 Mon Sep 17 00:00:00 2001 From: mymage Date: Sat, 21 Dec 2024 11:58:54 +0000 Subject: [PATCH 05/18] Added translation using Weblate (Italian) --- purchase_force_invoiced_quantity/i18n/it.po | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 purchase_force_invoiced_quantity/i18n/it.po diff --git a/purchase_force_invoiced_quantity/i18n/it.po b/purchase_force_invoiced_quantity/i18n/it.po new file mode 100644 index 00000000000..022c43d14e6 --- /dev/null +++ b/purchase_force_invoiced_quantity/i18n/it.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_force_invoiced_quantity +# +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: purchase_force_invoiced_quantity +#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +msgid "Force Invoiced" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_1_product_template +msgid "Purchase Force Invoiced qty product 1" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_2_product_template +msgid "Purchase Force Invoiced qty product 2" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model,name:purchase_force_invoiced_quantity.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +msgid "" +"This amount will be deducted from quantity to invoice.\n" +"quantity to invoice = delivered - invoiced - force invoiced" +msgstr "" From 41852a2826626d8dd802649ff9bfc99c7a4c9fb9 Mon Sep 17 00:00:00 2001 From: mymage Date: Sat, 21 Dec 2024 11:59:05 +0000 Subject: [PATCH 06/18] Translated using Weblate (Italian) Currently translated at 100.0% (5 of 5 strings) Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_force_invoiced_quantity Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_force_invoiced_quantity/it/ --- purchase_force_invoiced_quantity/i18n/it.po | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/purchase_force_invoiced_quantity/i18n/it.po b/purchase_force_invoiced_quantity/i18n/it.po index 022c43d14e6..70977ddda19 100644 --- a/purchase_force_invoiced_quantity/i18n/it.po +++ b/purchase_force_invoiced_quantity/i18n/it.po @@ -6,33 +6,35 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2024-12-21 14:06+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 5.6.2\n" #. module: purchase_force_invoiced_quantity #: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced msgid "Force Invoiced" -msgstr "" +msgstr "Forza a fatturato" #. module: purchase_force_invoiced_quantity #: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_1_product_template msgid "Purchase Force Invoiced qty product 1" -msgstr "" +msgstr "Quantità fatturazione formzata acquisto prodotto 1" #. module: purchase_force_invoiced_quantity #: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_2_product_template msgid "Purchase Force Invoiced qty product 2" -msgstr "" +msgstr "Quantità fatturazione formzata acquisto prodotto 2" #. module: purchase_force_invoiced_quantity #: model:ir.model,name:purchase_force_invoiced_quantity.model_purchase_order_line msgid "Purchase Order Line" -msgstr "" +msgstr "Riga ordine di acquisto" #. module: purchase_force_invoiced_quantity #: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced @@ -40,3 +42,5 @@ msgid "" "This amount will be deducted from quantity to invoice.\n" "quantity to invoice = delivered - invoiced - force invoiced" msgstr "" +"Questo valore verrà dedotto dalla quantità da fatturare.\n" +"quantità da fatturare = consegnata - fatturata - forzata a fatturata" From 9b6e1e2c58f0257e62a6dd81701a16f4ce187c73 Mon Sep 17 00:00:00 2001 From: Bhavesh Heliconia Date: Fri, 3 Jan 2025 17:03:50 +0530 Subject: [PATCH 07/18] [IMP] purchase_force_invoiced_quantity: pre-commit auto fixes --- purchase_force_invoiced_quantity/README.rst | 48 +++++++++++-------- .../demo/demo_purchase_order.xml | 1 - .../models/purchase_order_line.py | 2 +- .../pyproject.toml | 3 ++ .../readme/{CONFIGURE.rst => CONFIGURE.md} | 1 - .../readme/CONTEXT.md | 10 ++++ .../readme/CONTEXT.rst | 6 --- .../readme/CONTRIBUTORS.md | 4 ++ .../readme/CONTRIBUTORS.rst | 4 -- .../readme/DESCRIPTION.md | 7 +++ .../readme/DESCRIPTION.rst | 5 -- .../readme/USAGE.md | 3 ++ .../readme/USAGE.rst | 2 - .../static/description/index.html | 30 +++++++----- 14 files changed, 75 insertions(+), 51 deletions(-) create mode 100644 purchase_force_invoiced_quantity/pyproject.toml rename purchase_force_invoiced_quantity/readme/{CONFIGURE.rst => CONFIGURE.md} (96%) create mode 100644 purchase_force_invoiced_quantity/readme/CONTEXT.md delete mode 100644 purchase_force_invoiced_quantity/readme/CONTEXT.rst create mode 100644 purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md delete mode 100644 purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst create mode 100644 purchase_force_invoiced_quantity/readme/DESCRIPTION.md delete mode 100644 purchase_force_invoiced_quantity/readme/DESCRIPTION.rst create mode 100644 purchase_force_invoiced_quantity/readme/USAGE.md delete mode 100644 purchase_force_invoiced_quantity/readme/USAGE.rst diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index 0694931a857..b091234554c 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/README.rst @@ -17,22 +17,24 @@ Purchase Force Invoiced Quantity :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/16.0/purchase_force_invoiced_quantity + :target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_force_invoiced_quantity :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_force_invoiced_quantity + :target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_force_invoiced_quantity :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/purchase-workflow&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module add a new "Force Invoiced" field to purchase order lines. This field is used as modifier when computing quantity to be invoiced. +This module add a new "Force Invoiced" field to purchase order lines. +This field is used as modifier when computing quantity to be invoiced. -Current behaviour: quantity to invoice = delivered - invoiced +Current behaviour: quantity to invoice = delivered - invoiced -Implemented behaviour: quantity to invoice = delivered - invoiced - force invoiced +Implemented behaviour: quantity to invoice = delivered - invoiced - +force invoiced **Table of contents** @@ -42,24 +44,28 @@ Implemented behaviour: quantity to invoice = delivered - invoiced - force invoi Use Cases / Context =================== -This module implements additional featured for the `Purchase Force Invoiced `_ module. +This module implements additional featured for the `Purchase Force +Invoiced `__ +module. It covers the following scenarios: -* One need to modify the quantity to be invoiced after the products were received. Eg .you negotiated an extra discount from your vendor. -* You would like to fix some issues with quantities invoiced cause by incorrect data entry. +- One need to modify the quantity to be invoiced after the products were + received. Eg .you negotiated an extra discount from your vendor. +- You would like to fix some issues with quantities invoiced cause by + incorrect data entry. Configuration ============= No configuration is required. - Usage ===== -Open a purchase order and add an amount into the "Force Invoiced" field. Amount to invoice will be adjusted accordingly. -This field is optional so you can hide it if you don't need it. +Open a purchase order and add an amount into the "Force Invoiced" field. +Amount to invoice will be adjusted accordingly. This field is optional +so you can hide it if you don't need it. Bug Tracker =========== @@ -67,7 +73,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. @@ -75,20 +81,22 @@ Credits ======= Authors -~~~~~~~ +------- * Cetmix Contributors -~~~~~~~~~~~~ +------------ + +- `Cetmix `__ -* `Cetmix `_ +.. - * Ivan Sokolov - * Dessan Hemrayev + - Ivan Sokolov + - Dessan Hemrayev Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -100,6 +108,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml b/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml index 3c07a6ebacd..0be60b821fa 100644 --- a/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml +++ b/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml @@ -20,5 +20,4 @@ 0 145.00 - diff --git a/purchase_force_invoiced_quantity/models/purchase_order_line.py b/purchase_force_invoiced_quantity/models/purchase_order_line.py index 1aaa81443bb..87a21a8291f 100644 --- a/purchase_force_invoiced_quantity/models/purchase_order_line.py +++ b/purchase_force_invoiced_quantity/models/purchase_order_line.py @@ -21,7 +21,7 @@ def _compute_qty_invoiced(self): Compute the quantity to invoice. """ res = super()._compute_qty_invoiced() - for line in self.filtered(lambda l: l.force_invoiced): + for line in self.filtered(lambda ln: ln.force_invoiced): # compute qty_to_invoice if ( line.order_id.state in ["purchase", "done"] diff --git a/purchase_force_invoiced_quantity/pyproject.toml b/purchase_force_invoiced_quantity/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/purchase_force_invoiced_quantity/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/purchase_force_invoiced_quantity/readme/CONFIGURE.rst b/purchase_force_invoiced_quantity/readme/CONFIGURE.md similarity index 96% rename from purchase_force_invoiced_quantity/readme/CONFIGURE.rst rename to purchase_force_invoiced_quantity/readme/CONFIGURE.md index d491629811a..718c4a6561b 100644 --- a/purchase_force_invoiced_quantity/readme/CONFIGURE.rst +++ b/purchase_force_invoiced_quantity/readme/CONFIGURE.md @@ -1,2 +1 @@ No configuration is required. - diff --git a/purchase_force_invoiced_quantity/readme/CONTEXT.md b/purchase_force_invoiced_quantity/readme/CONTEXT.md new file mode 100644 index 00000000000..df073504dfb --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/CONTEXT.md @@ -0,0 +1,10 @@ +This module implements additional featured for the [Purchase Force +Invoiced](https://github.com/OCA/purchase-workflow/tree/16.0/purchase_force_invoiced) +module. + +It covers the following scenarios: + +- One need to modify the quantity to be invoiced after the products were + received. Eg .you negotiated an extra discount from your vendor. +- You would like to fix some issues with quantities invoiced cause by + incorrect data entry. diff --git a/purchase_force_invoiced_quantity/readme/CONTEXT.rst b/purchase_force_invoiced_quantity/readme/CONTEXT.rst deleted file mode 100644 index ffd3a5729af..00000000000 --- a/purchase_force_invoiced_quantity/readme/CONTEXT.rst +++ /dev/null @@ -1,6 +0,0 @@ -This module implements additional featured for the `Purchase Force Invoiced `_ module. - -It covers the following scenarios: - -* One need to modify the quantity to be invoiced after the products were received. Eg .you negotiated an extra discount from your vendor. -* You would like to fix some issues with quantities invoiced cause by incorrect data entry. \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..c2d2f5f5acd --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- [Cetmix](http://cetmix.com) + +> - Ivan Sokolov +> - Dessan Hemrayev diff --git a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst deleted file mode 100644 index a3c11326022..00000000000 --- a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,4 +0,0 @@ -* `Cetmix `_ - - * Ivan Sokolov - * Dessan Hemrayev \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/readme/DESCRIPTION.md b/purchase_force_invoiced_quantity/readme/DESCRIPTION.md new file mode 100644 index 00000000000..91ca74107e5 --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module add a new "Force Invoiced" field to purchase order lines. +This field is used as modifier when computing quantity to be invoiced. + +Current behaviour: quantity to invoice = delivered - invoiced + +Implemented behaviour: quantity to invoice = delivered - invoiced - +force invoiced diff --git a/purchase_force_invoiced_quantity/readme/DESCRIPTION.rst b/purchase_force_invoiced_quantity/readme/DESCRIPTION.rst deleted file mode 100644 index 60a35474e66..00000000000 --- a/purchase_force_invoiced_quantity/readme/DESCRIPTION.rst +++ /dev/null @@ -1,5 +0,0 @@ -This module add a new "Force Invoiced" field to purchase order lines. This field is used as modifier when computing quantity to be invoiced. - -Current behaviour: quantity to invoice = delivered - invoiced - -Implemented behaviour: quantity to invoice = delivered - invoiced - force invoiced \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/readme/USAGE.md b/purchase_force_invoiced_quantity/readme/USAGE.md new file mode 100644 index 00000000000..04c404e4837 --- /dev/null +++ b/purchase_force_invoiced_quantity/readme/USAGE.md @@ -0,0 +1,3 @@ +Open a purchase order and add an amount into the "Force Invoiced" field. +Amount to invoice will be adjusted accordingly. This field is optional +so you can hide it if you don't need it. diff --git a/purchase_force_invoiced_quantity/readme/USAGE.rst b/purchase_force_invoiced_quantity/readme/USAGE.rst deleted file mode 100644 index dc2460a4540..00000000000 --- a/purchase_force_invoiced_quantity/readme/USAGE.rst +++ /dev/null @@ -1,2 +0,0 @@ -Open a purchase order and add an amount into the "Force Invoiced" field. Amount to invoice will be adjusted accordingly. -This field is optional so you can hide it if you don't need it. \ No newline at end of file diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index d60ed2a6205..cfa06cc6b3f 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -369,10 +369,12 @@

Purchase Force Invoiced Quantity

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:e1885771b042f46156fefe89944fa3a364d4a3dd6f5682c87b2b4bd02a13027d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

-

This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

-

Current behaviour: quantity to invoice = delivered - invoiced

-

Implemented behaviour: quantity to invoice = delivered - invoiced - force invoiced

+

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

+

This module add a new “Force Invoiced” field to purchase order lines. +This field is used as modifier when computing quantity to be invoiced.

+

Current behaviour: quantity to invoice = delivered - invoiced

+

Implemented behaviour: quantity to invoice = delivered - invoiced - +force invoiced

Table of contents

    @@ -390,11 +392,15 @@

    Purchase Force Invoiced Quantity

Use Cases / Context

-

This module implements additional featured for the Purchase Force Invoiced module.

+

This module implements additional featured for the Purchase Force +Invoiced +module.

It covers the following scenarios:

    -
  • One need to modify the quantity to be invoiced after the products were received. Eg .you negotiated an extra discount from your vendor.
  • -
  • You would like to fix some issues with quantities invoiced cause by incorrect data entry.
  • +
  • One need to modify the quantity to be invoiced after the products were +received. Eg .you negotiated an extra discount from your vendor.
  • +
  • You would like to fix some issues with quantities invoiced cause by +incorrect data entry.
@@ -403,15 +409,16 @@

Configuration

Usage

-

Open a purchase order and add an amount into the “Force Invoiced” field. Amount to invoice will be adjusted accordingly. -This field is optional so you can hide it if you don’t need it.

+

Open a purchase order and add an amount into the “Force Invoiced” field. +Amount to invoice will be adjusted accordingly. This field is optional +so you can hide it if you don’t need it.

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.

@@ -427,6 +434,7 @@

Contributors

+
From 28cfc1736e3499fa79f6176a709c150876b89987 Mon Sep 17 00:00:00 2001 From: Bhavesh Heliconia Date: Fri, 3 Jan 2025 17:32:16 +0530 Subject: [PATCH 08/18] [MIG] purchase_force_invoiced_quantity: Migration to 18.0 --- purchase_force_invoiced_quantity/README.rst | 2 ++ purchase_force_invoiced_quantity/__manifest__.py | 2 +- purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md | 2 ++ .../static/description/index.html | 3 +++ purchase_force_invoiced_quantity/views/purchase_order.xml | 5 +++-- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index b091234554c..52ceb118f08 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/README.rst @@ -95,6 +95,8 @@ Contributors - Ivan Sokolov - Dessan Hemrayev +- Heliconia Solutions Pvt. Ltd. + Maintainers ----------- diff --git a/purchase_force_invoiced_quantity/__manifest__.py b/purchase_force_invoiced_quantity/__manifest__.py index f09052b2c10..5642565c5af 100644 --- a/purchase_force_invoiced_quantity/__manifest__.py +++ b/purchase_force_invoiced_quantity/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Purchase Force Invoiced Quantity", "summary": "Add manual invoice quantity in purchase order lines", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "author": "Cetmix, Odoo Community Association (OCA)", "category": "Purchase Management", "license": "AGPL-3", diff --git a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md index c2d2f5f5acd..2b5e38b009c 100644 --- a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md +++ b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md @@ -2,3 +2,5 @@ > - Ivan Sokolov > - Dessan Hemrayev + +- Heliconia Solutions Pvt. Ltd. \<\> diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index cfa06cc6b3f..0984f015b30 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -441,6 +441,9 @@

Contributors

  • Dessan Hemrayev
  • +

    Maintainers

    diff --git a/purchase_force_invoiced_quantity/views/purchase_order.xml b/purchase_force_invoiced_quantity/views/purchase_order.xml index eb6f633e954..bfe40be0062 100644 --- a/purchase_force_invoiced_quantity/views/purchase_order.xml +++ b/purchase_force_invoiced_quantity/views/purchase_order.xml @@ -7,13 +7,14 @@ From 5c1410f4bb56a855c6fc5c4270ff1a189d772ee1 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 9 Jun 2025 23:46:36 +0000 Subject: [PATCH 09/18] [UPD] Update purchase_force_invoiced_quantity.pot --- .../i18n/purchase_force_invoiced_quantity.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot b/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot index 17162848b98..5c9b16b6844 100644 --- a/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot +++ b/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" From d9e0e852e80cc7410daadab2c86ae7cfc54807cc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 9 Jun 2025 23:51:39 +0000 Subject: [PATCH 10/18] [BOT] post-merge updates --- purchase_force_invoiced_quantity/README.rst | 8 +++-- .../static/description/index.html | 32 +++++++++++-------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index 52ceb118f08..63a4a92c69a 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/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 + ================================ Purchase Force Invoiced Quantity ================================ @@ -7,13 +11,13 @@ Purchase Force Invoiced Quantity !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e1885771b042f46156fefe89944fa3a364d4a3dd6f5682c87b2b4bd02a13027d + !! source digest: sha256:5049a45ca7a88799d4c4586e1906351166f7626c36e03e35f0493414432a3981 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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-AGPL--3-blue.png +.. |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%2Fpurchase--workflow-lightgray.png?logo=github diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index 0984f015b30..a152e502ca6 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -3,7 +3,7 @@ -Purchase Force Invoiced Quantity +README.rst -
    -

    Purchase Force Invoiced Quantity

    +
    + + +Odoo Community Association + +
    +

    Purchase Force Invoiced Quantity

    -

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

    +

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

    This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

    Current behaviour: quantity to invoice = delivered - invoiced

    @@ -391,7 +396,7 @@

    Purchase Force Invoiced Quantity

    -

    Use Cases / Context

    +

    Use Cases / Context

    This module implements additional featured for the Purchase Force Invoiced module.

    @@ -404,17 +409,17 @@

    Use Cases / Context

    -

    Configuration

    +

    Configuration

    No configuration is required.

    -

    Usage

    +

    Usage

    Open a purchase order and add an amount into the “Force Invoiced” field. Amount to invoice will be adjusted accordingly. This field is optional so you can hide it if you don’t need it.

    -

    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 @@ -422,15 +427,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Cetmix
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association @@ -459,5 +464,6 @@

    Maintainers

    +
    From 56261f281ea564f8e927e70578ced5871d7e9ee8 Mon Sep 17 00:00:00 2001 From: Marcel Savegnago Date: Thu, 26 Jun 2025 18:29:36 +0000 Subject: [PATCH 11/18] Added translation using Weblate (Portuguese (Brazil)) --- .../i18n/pt_BR.po | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 purchase_force_invoiced_quantity/i18n/pt_BR.po diff --git a/purchase_force_invoiced_quantity/i18n/pt_BR.po b/purchase_force_invoiced_quantity/i18n/pt_BR.po new file mode 100644 index 00000000000..3c9d9bcb17a --- /dev/null +++ b/purchase_force_invoiced_quantity/i18n/pt_BR.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_force_invoiced_quantity +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\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: purchase_force_invoiced_quantity +#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +msgid "Force Invoiced" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_1_product_template +msgid "Purchase Force Invoiced qty product 1" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_2_product_template +msgid "Purchase Force Invoiced qty product 2" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model,name:purchase_force_invoiced_quantity.model_purchase_order_line +msgid "Purchase Order Line" +msgstr "" + +#. module: purchase_force_invoiced_quantity +#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +msgid "" +"This amount will be deducted from quantity to invoice.\n" +"quantity to invoice = delivered - invoiced - force invoiced" +msgstr "" From d967b582227fc9ed01d94052c98605acde509f77 Mon Sep 17 00:00:00 2001 From: Joan Sisquella Date: Tue, 9 Sep 2025 09:08:01 +0200 Subject: [PATCH 12/18] [UPD] purchase_force_invoiced_quanity: rename force_invoiced to force_invoiced_qty --- .../__manifest__.py | 2 +- .../demo/demo_purchase_order.xml | 4 +- .../migrations/18.0.1.1.0/pre-migration.py | 59 +++++++++++++++++++ .../models/purchase_order_line.py | 10 ++-- .../static/description/index.html | 11 ++-- .../test_purchase_force_invoiced_quantity.py | 2 +- .../views/purchase_order.xml | 2 +- 7 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py diff --git a/purchase_force_invoiced_quantity/__manifest__.py b/purchase_force_invoiced_quantity/__manifest__.py index 5642565c5af..616888dd05f 100644 --- a/purchase_force_invoiced_quantity/__manifest__.py +++ b/purchase_force_invoiced_quantity/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Purchase Force Invoiced Quantity", "summary": "Add manual invoice quantity in purchase order lines", - "version": "18.0.1.0.0", + "version": "18.0.1.1.0", "author": "Cetmix, Odoo Community Association (OCA)", "category": "Purchase Management", "license": "AGPL-3", diff --git a/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml b/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml index 0be60b821fa..85e52414710 100644 --- a/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml +++ b/purchase_force_invoiced_quantity/demo/demo_purchase_order.xml @@ -9,7 +9,7 @@ 5 - 3 + 3 295.00 @@ -17,7 +17,7 @@ 5 - 0 + 0 145.00 diff --git a/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py b/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py new file mode 100644 index 00000000000..6eb148a1911 --- /dev/null +++ b/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py @@ -0,0 +1,59 @@ +# Copyright 2025 ForgeFlow +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import logging + +_logger = logging.getLogger(__name__) + + +def migrate_force_invoiced_to_force_invoiced_qty(cr): + cr.execute( + """ + SELECT column_name + FROM information_schema.columns + WHERE table_name = 'purchase_order_line' + AND column_name = 'force_invoiced' + """ + ) + old_field_exists = cr.fetchone() + cr.execute( + """ + SELECT column_name + FROM information_schema.columns + WHERE table_name = 'purchase_order_line' + AND column_name = 'force_invoiced_qty' + """ + ) + new_field_exists = cr.fetchone() is not None + if old_field_exists and not new_field_exists: + _logger.info( + "Migrating force_invoiced field to force_invoiced_qty " + "in purchase_order_line" + ) + cr.execute( + """ + ALTER TABLE purchase_order_line + ADD COLUMN IF NOT EXISTS force_invoiced_qty numeric DEFAULT 0.0 + """ + ) + cr.execute( + """ + UPDATE purchase_order_line + SET force_invoiced_qty = COALESCE(force_invoiced, 0.0) + WHERE force_invoiced IS NOT NULL + """ + ) + cr.execute( + "ALTER TABLE purchase_order_line DROP COLUMN IF EXISTS force_invoiced" + ) + _logger.info("Successfully migrated force_invoiced to force_invoiced_qty") + elif new_field_exists: + _logger.info("Field force_invoiced_qty already exists, skipping migration") + else: + _logger.info( + "No force_invoiced field found in purchase_order_line, skipping migration" + ) + + +def migrate(cr, version): + migrate_force_invoiced_to_force_invoiced_qty(cr) diff --git a/purchase_force_invoiced_quantity/models/purchase_order_line.py b/purchase_force_invoiced_quantity/models/purchase_order_line.py index 87a21a8291f..b1ae9b8fe35 100644 --- a/purchase_force_invoiced_quantity/models/purchase_order_line.py +++ b/purchase_force_invoiced_quantity/models/purchase_order_line.py @@ -7,27 +7,27 @@ class PurchaseOrderLine(models.Model): _inherit = "purchase.order.line" - force_invoiced = fields.Float( + force_invoiced_qty = fields.Float( digits="Product Unit of Measure", help=( "This amount will be deducted from quantity to invoice." - "\nquantity to invoice = delivered - invoiced - force invoiced" + "\nquantity to invoice = delivered - invoiced - force invoiced qty" ), ) - @api.depends("force_invoiced") + @api.depends("force_invoiced_qty") def _compute_qty_invoiced(self): """ Compute the quantity to invoice. """ res = super()._compute_qty_invoiced() - for line in self.filtered(lambda ln: ln.force_invoiced): + for line in self.filtered(lambda line: line.force_invoiced_qty): # compute qty_to_invoice if ( line.order_id.state in ["purchase", "done"] and line.product_id.purchase_method != "purchase" ): line.qty_to_invoice = ( - line.qty_received - line.qty_invoiced - line.force_invoiced + line.qty_received - line.qty_invoiced - line.force_invoiced_qty ) return res diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index a152e502ca6..0ba8e6f0394 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -8,11 +8,10 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ +:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z 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 +274,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: gray; } /* line numbers */ +pre.code .ln { color: grey; } /* 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 +300,7 @@ span.pre { white-space: pre } -span.problematic, pre.problematic { +span.problematic { color: red } span.section-subtitle { @@ -453,9 +452,7 @@

    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.

    diff --git a/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py b/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py index 3303355fbe9..404bd3d1652 100644 --- a/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py +++ b/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py @@ -49,7 +49,7 @@ def test_purchase_order(self): pol1.qty_received = 1 pol2.qty_received = 2 - pol2.force_invoiced = 3 + pol2.force_invoiced_qty = 3 self.assertEqual( pol2.qty_to_invoice, -1, msg="The quantity to invoice should be -1" ) diff --git a/purchase_force_invoiced_quantity/views/purchase_order.xml b/purchase_force_invoiced_quantity/views/purchase_order.xml index bfe40be0062..f613dd3928f 100644 --- a/purchase_force_invoiced_quantity/views/purchase_order.xml +++ b/purchase_force_invoiced_quantity/views/purchase_order.xml @@ -11,7 +11,7 @@ position="after" > Date: Wed, 10 Sep 2025 15:25:55 +0200 Subject: [PATCH 13/18] [IMP] purchase_force_invoiced_quantity-rename: improve migration script --- purchase_force_invoiced_quantity/README.rst | 6 +-- .../migrations/18.0.1.1.0/pre-migration.py | 51 ++++--------------- .../static/description/index.html | 30 +++++------ 3 files changed, 24 insertions(+), 63 deletions(-) diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index 63a4a92c69a..d038574e1ec 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ================================ Purchase Force Invoiced Quantity ================================ @@ -17,7 +13,7 @@ Purchase Force Invoiced Quantity .. |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 +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github diff --git a/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py b/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py index 6eb148a1911..1588283c924 100644 --- a/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py +++ b/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py @@ -3,56 +3,27 @@ import logging +from odoo.tools.sql import column_exists + _logger = logging.getLogger(__name__) def migrate_force_invoiced_to_force_invoiced_qty(cr): - cr.execute( - """ - SELECT column_name - FROM information_schema.columns - WHERE table_name = 'purchase_order_line' - AND column_name = 'force_invoiced' - """ - ) - old_field_exists = cr.fetchone() - cr.execute( - """ - SELECT column_name - FROM information_schema.columns - WHERE table_name = 'purchase_order_line' - AND column_name = 'force_invoiced_qty' - """ - ) - new_field_exists = cr.fetchone() is not None + old_field_exists = column_exists(cr, "purchase_order_line", "force_invoiced") + new_field_exists = column_exists(cr, "purchase_order_line", "force_invoiced_qty") if old_field_exists and not new_field_exists: _logger.info( - "Migrating force_invoiced field to force_invoiced_qty " - "in purchase_order_line" - ) - cr.execute( - """ - ALTER TABLE purchase_order_line - ADD COLUMN IF NOT EXISTS force_invoiced_qty numeric DEFAULT 0.0 - """ + "Renaming force_invoiced field to force_invoiced_qty in purchase_order_line" ) cr.execute( - """ - UPDATE purchase_order_line - SET force_invoiced_qty = COALESCE(force_invoiced, 0.0) - WHERE force_invoiced IS NOT NULL - """ + "ALTER TABLE purchase_order_line " + "RENAME COLUMN force_invoiced TO force_invoiced_qty" ) - cr.execute( - "ALTER TABLE purchase_order_line DROP COLUMN IF EXISTS force_invoiced" - ) - _logger.info("Successfully migrated force_invoiced to force_invoiced_qty") - elif new_field_exists: + _logger.info("Successfully renamed force_invoiced to force_invoiced_qty") + if new_field_exists: _logger.info("Field force_invoiced_qty already exists, skipping migration") - else: - _logger.info( - "No force_invoiced field found in purchase_order_line, skipping migration" - ) + if not old_field_exists: + _logger.info("Field force_invoiced does not exist, skipping migration") def migrate(cr, version): diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index 0ba8e6f0394..5262aad3c32 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Purchase Force Invoiced Quantity -
    +
    +

    Purchase Force Invoiced Quantity

    - - -Odoo Community Association - -
    -

    Purchase Force Invoiced Quantity

    -

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

    +

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

    This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

    Current behaviour: quantity to invoice = delivered - invoiced

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

    Purchase Force Invoiced Quantity

    -

    Use Cases / Context

    +

    Use Cases / Context

    This module implements additional featured for the Purchase Force Invoiced module.

    @@ -408,17 +403,17 @@

    Use Cases / Context

    -

    Configuration

    +

    Configuration

    No configuration is required.

    -

    Usage

    +

    Usage

    Open a purchase order and add an amount into the “Force Invoiced” field. Amount to invoice will be adjusted accordingly. This field is optional so you can hide it if you don’t need it.

    -

    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 @@ -426,15 +421,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Cetmix
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association

    OCA, or the Odoo Community Association, is a nonprofit organization whose @@ -461,6 +456,5 @@

    Maintainers

    -
    From 348bcaf805b28157a0f7e316024d81b85c8032d3 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 15 Sep 2025 10:46:51 +0000 Subject: [PATCH 14/18] [UPD] Update purchase_force_invoiced_quantity.pot --- .../i18n/purchase_force_invoiced_quantity.pot | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot b/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot index 5c9b16b6844..133a23c10ab 100644 --- a/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot +++ b/purchase_force_invoiced_quantity/i18n/purchase_force_invoiced_quantity.pot @@ -14,8 +14,8 @@ msgstr "" "Plural-Forms: \n" #. module: purchase_force_invoiced_quantity -#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced -msgid "Force Invoiced" +#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty +msgid "Force Invoiced Qty" msgstr "" #. module: purchase_force_invoiced_quantity @@ -34,8 +34,8 @@ msgid "Purchase Order Line" msgstr "" #. module: purchase_force_invoiced_quantity -#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty msgid "" "This amount will be deducted from quantity to invoice.\n" -"quantity to invoice = delivered - invoiced - force invoiced" +"quantity to invoice = delivered - invoiced - force invoiced qty" msgstr "" From 01149cb7f7ec7f281f2831eb9f4e2b7640a63449 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 15 Sep 2025 10:52:51 +0000 Subject: [PATCH 15/18] [BOT] post-merge updates --- purchase_force_invoiced_quantity/README.rst | 8 +++- .../__manifest__.py | 2 +- .../static/description/index.html | 43 +++++++++++-------- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index d038574e1ec..c6407d3d849 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/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 + ================================ Purchase Force Invoiced Quantity ================================ @@ -7,13 +11,13 @@ Purchase Force Invoiced Quantity !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:5049a45ca7a88799d4c4586e1906351166f7626c36e03e35f0493414432a3981 + !! source digest: sha256:d2654ecfc75bc0715ae3625b649842faaca507543fec3cec094ffbe3422ec310 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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-AGPL--3-blue.png +.. |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%2Fpurchase--workflow-lightgray.png?logo=github diff --git a/purchase_force_invoiced_quantity/__manifest__.py b/purchase_force_invoiced_quantity/__manifest__.py index 616888dd05f..86385c92315 100644 --- a/purchase_force_invoiced_quantity/__manifest__.py +++ b/purchase_force_invoiced_quantity/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Purchase Force Invoiced Quantity", "summary": "Add manual invoice quantity in purchase order lines", - "version": "18.0.1.1.0", + "version": "18.0.1.1.1", "author": "Cetmix, Odoo Community Association (OCA)", "category": "Purchase Management", "license": "AGPL-3", diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index 5262aad3c32..76433dc7325 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -3,15 +3,16 @@ -Purchase Force Invoiced Quantity +README.rst -
    -

    Purchase Force Invoiced Quantity

    +
    + + +Odoo Community Association + +
    +

    Purchase Force Invoiced Quantity

    -

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

    +

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

    This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

    Current behaviour: quantity to invoice = delivered - invoiced

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

    Purchase Force Invoiced Quantity

    -

    Use Cases / Context

    +

    Use Cases / Context

    This module implements additional featured for the Purchase Force Invoiced module.

    @@ -403,17 +409,17 @@

    Use Cases / Context

    -

    Configuration

    +

    Configuration

    No configuration is required.

    -

    Usage

    +

    Usage

    Open a purchase order and add an amount into the “Force Invoiced” field. Amount to invoice will be adjusted accordingly. This field is optional so you can hide it if you don’t need it.

    -

    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 @@ -421,15 +427,15 @@

    Bug Tracker

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

    -

    Credits

    +

    Credits

    -

    Authors

    +

    Authors

    • Cetmix
    -

    Contributors

    +

    Contributors

    @@ -445,9 +451,11 @@

    Contributors

    -

    Maintainers

    +

    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.

    @@ -456,5 +464,6 @@

    Maintainers

    +
    From cfd2e71ec13082cf98ed98e4640419eda1c1f7f6 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 15 Sep 2025 10:53:00 +0000 Subject: [PATCH 16/18] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_force_invoiced_quantity Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_force_invoiced_quantity/ --- purchase_force_invoiced_quantity/i18n/it.po | 22 +++++++++++++------ .../i18n/pt_BR.po | 8 +++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/purchase_force_invoiced_quantity/i18n/it.po b/purchase_force_invoiced_quantity/i18n/it.po index 70977ddda19..61dadf9d3df 100644 --- a/purchase_force_invoiced_quantity/i18n/it.po +++ b/purchase_force_invoiced_quantity/i18n/it.po @@ -17,9 +17,9 @@ msgstr "" "X-Generator: Weblate 5.6.2\n" #. module: purchase_force_invoiced_quantity -#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced -msgid "Force Invoiced" -msgstr "Forza a fatturato" +#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty +msgid "Force Invoiced Qty" +msgstr "" #. module: purchase_force_invoiced_quantity #: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_1_product_template @@ -37,10 +37,18 @@ msgid "Purchase Order Line" msgstr "Riga ordine di acquisto" #. module: purchase_force_invoiced_quantity -#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty msgid "" "This amount will be deducted from quantity to invoice.\n" -"quantity to invoice = delivered - invoiced - force invoiced" +"quantity to invoice = delivered - invoiced - force invoiced qty" msgstr "" -"Questo valore verrà dedotto dalla quantità da fatturare.\n" -"quantità da fatturare = consegnata - fatturata - forzata a fatturata" + +#~ msgid "Force Invoiced" +#~ msgstr "Forza a fatturato" + +#~ msgid "" +#~ "This amount will be deducted from quantity to invoice.\n" +#~ "quantity to invoice = delivered - invoiced - force invoiced" +#~ msgstr "" +#~ "Questo valore verrà dedotto dalla quantità da fatturare.\n" +#~ "quantità da fatturare = consegnata - fatturata - forzata a fatturata" diff --git a/purchase_force_invoiced_quantity/i18n/pt_BR.po b/purchase_force_invoiced_quantity/i18n/pt_BR.po index 3c9d9bcb17a..f41dff316e1 100644 --- a/purchase_force_invoiced_quantity/i18n/pt_BR.po +++ b/purchase_force_invoiced_quantity/i18n/pt_BR.po @@ -15,8 +15,8 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" #. module: purchase_force_invoiced_quantity -#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced -msgid "Force Invoiced" +#: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty +msgid "Force Invoiced Qty" msgstr "" #. module: purchase_force_invoiced_quantity @@ -35,8 +35,8 @@ msgid "Purchase Order Line" msgstr "" #. module: purchase_force_invoiced_quantity -#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced +#: model:ir.model.fields,help:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty msgid "" "This amount will be deducted from quantity to invoice.\n" -"quantity to invoice = delivered - invoiced - force invoiced" +"quantity to invoice = delivered - invoiced - force invoiced qty" msgstr "" From f1b79151a568fd16b683678afa881f1360d38e00 Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 16 Sep 2025 08:42:12 +0000 Subject: [PATCH 17/18] Translated using Weblate (Italian) Currently translated at 100.0% (5 of 5 strings) Translation: purchase-workflow-18.0/purchase-workflow-18.0-purchase_force_invoiced_quantity Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_force_invoiced_quantity/it/ --- purchase_force_invoiced_quantity/i18n/it.po | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/purchase_force_invoiced_quantity/i18n/it.po b/purchase_force_invoiced_quantity/i18n/it.po index 61dadf9d3df..ade4cd2b4f9 100644 --- a/purchase_force_invoiced_quantity/i18n/it.po +++ b/purchase_force_invoiced_quantity/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-12-21 14:06+0000\n" +"PO-Revision-Date: 2025-09-16 10:20+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,12 +14,12 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Weblate 5.10.4\n" #. module: purchase_force_invoiced_quantity #: model:ir.model.fields,field_description:purchase_force_invoiced_quantity.field_purchase_order_line__force_invoiced_qty msgid "Force Invoiced Qty" -msgstr "" +msgstr "Forza q.tà fatturata" #. module: purchase_force_invoiced_quantity #: model:product.template,name:purchase_force_invoiced_quantity.demo_product_purchase_force_invoiced_qty_1_product_template @@ -42,6 +42,8 @@ msgid "" "This amount will be deducted from quantity to invoice.\n" "quantity to invoice = delivered - invoiced - force invoiced qty" msgstr "" +"Questo valore verrà dedotto dalla quantità da fatturare.\n" +"quantità da fatturare = consegnata - fatturata - forzata a fatturata" #~ msgid "Force Invoiced" #~ msgstr "Forza a fatturato" From b45554a4c3a1bcd65eb4587698fd7078d88a8128 Mon Sep 17 00:00:00 2001 From: Bhavesh Heliconia Date: Mon, 27 Apr 2026 16:26:42 +0530 Subject: [PATCH 18/18] [MIG] purchase_force_invoiced_quantity: Migration to 19.0 --- purchase_force_invoiced_quantity/README.rst | 14 ++++---- .../__manifest__.py | 2 +- .../migrations/18.0.1.1.0/pre-migration.py | 30 ----------------- .../readme/CONTRIBUTORS.md | 3 +- .../static/description/index.html | 11 ++++--- .../test_purchase_force_invoiced_quantity.py | 32 +++++-------------- 6 files changed, 26 insertions(+), 66 deletions(-) delete mode 100644 purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py diff --git a/purchase_force_invoiced_quantity/README.rst b/purchase_force_invoiced_quantity/README.rst index c6407d3d849..78b283d1f5b 100644 --- a/purchase_force_invoiced_quantity/README.rst +++ b/purchase_force_invoiced_quantity/README.rst @@ -21,13 +21,13 @@ Purchase Force Invoiced Quantity :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/purchase-workflow/tree/18.0/purchase_force_invoiced_quantity + :target: https://github.com/OCA/purchase-workflow/tree/19.0/purchase_force_invoiced_quantity :alt: OCA/purchase-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-purchase_force_invoiced_quantity + :target: https://translation.odoo-community.org/projects/purchase-workflow-19-0/purchase-workflow-19-0-purchase_force_invoiced_quantity :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/purchase-workflow&target_branch=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/purchase-workflow&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -77,7 +77,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. @@ -99,7 +99,9 @@ Contributors - Ivan Sokolov - Dessan Hemrayev -- Heliconia Solutions Pvt. Ltd. +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia Maintainers ----------- @@ -114,6 +116,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/purchase-workflow `_ project on GitHub. +This module is part of the `OCA/purchase-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/purchase_force_invoiced_quantity/__manifest__.py b/purchase_force_invoiced_quantity/__manifest__.py index 86385c92315..c7cc4378fd9 100644 --- a/purchase_force_invoiced_quantity/__manifest__.py +++ b/purchase_force_invoiced_quantity/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Purchase Force Invoiced Quantity", "summary": "Add manual invoice quantity in purchase order lines", - "version": "18.0.1.1.1", + "version": "19.0.1.0.0", "author": "Cetmix, Odoo Community Association (OCA)", "category": "Purchase Management", "license": "AGPL-3", diff --git a/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py b/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py deleted file mode 100644 index 1588283c924..00000000000 --- a/purchase_force_invoiced_quantity/migrations/18.0.1.1.0/pre-migration.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2025 ForgeFlow -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -import logging - -from odoo.tools.sql import column_exists - -_logger = logging.getLogger(__name__) - - -def migrate_force_invoiced_to_force_invoiced_qty(cr): - old_field_exists = column_exists(cr, "purchase_order_line", "force_invoiced") - new_field_exists = column_exists(cr, "purchase_order_line", "force_invoiced_qty") - if old_field_exists and not new_field_exists: - _logger.info( - "Renaming force_invoiced field to force_invoiced_qty in purchase_order_line" - ) - cr.execute( - "ALTER TABLE purchase_order_line " - "RENAME COLUMN force_invoiced TO force_invoiced_qty" - ) - _logger.info("Successfully renamed force_invoiced to force_invoiced_qty") - if new_field_exists: - _logger.info("Field force_invoiced_qty already exists, skipping migration") - if not old_field_exists: - _logger.info("Field force_invoiced does not exist, skipping migration") - - -def migrate(cr, version): - migrate_force_invoiced_to_force_invoiced_qty(cr) diff --git a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md index 2b5e38b009c..57151c789c9 100644 --- a/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md +++ b/purchase_force_invoiced_quantity/readme/CONTRIBUTORS.md @@ -3,4 +3,5 @@ > - Ivan Sokolov > - Dessan Hemrayev -- Heliconia Solutions Pvt. Ltd. \<\> +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/purchase_force_invoiced_quantity/static/description/index.html b/purchase_force_invoiced_quantity/static/description/index.html index 76433dc7325..2a2a32beb55 100644 --- a/purchase_force_invoiced_quantity/static/description/index.html +++ b/purchase_force_invoiced_quantity/static/description/index.html @@ -374,7 +374,7 @@

    Purchase Force Invoiced Quantity

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:d2654ecfc75bc0715ae3625b649842faaca507543fec3cec094ffbe3422ec310 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module add a new “Force Invoiced” field to purchase order lines. This field is used as modifier when computing quantity to be invoiced.

    Current behaviour: quantity to invoice = delivered - invoiced

    @@ -423,7 +423,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.

    @@ -447,7 +447,10 @@

    Contributors

    @@ -459,7 +462,7 @@

    Maintainers

    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/purchase-workflow project on GitHub.

    +

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

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

    diff --git a/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py b/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py index 404bd3d1652..70a8fc1b6a0 100644 --- a/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py +++ b/purchase_force_invoiced_quantity/tests/test_purchase_force_invoiced_quantity.py @@ -1,10 +1,10 @@ # Copyright (C) 2024 Cetmix OÜ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo.tests.common import TransactionCase +from odoo.addons.account.tests.common import AccountTestInvoicingCommon -class TestPurchaseForceInvoicedQTY(TransactionCase): +class TestPurchaseForceInvoicedQTY(AccountTestInvoicingCommon): @classmethod def setUpClass(cls): super().setUpClass() @@ -13,34 +13,18 @@ def setUpClass(cls): cls.purchase_order_obj = cls.env["purchase.order"] cls.purchase_order_line_obj = cls.env["purchase.order.line"] - cls.customer = cls._create_customer("test_customer") - cls.product_1 = cls._create_product("test_product_1") - cls.product_2 = cls._create_product("test_product_2") - - @classmethod - def _create_customer(cls, name): - """Create a Partner.""" - return cls.env["res.partner"].create( - {"name": name, "email": "example@yourcompany.com"} - ) - - @classmethod - def _create_product(cls, name): - return cls.env["product.product"].create( - { - "name": name, - "type": "service", - "purchase_method": "receive", - } - ) + cls.customer = cls.partner_a + cls.product_1 = cls.product_a + cls.product_2 = cls.product_b + (cls.product_1 | cls.product_2).write({"purchase_method": "receive"}) def test_purchase_order(self): po = self.purchase_order_obj.create({"partner_id": self.customer.id}) pol1 = self.purchase_order_line_obj.create( - {"product_id": self.product_1.id, "product_uom_qty": 3, "order_id": po.id} + {"product_id": self.product_1.id, "product_qty": 3, "order_id": po.id} ) pol2 = self.purchase_order_line_obj.create( - {"product_id": self.product_2.id, "product_uom_qty": 2, "order_id": po.id} + {"product_id": self.product_2.id, "product_qty": 2, "order_id": po.id} ) # confirm quotation