Skip to content

Commit

Permalink
[IMP] mrp_product_loss_cost: Change function update_prodution_cost by…
Browse files Browse the repository at this point in the history
… _update_finished_move_cost_and_lot
  • Loading branch information
unaiberis committed Jan 9, 2025
1 parent 6586280 commit b45f5a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mrp_product_loss_cost/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ def _post_install_put_cost_in_scrap(cr, registry):
}
)
if scrap.production_id and scrap.production_id.state == "done":
scrap.production_id.update_prodution_cost()
scrap.production_id._update_finished_move_cost_and_lot()
6 changes: 3 additions & 3 deletions mrp_product_loss_cost/models/stock_scrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create(self, vals_list):
and x.production_id
and x.production_id.state == "done"
):
scrap.production_id.update_prodution_cost()
scrap.production_id._update_finished_move_cost_and_lot()
return scraps

def write(self, vals):
Expand All @@ -49,7 +49,7 @@ def write(self, vals):
and x.production_id
and x.production_id.state == "done"
):
scrap.production_id.update_prodution_cost()
scrap.production_id._update_finished_move_cost_and_lot()
return result

def unlink(self):
Expand All @@ -59,7 +59,7 @@ def unlink(self):
productions = scraps_with_productions.mapped("production_id")
result = super().unlink()
for production in productions:
production.update_prodution_cost()
production._update_finished_move_cost_and_lot()
return result

def _calculate_price_unit_cost(self, vals):
Expand Down

0 comments on commit b45f5a2

Please sign in to comment.