diff options
| author | Bruno Paulino <bruno@woombikes.com> | 2018-10-02 19:23:16 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-10-30 16:09:21 +0000 |
| commit | 9e7d6a3e7e2e7a1712dfa752d0373dd7f098d220 (patch) | |
| tree | 0a7281d6922c233d8936f9dfe76059dd1a8f37c7 /doc/reference | |
| parent | 72cc07aae2fa2cf3219f5fca3d57d93c3381fe98 (diff) | |
[IMP] doc: add a more meaningful example
update Model Inheritance Delegation docs with a more meaningful example
Diffstat (limited to 'doc/reference')
| -rw-r--r-- | doc/reference/orm.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index 73b96552c21..260bf333b38 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -1033,7 +1033,9 @@ at runtime) but less power: using the :attr:`~odoo.models.Model._inherits` a model *delegates* the lookup of any field not found on the current model to "children" models. The delegation is performed via :class:`~odoo.fields.Reference` fields automatically set up on the parent -model: +model. The main difference is in the meaning. When using Delegation, the model +**has one** instead of **is one**, turning the relationship in a composition +instead of inheritance: .. literalinclude:: ../../odoo/addons/test_documentation_examples/delegation.py :language: python |
