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.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 1/17/15, 10:01 PM|
|Seen: 649 times|
|Last updated: 7/13/16, 8:43 AM|