I am trying to write values in one2many field. I am using Odoo v8. I have a wizard with one2many field. A button is associated and on clicking the button I am using write method to add values into one2many field.My button function is being called but it closes the wizard without doing anything. I dont get any error or exception.
My XML code is as:
<button name="split_qty" type="object" string="Split" class="oe_highlight"/>
My python code is as:
for i in range(1,11):
self.write({'item_ids':[(0, 0, {'product_id':pID,'quantity ':1, 'sourceloc_id':sID,'destinationloc_id':dID})]})
Any help or guidance on this will be helpful. Thanks