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
回复
2109
查看
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
4月 22
|
2364 | ||
|
2
12月 24
|
1212 | ||
|
1
3月 24
|
1348 | ||
|
2
8月 24
|
3600 | ||
|
2
7月 25
|
2606 |