odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FIX] stock_account: consider already processed qty in fifo

Open fw-bot opened this issue 3 weeks ago • 3 comments

Steps to reproduce:

  • Have a product valued in fifo
  • Create 3 PO for it, each for 1 qty of price 10, 20 and 30.
  • Confirm these PO & validate their receipts
  • Create 2 SO for this product, each for 1 qty
  • Confirm these SO & validate their deliveries together

Issue: The value associated to the delivery moves (and so the cogs generated from them) is 10 for both.

When calling _action_done() on the moves, we'll set the value of each move before moving them. To get the correct value from the fifo stack, we rely on the qty_available at the time. However, since we're going to set the value of multiple moves before validating them, the qty_available won't be updated between each call.

opw-5359484


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: odoo/odoo#238680

fw-bot avatar Dec 05 '25 04:12 fw-bot

Pull request status dashboard

robodoo avatar Dec 05 '25 04:12 robodoo

@clesgow @amoyaux this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

fw-bot avatar Dec 05 '25 04:12 fw-bot

@clesgow @amoyaux this forward port of odoo/odoo#238680 is awaiting action (not merged or closed).

fw-bot avatar Dec 13 '25 02:12 fw-bot

@clesgow @amoyaux this forward port of odoo/odoo#238680 is awaiting action (not merged or closed).

fw-bot avatar Dec 20 '25 02:12 fw-bot