diff --git a/product_replenishment_cost/models/product_template.py b/product_replenishment_cost/models/product_template.py index df6a86331..e833bcaa4 100644 --- a/product_replenishment_cost/models/product_template.py +++ b/product_replenishment_cost/models/product_template.py @@ -188,13 +188,11 @@ def _compute_replenishment_cost_last_update(self): # rule # 'replenishment_base_cost_currency_id', # # because of being stored - 'replenishment_base_cost_currency_id.rate_ids.rate', + 'replenishment_base_cost_currency_id', # # and this if we change de date (name field) # 'replenishment_base_cost_currency_id.rate_ids.name', # rule items - 'replenishment_cost_rule_id.item_ids.sequence', - 'replenishment_cost_rule_id.item_ids.percentage_amount', - 'replenishment_cost_rule_id.item_ids.fixed_amount', + 'replenishment_cost_rule_id', ) @api.depends_context('company') def _compute_replenishment_cost(self): diff --git a/product_replenishment_cost_sale_margin/models/sale_order_line.py b/product_replenishment_cost_sale_margin/models/sale_order_line.py index 1addaed76..2a3a1e8d8 100644 --- a/product_replenishment_cost_sale_margin/models/sale_order_line.py +++ b/product_replenishment_cost_sale_margin/models/sale_order_line.py @@ -4,7 +4,6 @@ class SaleOrderLine(models.Model): _inherit = 'sale.order.line' - @api.depends('product_id.replenishment_cost') def _compute_purchase_price(self): super()._compute_purchase_price() for line in self.filtered('product_id'): @@ -20,7 +19,6 @@ def _compute_purchase_price(self): line.purchase_price = frm_cur._convert( purchase_price, to_cur, order_id.company_id or self.env.company, order_id.date_order or fields.Date.today(), round=False) - def _convert_price(self, product_cost, from_uom): if not product_cost: