Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Partner unicity

by
Alexinux, Alexis de Lattre
- 17/04/2018 20:03:21


2018-04-17 19:51 GMT+02:00 Alexis de Lattre <alexis.delattre@akretion.com>:
One point you have not mentionned is the "ref" field. I find it useful
to have it unique (but it can't be used to deduplicate and it is not
required). I've often made this field an accounting field copied on
contacts of a company.

For sure, the 'ref' field should be unique. I have a small usability module that adds this (https://github.com/akretion/odoo-usability/blob/10.0/base_partner_ref/partner.py), but we should have a module that adds the sql_constraint unique(ref) in OCA.

Answering to myself: there is already a module partner_ref_unique in the OCA for v9:
But it uses a python constraint instead of an SQL constraint, so I will probably not use it for perf reasons.

--
Alexis de Lattre
Akretion France - 35B rue Montgolfier - 69100 Villeurbanne - France

Reference