Skip to Content
Menu
This question has been flagged
1 Reply
2332 Views

i made a wizard that has one2many field and many2one field that target self

when I save the form, the create function looped. If I cancel the create function, the form won't close after Pressing the save button.

what should i do?


 _columns={

  'lines': fields.one2many('template', 'parent_id', 'Lines'),

'parent_id': fields.many2one('template', 'Parent', ondelete='cascade', select=True),

}


 def save(self, cr, uid, data, context=None):

 

return {

'type': 'ir.actions.act_window_close',

'tag': 'reload',

}

def create(self, cr, uid, vals, context=None):

 

return 1

Avatar
Discard
Best Answer

Try once by return  super in create method you inherited 

Avatar
Discard