How can I configure Odoo SaaS to not create a duplicate contact based on a criteria (such as email)?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
2089
أدوات العرض
You can override create method like:
class Contacts(models.Model):
_inherit = 'res.partner'
@api.model
def create(self, vals_list):
email = vals_list.get('email', None)
if email:
partner = self.env['res.partner'].search([('email', '=', email)], limit=1)
if partner:
raise ValidationError('User already exists.')
return super(Contacts, self).create(vals_list)
Hello Arian,
Thank you for your response. I must mention that I am using Odoo SaaS. Do you have a solution for this version?
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
0
أبريل 22
|
2359 | ||
|
2
ديسمبر 24
|
1198 | ||
|
1
مارس 24
|
1327 | ||
|
2
أغسطس 24
|
3593 | ||
|
2
يوليو 25
|
2598 |