跳至內容
選單
此問題已被標幟
5 回覆
3333 瀏覽次數

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
8月 24
806
2
4月 23
2480
1
1月 22
2033
4
10月 19
7115
3
5月 25
265