Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2548 Vizualizări

Would like to ask any solutions for prevent duplicates in DB to format the API call? 

Imagine profil
Abandonează
Cel mai bun răspuns

Use SQL constraints on model


class PosOrder(models.Model):
_inherit = "pos.order"

    _sql_constraints = [('name_uniq', 'unique (name)', "Order with this name already exists!"), ] 
Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
apr. 25
1235
1
ian. 25
1895
1
aug. 24
2009
2
mai 24
1569
3
mai 24
11207