Skip to content

Commit

Permalink
[IMP] stock_valuation_fifo_lot: remove updating standard price
Browse files Browse the repository at this point in the history
  • Loading branch information
AungKoKoLin1997 committed Nov 18, 2024
1 parent 1d90bb4 commit 05f3f3c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions stock_valuation_fifo_lot/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ def _create_in_svl(self, forced_quantity=None):
continue
for ml in layer.stock_move_id.move_line_ids:
ml.qty_base = ml.qty_done
# Update product standard price to the first available
# lot price (by sorting by lot create date).
product = product.with_context(sort_by="lot_create_date")
candidate = product._get_fifo_candidates(move.company_id)[:1]
if not candidate:
continue
product = product.with_company(move.company_id.id)
product = product.with_context(disable_auto_svl=True)
# `candidate.unit_cost` is not totally accurate in 16.0 because of
# https://github.com/odoo/odoo/issues/171464
product.sudo().standard_price = candidate.unit_cost
return layers

def _get_price_unit(self):
Expand Down

0 comments on commit 05f3f3c

Please sign in to comment.