Skip to Content
Menu
This question has been flagged
4 Replies
7380 Views

Hello,

I have a problem in my community odoo 13 version, I want to avoid typing duplicate contacts.

If a contact already exists, that if we want to create the same contact, it blocks.

Does anyone know how I can do this?

King regards

Avatar
Discard
Author

Hello,

Thanks for your answers but I'm on the community v13 version and I don't have a studio.

Isn't there another way? 

King regards

https://apps.odoo.com/apps/modules/13.0/partner_duplicates/ - let define criteria to strictly forbid creating duplicates of contacts (or criteria just to warn about those)

Best Answer

You can create an automated action to prevent duplicates. The point is to know when a record is a duplicate (same reference, same name?) 
Here is a good example https://odootricks.tips/automated-action-to-prevent-duplicates/ 

Avatar
Discard

What is the python code for the automated action to prevent a user who signs up online and enters an email address that already exists in the contacts?

Best Answer

 you can create an automated action (using studio for instance)

there you setup the filters which suits your needs

anf finally you add the following code within the python window

exists = env['res.partner'].search([('name' , 'ilike' , object.name),('supplier','=',True),('id','!=',object.id)])
if exists:
  raise Warning('ce fournisseur "' + object.name + '" a déjà un enregistrement!')

Avatar
Discard

Hi! Note that you don't need Studio to setup an automated action. You only need to set developer mode, and then go to the menu Automated Actions in Settings / Technical.

Regards

Please avoid such offensive formatting, the default is good enough.

Best Answer

Hi, 

I want to avoid the duplication using the Identification Type Number and the Identification Number. But when I create a "child" contact of a contactad that I already have, Odoo tell me that I am duplicating because this new contact receive the same tax id.

Avatar
Discard
Best Answer

Hello 

You may like our apps for remove duplicate data from table.

https://apps.odoo.com/apps/modules/11.0/eq_merge_duplicate_data_extended/

Avatar
Discard