summaryrefslogtreecommitdiff
path: root/addons/base_setup/data/base_setup_data.xml
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2019-06-27 09:24:56 +0000
committerArnold Moyaux <arm@odoo.com>2019-07-25 07:41:58 +0000
commitc8754185d14115183a384398451070e45ec73eb4 (patch)
treedb418bc7465e8c26a6662a136d5857af9d83b960 /addons/base_setup/data/base_setup_data.xml
parent5b80695fc658d6e7344610f11f00cc5ae247a923 (diff)
[FIX] stock: MTO overprocessed move
Error due to other module (e.g. purchase_stock, mrp) that will define their own rules in order to merge or not moves together. Usecase: - Install purchase_stock - Create a product MTO + buy with a vendor - Create a SO of 1 unit - On the PO receive 2 units - On the delivery deliver 2 units It will create an empty delivery and put the entire move in a back order. First issue the extra move is created as a MTO if it's copied from an MTO move. So il will trigger all the pull rule. We won't it because it's an extra quantity and the rules should be only trigger by the original document (SO/MO). Also an extra move in a picking do the hypothesis that the original move and the extra move will always be merged together. But in the previous usecase, the module purchase add the condition that 'created_purchase_line_id' and 'purchase_line_id' should be the same in order to merge move. 'created_purchase_line_id' is also copy=False, so the move and the extra move will not be merged. create_extra_move only returns the extra move and _action_done only process the moves returned by _create_extra_move. It result by an original move not merged and not processed by _action_done, it will be automaticaly set in a back order and the extra move is processed. In order to fix it, check if the move and the original move will be merged. If not, returns both moves. opw-2008113 Close #34005 closes odoo/odoo#34411 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Diffstat (limited to 'addons/base_setup/data/base_setup_data.xml')
0 files changed, 0 insertions, 0 deletions