Odoo 14 EE
How to create a unique field in product.product
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- 專案管理
- MRP
此問題已被標幟
1
回覆
10391
瀏覽次數
Hi,
you can use SQL constraints option to specify rules for the data in a table.
If there is any violation between the constraint and the data action, the action is aborted by the constraint.
_sql_constraints = [
('name_uniq', 'unique (name)', "Tag already exists!"),
]
| 相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
|---|---|---|---|---|
|
|
1
11月 25
|
6055 | ||
|
|
1
6月 25
|
5906 | ||
|
|
3
7月 20
|
12732 | ||
|
|
0
11月 16
|
5205 | ||
|
|
1
8月 15
|
5522 |