Hi all,
I have created a button and wrote function for that like, when i click on that button new pop-up form should open.
xml:
<button name="button_method" string="Test Drive Type" type="object" class="btn-primary"/>
py:
@api.multi
def button_method(self):
view_ref = self.pool.get('ir.model.data').get_object_reference('autochip', 'so_on_form')
view_id = view_ref and view_ref[1] or False
return {
'type': 'ir.actions.act_window',
'res_model': 'test.drive.allocation',
'view_type': 'form',
'view_mode': 'form',
'views': [(view_id, 'form')],
'view_id': view_id,
'target':'new',
}
When i click on button i am getting
TypeError: <built-in function id> is not JSON serializable
i am not able to find what is the issue?
what is wrong?
Can you post the entire error message?