I want a popup when a user is saving for example a product. I tried to override the write method but it didn't work. So I'm returning a new action but it gets ignored. Any ideas on this ?
write:
def write(self, vals):
res = super(ProductTemplate, self).write(vals)
if vals:
# call popup window action:
view_item = [(self.env.ref('versioning.versioning_text_wizard_view').id, 'form')]
view = self.env.ref('versioning.versioning_text_wizard_view')
return {
'name': 'Versioning Text',
'view_type': 'form',
'view_mode': 'form',
'view_id': view.id,
'res_model': 'product.template',
'views': view_item,
'type': 'ir.actions.act_window',
'target': 'new',
}
return res
Thank you
no information about this? any other solutions?
You can not add two return method for same method