Skip to content

Commit 788ed4e

Browse files
committed
[IMP] orm: add warning about model extension
When a model is defined with `_inherit` using a list, Odoo will do a check with the class name to set the `_name` of the model being extended. This is different than the previous versions and can be misleading
1 parent 5b9155d commit 788ed4e

File tree

1 file changed

+3
-0
lines changed
  • content/developer/reference/backend

1 file changed

+3
-0
lines changed

content/developer/reference/backend/orm.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,9 @@ will yield::
12491249

12501250
{'name': "A", 'description': "Extended"}
12511251

1252+
.. warning:: When :attr:`~odoo.models.Model._inherit` is set to a string,
1253+
then :attr:`~odoo.models.Model._name` is set to the same value,
1254+
unless `_name` is explicitly set.
12521255

12531256
.. note::
12541257

0 commit comments

Comments
 (0)