Skip to content

Commit

Permalink
[IMP] sale_order_qty_change_no_recompute: Block also uom onchange
Browse files Browse the repository at this point in the history
Changing that field shouldn't trigger price recomputation as well.

TT32663
  • Loading branch information
pedrobaeza committed May 1, 2023
1 parent 6220365 commit f5478f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sale_order_qty_change_no_recompute/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Sale Order Qty change no recompute",
"summary": "Prevent recompute if only quantity has changed in sale order line",
"version": "14.0.1.0.1",
"version": "14.0.1.0.2",
"category": "Sale Workflow",
"website": "https://github.com/OCA/sale-workflow",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
2 changes: 1 addition & 1 deletion sale_order_qty_change_no_recompute/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _onchange_eval(self, field_name, onchange, result):
inheritance between Python and Odoo ORM, so we can consider this as a HACK.
"""
ctx = self.env.context
if field_name == "product_uom_qty" and (
if field_name in {"product_uom_qty", "product_uom"} and (
not config["test_enable"]
or (config["test_enable"] and ctx.get("prevent_onchange_quantity", False))
):
Expand Down

0 comments on commit f5478f5

Please sign in to comment.