Skip to content
Browse files

[IMP] base: add more information if KeyError

During a migration process or developpment if a deps is wrong, it is hard to find where is issue come.
  • Loading branch information...
fmdl committed Mar 19, 2019
1 parent 3cbb8d5 commit cd84d74b03a563eec2e0b79ff900055ebb98d57f
Showing with 3 additions and 1 deletion.
  1. +3 −1 odoo/
@@ -705,7 +705,9 @@ def resolve_deps(self, model, path0=[], seen=frozenset()):
_logger.warning("Field %s depends on itself; please fix its decorator @api.depends().", self)
model, path = model0, path0
for fname in dotnames.split('.'):
field = model._fields[fname]
field = model._fields.get('fname', None)
if field is None:
raise KeyError("Field : %s, wrong field '%s' of this deps : '%s'." % (self, fname, dotnames)
result.append((model, field, path))
model = model0.env.get(field.comodel_name)
path = None if path is None else path + [fname]

0 comments on commit cd84d74

Please sign in to comment.
You can’t perform that action at this time.