summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2020-07-23 14:09:50 +0000
committerVictor Feyens <vfe@odoo.com>2020-07-23 16:18:11 +0000
commitc69a092b98ad7a7f8e03024d170efa30038c89a0 (patch)
tree3c2eecc54345d7a29ec631c3077e8f92477b48f8 /doc/reference
parent8528f45997e824bb28b9af6df46ad8a1a80f0fd3 (diff)
[IMP] doc: _inherits usage warnings
The delegation inheritance is very useful in some cases, but its usage shouldn't be encouraged. Furthermore, chained _inherits may result in unexpected behavior/results, and really shouldn't be used. closes odoo/odoo#54864 X-original-commit: 4a06a4c79e962906832f98147fe87a2c19efaa75 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/orm.rst12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst
index b6161c7f88b..d705565b642 100644
--- a/doc/reference/orm.rst
+++ b/doc/reference/orm.rst
@@ -954,8 +954,10 @@ will yield:
:language: text
:lines: 13
-.. note:: it will also yield the various :ref:`automatic fields
- <reference/fields/automatic>` unless they've been disabled
+.. note::
+
+ It will also yield the various :ref:`automatic fields
+ <reference/fields/automatic>` unless they've been disabled
Delegation
----------
@@ -994,6 +996,12 @@ and it's possible to write directly on the delegated field:
.. warning:: when using delegation inheritance, methods are *not* inherited,
only fields
+.. warning::
+
+ * `_inherits` is more or less implemented, avoid it if you can;
+ * chained `_inherits` is essentially not implemented, we cannot guarantee anything on the final behavior.
+
+
Fields Incremental Definition
-----------------------------