If you look at the method do_partial_picking in file addons/stock/wizard/stock_partial_picking.py
You will see a check if wizard_line.move_id.id is set or not. And then after the test use wizard_line.move_id.id even if it isn't set. So calling the method without move_id will raise the previous error.
Wether it should use move_id instead of wizard_line.move_id.id or check wizard_line.move_id is not null in case of
(picking_type == 'in') and (wizard_line.product_id.cost_method == 'average')
This is for my specific needs but there is obviously an error in this code part.
I think my solution is the best of the two option as I don't see why it would not be allowed to give an empty wizard_line.move_id to force the creation of a new one in case of product reception.
Well this is a coding issue.
If you look at the method do_partial_picking in file addons/ stock/wizard/ stock_partial_ picking. py
You will see a check if wizard_ line.move_ id.id is set or not. And then after the test use wizard_ line.move_ id.id even if it isn't set. So calling the method without move_id will raise the previous error.
Wether it should use move_id instead of wizard_ line.move_ id.id or check wizard_line.move_id is not null in case of line.product_ id.cost_ method == 'average')
(picking_type == 'in') and (wizard_
This is for my specific needs but there is obviously an error in this code part.
I think my solution is the best of the two option as I don't see why it would not be allowed to give an empty wizard_line.move_id to force the creation of a new one in case of product reception.