Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
3879 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ค. 25
1471
2
เม.ย. 23
3316
1
ม.ค. 22
2519
sale person who is not a user แก้ไขแล้ว
4
ต.ค. 19
7732
3
ส.ค. 25
314