i know that a lot of ways to stop duplication in odoo, but I need the warning of duplication to appear with the existed record to go directly to it, this is the methods
@api.multi
@api.onchange('name', 'categ')
def check_id(self):
all = self.env['muk_dms.directory']
for record in self:
rec = all.search([('name','=', record.name)])
if rec:
# what should I write here to display the wizard with link or any way to go to rec directly
else:
pass
any help will be appreciated