diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2016-04-19 18:22:27 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2016-04-20 13:09:25 +0200 |
| commit | 262d98bb6988a4b52ae9eabbe553244ead304d9a (patch) | |
| tree | be3e449a1892e494e05a1a26ed630aa1c617a646 /addons/web/static/src/js/framework/data.js | |
| parent | bd025cda6a114de1293b583ef0a9fac88ff145b9 (diff) | |
[FIX] stock_account: account/valuation inconsistencies
When the product price is divided per product unit, inconsistencies
may arise between the real stock valuation and the stock valuation
account. This is likely to happen when a product is bought in a UoM
different from the standard UoM of the product.
A numerical example is the following: a box of 13 is bought for 15.00.
An amount of 15.00 is recorded when the products enter the stock. If the
product leave the stock one at a time, 13 entries of 1.15 are recorded
(15.00/13 = 1.153846... ≈ 1.15), which is then equal to
13 * 1.15 = 14.95. In this case, All the products have left the stock
(stock valuation is zero), but 5 cents remain on the account.
This is of course even worse the higher the ratio is. For example, a
box of 4.00 split into 1000 units sold piece by piece will never be
recorded when a product leaves the stock.
The fix is to record the rounding difference on a specific quant. In the
previous example, instead of adding 1.153846... on the unit cost of the
13 units, we do the following:
- 12 units to which we add 1.15 on unit cost
- 1 unit to which we add 1.20 on unit cost
opw-675222
Diffstat (limited to 'addons/web/static/src/js/framework/data.js')
0 files changed, 0 insertions, 0 deletions
