summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2018-02-20 16:51:12 +0100
committerSimon Lejeune <sle@openerp.com>2018-02-21 10:44:01 +0100
commit3c0337673385876922da95296e70a0b7b728f275 (patch)
tree7cb7e3c2f43dc74a6665aad55248fd289e8514b7 /addons/web/static/src/js/views/basic/basic_model.js
parentb55e844e1a2118d7fd5f243bfe2244fe8332d707 (diff)
[FIX] stock: extra move, backorder and unit price
When creating an extra move, the price_unit field was not copied. It is normal since the field is copy=False following rev[0]. But there was a side effect: let's say you order 1 product @ $10 and you receive 5. The received quantity field on the purchase order line is correctly set to 5 and the valuation inside the stock is correctly set at $50, but on the picking there is one move line of 5 and a move a 4 and of 1, instead of one of 5. Note that in v10, the pack operation would be split between the original move and the extra move, but in our case the extra move is merged back in the original move, so we don't need to split the move line. The split mechanism is there only when working with moves without picking[1]. The issue here is that the moves are not merged because they do not have the same price unit (5 and 0). We thus copy the unit price when creating the extra move. When creating a backorder, the price_unit field wasn't copied either. It's not important when working with the classic flows (the link to purchase_line_id is kept), but to be consistent we also copy it. [0] https://github.com/odoo/odoo/commit/a4740861d3fdbecc8b1171b7d2072697e8a36258 [1] https://github.com/odoo/odoo/commit/561b3461a020021d911999cb41154f158b069a1d
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions