I have two separate models which have both a field that connects to the other.
class Foo():
__name__ = 'foo.foo'
bar = fields.Many2One('bar.bar', 'Bar')
class Bar():
__name__ = 'bar.bar'
foo = fields.Many2One('foo.foo', 'Foo')
When I fill the foo
-field I want to automatically fill the bar
-field. To do that I want to use an One2One relation. According the documentation and looking into the tests
directory it seems to me that the behavior is the same as with a Many2Many
relation. So an new table is needed for the Many2One
fields and on both classes the field has to be changed.
The question is on which model to place the One2One field? Or can both models have an One2One field?