diff --git a/mrp_production_project_estimated_cost/models/mrp_production.py b/mrp_production_project_estimated_cost/models/mrp_production.py index 9f4463519..25267486c 100644 --- a/mrp_production_project_estimated_cost/models/mrp_production.py +++ b/mrp_production_project_estimated_cost/models/mrp_production.py @@ -25,16 +25,16 @@ class MrpProduction(models.Model): @api.depends('analytic_line_ids', 'analytic_line_ids.estim_std_cost', 'product_qty') def get_unit_std_cost(self): - self.std_cost = sum([line.estim_std_cost for line in - self.analytic_line_ids]) + self.std_cost = -(sum([line.estim_std_cost for line in + self.analytic_line_ids])) self.unit_std_cost = self.std_cost / self.product_qty @api.one @api.depends('analytic_line_ids', 'analytic_line_ids.estim_avg_cost', 'product_qty') def get_unit_avg_cost(self): - self.avg_cost = sum([line.estim_avg_cost for line in - self.analytic_line_ids]) + self.avg_cost = -(sum([line.estim_avg_cost for line in + self.analytic_line_ids])) self.unit_avg_cost = self.avg_cost / self.product_qty @api.one diff --git a/mrp_production_project_estimated_cost/views/account_analytic_line_view.xml b/mrp_production_project_estimated_cost/views/account_analytic_line_view.xml index d658d458f..ae6a5620c 100644 --- a/mrp_production_project_estimated_cost/views/account_analytic_line_view.xml +++ b/mrp_production_project_estimated_cost/views/account_analytic_line_view.xml @@ -24,8 +24,8 @@ - - + + @@ -41,8 +41,8 @@ - - + + diff --git a/mrp_production_project_estimated_cost/views/mrp_production_view.xml b/mrp_production_project_estimated_cost/views/mrp_production_view.xml index 268fb4751..486ca81cc 100644 --- a/mrp_production_project_estimated_cost/views/mrp_production_view.xml +++ b/mrp_production_project_estimated_cost/views/mrp_production_view.xml @@ -34,7 +34,7 @@