Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
If I make the field phone unique via sql_constraints in res.partner and crm.leads, what will happen if I attempt to import a list that has one or more existing leads/customers phone numbers in it? Will this throw an error or skip the record all together? If so is there a simple work around for this? The deduplicate leads module does not include phone numbers and I can't imagine why? Does any company in the world want multiple leads/customers with the same phone number?
I am playing wirth this now and thought I should ask before making the changes and wasting my time creating another issue.
To quote the ever knowledgable Ray Carnes:
If there is already data in the system that violates the constraint, it won't work - because it can't be applied.
The constraint has to be for all records - those that already exist, those that will be added via your module, and those that will be added by other modules.
See this link on the forum to see this in context. Where kaynis was having a problem with his constraint.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/17/15, 10:01 PM|
|Seen: 963 times|
|Last updated: 7/13/16, 8:43 AM|