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:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
2513
查看
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
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
0
2月 25
|
1311 | ||
|
0
12月 24
|
46 | ||
|
0
12月 24
|
1189 | ||
|
1
10月 24
|
2482 | ||
|
2
8月 24
|
1676 |