콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
5 답글
4064 화면

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
7월 25
1641
2
4월 23
3521
1
1월 22
2712
4
10월 19
7879
1
9월 25
413