summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorwan <wan@odoo.com>2019-07-30 12:35:22 +0000
committerwan <wan@odoo.com>2019-07-31 14:04:15 +0000
commit13a535a0918f6f75d8c631a465fbc9238ea954bf (patch)
treeba26c5ab3cc65e1b548d63dc2a0b1b3c13cc3251 /addons/web/static/src/js/views/basic/basic_controller.js
parent22930162727a22db9cb6cb300eaa0852e3f5085a (diff)
[FIX] point_of_sale: anglosaxon prices werent correctly calcuated
Reproduce: 1. I create a product with fifo and real_time valuation (make sure the invoicing policy is 'delivered' and make it available in pos). 2. set the cost of the product to be 5.0 and sale price to be 10.0. 3. I update its inventory and set 5 items. -> total valuation of 25. 4. I change the cost of the product to 1.0. 5. I update again the quantity to 10, making the valuation of the product to 30.0. 6. I configure point of sale to allow invoicing. 7. Open a pos session then sell 7 items of the product (invoice the order). 8. Since the product is fifo, this means that the cost of goods sold is 5 * 5.0 + 2 * 1.0 = 27.0. 9. The correct expense account line should have balance of 27.0. 10. The correct output account line should have balance of -27.0 However, instead of 27.0 as stock valuation amount, the value in the pos.order invoice is currently 7 * 2.0 = 14 -- and this is wrong. It is not taking into account the value of the previous stock Solution: Missing refactoring from https://github.com/odoo/odoo/commit/14812f41710282f9923078f6764323086500ae85 closes odoo/odoo#35335 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions