Amit,
You are getting confused by the wizard.move_ids and the wizard_line.move_id
The structure is that way:
wizard (partial) -- move_ids (wizard_line) -- move_id (real move linked in the wizard_line (if set))
In stock.partial.picking: 'move_ids' : fields.one2many('stock.partial.picking.line', 'wizard_id', 'Product Moves'),
In stock.partial.picking.line: 'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'),
So with a wizard_line.move_id == False partial.move_ids won't be null. This mean we will enter in the for loop.
Please look again at the code.
Regards
Amit,
You are getting confused by the wizard.move_ids and the wizard_line.move_id
The structure is that way:
wizard (partial)
-- move_ids (wizard_line)
-- move_id (real move linked in the wizard_line (if set))
In stock.partial. picking: one2many( 'stock. partial. picking. line', 'wizard_id', 'Product Moves'),
'move_ids' : fields.
In stock.partial. picking. line: many2one( 'stock. move', "Move", ondelete= 'CASCADE' ),
'move_id' : fields.
So with a wizard_line.move_id == False partial.move_ids won't be null. This mean we will enter in the for loop.
Please look again at the code.
Regards