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

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

Avatar
Discard
Best Answer

May be you can achieve this by creating your own wizard, then catch the error in your code and return the wizard action showing the link using url widget 

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 20
5035
1
Sep 19
5339
2
Sep 23
2919
2
Sep 22
3254
0
Jan 21
2143