Skip to content
Snippets Groups Projects
Commit 4aeed49d authored by Merel Geens (mege)'s avatar Merel Geens (mege)
Browse files

[FIX] point_of_sale: fallback to standard price


When creating the POS journal entry for a POS session (or one of its
orders when realtime inventory management is enabled), it's possible for
the stock picking to fail if a product requires a serial number or lot
id and none was provided. After the POS session is closed, this stock
picking can be corrected and the accompanying inventory valuation
entries will be created. However, when using anglo-saxon accounting, the
amount on the COGS line in the POS journal entry will be 0. That's
because the current implementation sums up the values from the stock
valuation layers to determine this amount. If the stock picking failed,
there will be no stock valuation layers so the result is 0.

In other workflows in Odoo like creating an invoice from a sales order
before the delivery is validated, the implementation deals with this
case by falling back to the standard price if no stock valuation layers
are available. This fix does the same for the POS journal entries.

opw-2988701

closes odoo/odoo#108745

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent 03057029
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment