odoo/odoo#238002

Created by fw-bot
Merged at 566894e2fac2e7c25a5a8a71af7c3217e841f884

Statuses:

label
odoo-dev:master-19.0-fix-float-quantity-fifo-quwo-480701-fw
head
0790f05929362ea5a764fa16623ad33b1744e465
merged
2 days ago by Logistics, Quentin Wolfs (quwo)
odoo/odoo
19.0 #237802
master #238002

[FIX] stock_account: handle float quantities in fifo

Steps to reproduce:
- Storable product with fifo valuation & standard price of $1
- Do an inventory adjustment with 1.9 qty
- Go to Inventory > Reporting > Stock and click on the total value

Issue:
Remaning quantity is 1 and remaining value is $1.00

A cast to int() on the qty_available was done so it would be used as a limit for a search. However, this meant that the decimal part of the quantity would be dropped.

After further analysis, we changed the over-engineered limit to always be 100, as by nature that value is completely arbitrary anyway.

opw-5230435


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

Forward-Port-Of: #237802