How Can I Setup One to One a relationship Between Two Models in odoo enterprise
And How Can I Setup Unique Constraint on a field in odoo enterprise
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How Can I Setup One to One a relationship Between Two Models in odoo enterprise
And How Can I Setup Unique Constraint on a field in odoo enterprise
Since you say "setup" and "configuration" - you can't do this in Odoo Studio - or with an Odoo Online Standard plan.
And in general: ORM of Odoo does not have a One2one relationship field type. What you usually would do is to create a Many2one on one model and a One2many relationship on the other model. Then, on that other model, you'd create a computed Many2one relationship back to the first model (<- this is the part you wouldn't be able to do in Studio).
When you want to develop in Odoo, you will not get around reading https://www.odoo.com/documentation/19.0/developer/reference/backend/orm.html as a whole.
Constrains are described here as well: https://www.odoo.com/documentation/19.0/developer/reference/backend/orm.html#constraints-and-indexes
class AModel(models.Model):
_name = 'a.model'
_my_check = models.Constraint("CHECK (x > y)", "x > y is not true")
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
oct 25
|
8 | ||
|
0
oct 25
|
123 | ||
|
0
oct 25
|
194 | ||
|
0
oct 25
|
3 | ||
Integracion de Rappy a Odoo
Resuelto
|
|
1
oct 25
|
241 |