Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2552 มุมมอง

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!"), ] 
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
เม.ย. 25
1241
1
ม.ค. 25
1896
1
ส.ค. 24
2016
2
พ.ค. 24
1569
How to delete POS Sessions! Odoo 16 แก้ไขแล้ว
3
พ.ค. 24
11213