summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorJosse Colpaert <jco@odoo.com>2017-05-05 16:07:25 +0200
committerSimon Lejeune <sle@openerp.com>2017-07-14 17:08:22 +0200
commit5e5cd081232b982d4be6412ebf1d336195f2c451 (patch)
tree07b0f70720403a45d2c3eef4a52811a147a8d6f8 /addons/web/static/src/js/views/basic/basic_controller.js
parent8248f0e153ae5fcc1449d0d05149b61df615ad4f (diff)
[REF] stock_account,etc: FIFO and average costing method
The new implementation of stock moves the cost of products from quants to moves. So we have implemented the FIFO and average cost method based on those moves instead of using quants. - When average price is choosed, a field average_price is set on the product. - The tests have been completed with an example of how fifo work with negative stock. As the use of real price method is really rare, because of the rigor required on traceability for such method, we removed this functionnality. - The tests purchase/test/fifo_price.yml have been adapted to use the FIFO costing method instead of real price. The old report stock history doesn't exist anymore, and is replaced by the move view that contains all the cost information. The methods `get_price_unit` have been moved from the stock to stock_account. The methods `_set_default_price_moves` and `set_default_price_unit_from_product` have been removed from stock. Explaination of FIFO and average: - In action_done for an out move in average and fifo, the price_unit and stock_value are updated. - For FIFO, it will use the qty_remaining on the in moves to check from which in moves to take the stock values for the out. - In case of negative stock in FIFO, it puts also qty_remaining on OUTs. - In the case of average, it will take the cumulated value of the last move and divide it by the quantity in stock.   This commit is pretty much a 'work in progress': - Edit 'done' moves when the costing method is FIFO doesn't trigger the replay the FIFO stack. - The landed_costs feature doesn't work.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions