تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5 الردود
3815 أدوات العرض

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?  

الصورة الرمزية
إهمال
الكاتب

Thanks Chris. Instead we embedded python code, do we have other ways that end-user could define them?

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).

أفضل إجابة

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.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 25
1395
2
أبريل 23
3194
1
يناير 22
2471
4
أكتوبر 19
7668
1
أغسطس 25
97