You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's take a product with a control policy based on received quantities. When a purchase order is placed, the uninvoiced amount is calculated based on this control policy.
If the control policy of the product is changed to On Ordered Quantities and, for example, the product line description in the purchase order is changed, the uninvoiced amount will be recalculated according to the new control policy of the product based On Ordered Quantities.
To Reproduce
Affected versions:
Steps to reproduce the behavior:
Set a (storable or cosumable) product with control policy based On Received Quantities.
Place an order for 10 units of this product at $10 per unit.
Make a reception of 4 units.
The uninvoiced amount will be 40$.
Change product policy control to On Ordered Quantities
Go to the created purchase order and change the product description and save.
The uninvoiced amount has been recalculated to 100$.
Expected behavior
Even if the product policy control is changed the uninvoiced amount of the order should not be recalculated with the new product policy control but with the policy control that the product had when the order was validated.
Is there any qty_to_invoice field in purchase? If so, you should hook to it. If not, please see how Odoo evaluate this thing.
No, there isn't.
The OCA module purchase_open_qty add it but it's not core one.
In my opinion the best way, is to create a new module purchase_order_control_policy_method (incompatibly with purchase_open_qty (OCA) which add qty_to_invoice in purchase_order and you could, from purchase order (in other information tab), set de Control Policy (purchase_method) and overwrite the same field in purchase_order_lines
Module
purchase_order_uninvoiced_amount
Describe the bug
Let's take a product with a control policy based on received quantities. When a purchase order is placed, the uninvoiced amount is calculated based on this control policy.
If the control policy of the product is changed to On Ordered Quantities and, for example, the product line description in the purchase order is changed, the uninvoiced amount will be recalculated according to the new control policy of the product based On Ordered Quantities.
To Reproduce
Affected versions:
Steps to reproduce the behavior:
https://www.loom.com/share/4cd899b1380c4d4b9f0a1062dc3395a4?sid=b33a0c06-9fed-4722-b395-862648cb99f7
Expected behavior
Even if the product policy control is changed the uninvoiced amount of the order should not be recalculated with the new product policy control but with the policy control that the product had when the order was validated.
@moduon MT-3976
The text was updated successfully, but these errors were encountered: