Would like to ask any solutions for prevent duplicates in DB to format the API call?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Would like to ask any solutions for prevent duplicates in DB to format the API call?
Use SQL constraints on model
class PosOrder(models.Model):
_inherit = "pos.order"
_sql_constraints = [('name_uniq', 'unique (name)', "Order with this name already exists!"), ]
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
3
4月 25
|
1221 | ||
|
1
1月 25
|
1895 | ||
|
1
8月 24
|
1996 | ||
|
2
5月 24
|
1565 | ||
|
3
5月 24
|
11196 |