Hello everyone!
Someone who can help me remove a rule?
The case is that I want to eliminate the rule so that a barcode is not a unique field, that is, a barcode can be selected for more than one product.
Thanks for reading the message
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
Hi,
This constrain is added by sql constrains in product module.
_sql_constraints = [
('barcode_uniq', 'unique(barcode)', "A barcode can only be assigned to one product !"),
]
To override the above constrains, in your custom module, inherit the product model and add the below constrains.
_sql_constraints = [
('barcode_uniq', 'CHECK(1=1)', "A barcode can only be assigned to one product !"),
]
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
0
de febr. 25
|
1262 | ||
|
0
de des. 24
|
46 | ||
|
0
de des. 24
|
1157 | ||
|
1
d’oct. 24
|
2440 | ||
|
2
d’ag. 24
|
1647 |