Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
5 Antworten
3873 Ansichten

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?  

Avatar
Verwerfen
Autor

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

Beste Antwort

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.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juli 25
1459
2
Apr. 23
3300
1
Jan. 22
2509
4
Okt. 19
7726
3
Aug. 25
243