Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
10011 มุมมอง

Is there a way to delete all duplicates entries form the CRM customer table?

I imported a csv file into customers but at the end of the process it throw me an error so I tried again. When I looked into my customer directy they were all there but duplicate. is there a way to delete the duplicate or empty the table and start do a new import?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

It seem that this module - https://apps.odoo.com/apps/modules/9.0/crm_duplicates/ - would be of use

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, I think it will better open pgadmin and look your duplicate customer

SELECT name FROM res_partner GROUP By name HAVING ( COUNT(*) > 1 )

then you will find all the customer which is more then one in entry in customer table, and after this go in relevant python file of customer and put _sql_constraint for name or name or code combination so next time when you upload or create the same entry it will give a pop-up and will be not allowed to enter duplicate customer name.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Understood. Thanks!

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You have to do it manually or if you have access to postgresql you can make a SQL sentence to delete all the table

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 24
196
2
เม.ย. 18
6265
1
มี.ค. 15
3363
1
พ.ย. 23
2038
0
ธ.ค. 21
2352