summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2018-05-24 13:02:28 +0200
committerNicolas Martinelli <nim-odoo@users.noreply.github.com>2018-06-07 08:30:04 +0200
commit21099f3eaf7b01a4f605c49daea529210b599bf0 (patch)
tree369e6ed729d1e4ff31ee2a19d028d2a49f28d6a6 /doc/reference/javascript_reference.rst
parentab1690b3de34795ab4585d0989a5869e071d9fc2 (diff)
[FIX] stock, stock_account: valuation with owner
Issue 1 ------- - Set a product with: Inventory Valuation: Manual Costing Method: Average Cost (or Standard Price) - Receive 1 unit @ 10, set an owner In the 'Inventory Valuation' report, the product is valued @ 10 while no accounting entry was created. The system simply multiplies the available quantity by the cost price, without taking into account the ownership of the quants. Issue 2 ------- - Set a product with: Inventory Valuation: Automated Costing Method: Average Cost (or Standard Price) - Receive 1 unit @ 10, set an owner In the 'Inventory Valuation' report, the product is valued @ 10 while no accounting entry was created. Once again, the system simply multiplies the available quantity by the cost price, without taking into account the AML. Solution -------- A slight refactoring of the `_compute_stock_value` method is necessary to make consistent the the FIFO computation and the Standard / Average method: - in case of manual valuation, the quantity on stock moves are taken into account - in case of perpetual valuation, the quantity on AMLs is taken into account The method `_compute_quantities_dict` needs a minor change so a `False` value can be handled correctly. The FIFO method is slightly changed: - the quantity at date takes into account the owner - in case of perpetual valuation, AMLs are used instead of stock moves Bonus point: an error was discovered in `_create_account_move_line` thanks to the test `test_change_cost_method_1`. The forced quantity should follow the same sign logic than the product quantity. opw-1849535
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions