Hi,
We need to set up a duplicate rule on the Customer, base on the mobile field. Could we configure it on Odoo, or we need to customize it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
We need to set up a duplicate rule on the Customer, base on the mobile field. Could we configure it on Odoo, or we need to customize it?
Hi Hung Pham,
I have done a similar study before. I hope this works.
Settings -> Technical -> Automatic Actions
Python Code
if record.mobile != False:
partner = env['res.partner'].search([('mobile', '=', record.mobile)])
mobile = record.mobile
if partner:
record.update({'mobile': ''})
raise Warning("Change, please"% mobile)
Thank you, best regards.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Aug 24
|
229 | ||
|
2
Apr 23
|
1621 | ||
|
1
Jan 22
|
1415 | ||
|
4
Oct 19
|
6116 | ||
|
1
Dec 24
|
31 |
If you want to prevent duplicate mobile numbers, this answer should help you to find the solution:
https://www.odoo.com/forum/help-1/question/how-can-i-prevent-users-from-entering-duplicate-vendors-based-on-name-only-134963#answer-134964
Thanks Chris. Instead we embedded python code, do we have other ways that end-user could define them?
Perhaps one of those apps - https://apps.odoo.com/apps/modules/13.0/crm_duplicates/ ; https://apps.odoo.com/apps/modules/13.0/partner_duplicates/; might be of use for you
End users cannot define it, but Automated Actions (as per Ray's solution) allow you to add this checking on an Odoo online database (no customization, no third-party apps).