| Availability | 
                         
                            
                             Odoo Online
                             
                             Odoo.sh 
                             On Premise 
                         | 
                
| Lines of code | 140 | 
| Technical Name | 
                    cml_unique_field_restrictions | 
                
| License | AGPL-3 | 
| Website | https://www.bitodoo.com | 
| Versions | 14.0 15.0 16.0 17.0 18.0 | 
Unique values for any models
This module allows you to generate combinations of unique values per model
Configuration
* Select the model and the fields that should be unique in the records.
        Note
- The module will search the model if there is a record with the same values in the configured fields.
 - If there is a record with the same values, a warning will be displayed and will not allow the record to be created or updated.
 - If there is no record with the same values, it will allow the record to be created or updated.
 - If one or more companies are defined, the validation applies only to those companies.
 - If no company is defined, the validation affects all companies.
 
Example - create Contact (res.partner)
The fields have been configured as unique: 'name' and 'phone'.
the following partner has been created.
        A partner is created with the same data.
        you get a warning that a partner with the same data already exists
        Example - update Product (product.template)
The fields have been configured as unique: 'default_code'.
the following product has been created.
        A product is update with the same 'Internal Reference'.
        you get a warning that a product with the same data already exists
        
Please log in to comment on this module