Skip to content
Snippets Groups Projects
Commit 2680a38a authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] stock_account: fix remaining qty in svl


Steps to reproduce the bug:
- Create a product category “Fifo”:
    - set the costing method to Fifo
- Create a storable product “P1”:
    - category: All (costing method = standard)
    - Update the qty to 10 units

- Go to inventory → Product variant → “P1”
- Change the category from “All” to “Fifo”
- Go to inventory → Reporting → stock valuation
- Add “reaming_qty” field in the list view

Problem:
The empty_stock layer (the layer created to empty the product) has `remaining_qty` of -10 instead of 0 whereas we change from standard to Fifo

The write method of `product.product` is triggered,  leading to Product Variant having another category than Product Template when the write method of `product.template` is triggered

opw-3138061

closes odoo/odoo#110982

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent eb678217
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment