[FIX] product: Add missing api.depends to _compute_product_price_extra
Field `product.product.lst_price` is not recomputed after changing `product.template.attribute.value.price_extra`. Computation of `product.product.lst_price` is not triggered because `product.product.price_extra` is not recomputed because of the missing decorator. closes odoo/odoo#126968 X-original-commit: c7034cb9973532da8011f5fc78d50d859b704500 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -226,6 +226,7 @@ class ProductProduct(models.Model):
|
||||
value -= product.price_extra
|
||||
product.write({'list_price': value})
|
||||
|
||||
@api.depends("product_template_attribute_value_ids.price_extra")
|
||||
def _compute_product_price_extra(self):
|
||||
for product in self:
|
||||
product.price_extra = sum(product.product_template_attribute_value_ids.mapped('price_extra'))
|
||||
|
||||
Reference in New Issue
Block a user