Please help!!!
How to open a new window through a button please
here is my code
python function:
def edit_data(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
res = mod_obj.get_object_reference(cr, uid, 'add_credit', 'callims_form')
momo_id = self.read(cr, uid, ids,['id','add_credit'])
print ("cc")
return {
'name': 'New Data',
'view_type': 'form',
'view_mode': 'form',
'view_id': False,
'res_model': 'add_credit',
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'new',
'flags' : { 'action_buttons' : True,},
}
and the xml:
<button name="edit_data" type="objet" icon="gtk-add"/>
i want to open add_credit window but it doesnt work