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:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
2038
Vistas
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?
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
abr 22
|
2305 | ||
|
2
dic 24
|
1122 | ||
|
1
mar 24
|
1237 | ||
|
2
ago 24
|
3518 | ||
|
2
jul 25
|
2469 |