From 9fc2535fa8e3a5bf9c7344bd99dc074d82afdfa5 Mon Sep 17 00:00:00 2001 From: Virginia Bonservizi Date: Thu, 22 Sep 2022 13:59:07 -0300 Subject: [PATCH] [IMP] product_replenishment_cost: replenishment_cost_last_update adjustment --- product_replenishment_cost/__manifest__.py | 2 +- product_replenishment_cost/models/product_template.py | 6 ++++++ product_replenishment_cost/views/product_template_views.xml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/product_replenishment_cost/__manifest__.py b/product_replenishment_cost/__manifest__.py index f5f14d27d..78a5513a9 100644 --- a/product_replenishment_cost/__manifest__.py +++ b/product_replenishment_cost/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Replenishment Cost', - 'version': "15.0.1.1.0", + 'version': "15.0.1.2.0", 'author': "ADHOC SA, Odoo Community Association (OCA)", 'license': 'AGPL-3', 'category': 'Products', diff --git a/product_replenishment_cost/models/product_template.py b/product_replenishment_cost/models/product_template.py index a1bdc81ab..d6ca23fee 100644 --- a/product_replenishment_cost/models/product_template.py +++ b/product_replenishment_cost/models/product_template.py @@ -136,8 +136,14 @@ def _update_cost_from_replenishment_cost(self): return True @api.depends( + 'replenishment_cost_type', 'replenishment_base_cost', 'replenishment_base_cost_currency_id', + 'supplier_price', + 'supplier_currency_id', + 'replenishment_cost_rule_id.item_ids.sequence', + 'replenishment_cost_rule_id.item_ids.percentage_amount', + 'replenishment_cost_rule_id.item_ids.fixed_amount', ) def _compute_replenishment_cost_last_update(self): self.replenishment_cost_last_update = fields.Datetime.now() diff --git a/product_replenishment_cost/views/product_template_views.xml b/product_replenishment_cost/views/product_template_views.xml index 63fe202f5..da6b8d4f3 100644 --- a/product_replenishment_cost/views/product_template_views.xml +++ b/product_replenishment_cost/views/product_template_views.xml @@ -11,7 +11,7 @@ - +