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
|
723 | ||
|
1
1月 25
|
1639 | ||
|
1
8月 24
|
1526 | ||
|
2
5月 24
|
1240 | ||
|
3
5月 24
|
10361 |