diff options
| author | Yannick Tivisse <yti@odoo.com> | 2018-09-21 13:24:16 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2018-09-21 16:13:59 +0200 |
| commit | 9e3a2eff61e00343308dbc847ee8e1fb545fce22 (patch) | |
| tree | d3a99796e5ea8d125f2684b68b8dcb3ccf84873b | |
| parent | c67ac34ee47567d1443fb602f8ea474175af9cd8 (diff) | |
[IMP] models.py: Log a warning if no '_description' is set on model
| -rw-r--r-- | odoo/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/models.py b/odoo/models.py index 47efe47d164..d36624f258a 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -519,6 +519,8 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): for base in reversed(cls.__bases__): if not getattr(base, 'pool', None): # the following attributes are not taken from model classes + if not base._inherit and not base._description: + _logger.warning("The model %s has no _description", cls._name) cls._description = base._description or cls._description cls._table = base._table or cls._table cls._sequence = base._sequence or cls._sequence |
