Skip to content
Permalink
Browse files

[FIX] base: add more information if wrong related field

  • Loading branch information...
fmdl committed Mar 18, 2019
1 parent 9a8f59a commit 7107d7b2c7ea3866cc85697199440e9853b71aec
Showing with 4 additions and 1 deletion.
  1. +4 −1 odoo/fields.py
@@ -524,7 +524,10 @@ def _setup_related_full(self, model):
# determine the chain of fields, and make sure they are all set up
target = model
for name in self.related:
field = target._fields[name]
field = target._fields.get(name, None)
if field is None:
raise KeyError("Wrong related field, '%s', relation : '%s', this field doesn't exist : '%s'"
% (self, '.'.join(self.related), name))
field.setup_full(target)
target = target[name]

0 comments on commit 7107d7b

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