purchase_order_supplierinfo_update_triple_discount: update discounts on write
This commit is contained in:
parent
489eefefc7
commit
c76254e3c7
1 changed files with 6 additions and 0 deletions
|
|
@ -20,6 +20,12 @@ class PurchaseOrderLine(models.Model):
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def write(self, vals):
|
||||||
|
res = super().write(vals)
|
||||||
|
if any(field in vals for field in self._SUPPLIERINFO_DISCOUNT_CONFIG):
|
||||||
|
self.update_supplierinfo_price()
|
||||||
|
return res
|
||||||
|
|
||||||
def _update_supplierinfo(self, seller):
|
def _update_supplierinfo(self, seller):
|
||||||
"""Extend supplierinfo update to optionally sync each discount field."""
|
"""Extend supplierinfo update to optionally sync each discount field."""
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue