Skip to content

Commit

Permalink
Merge PR #108 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by hparfr
  • Loading branch information
shopinvader-git-bot committed Apr 17, 2024
2 parents 63ac142 + 7a697c0 commit 507004f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pattern_import_export/models/ir_exports_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ def _get_last_relation_field(self, model, path, level=1):
if path:
next_model = self.env[model]._fields[field]._related_comodel_name
next_field = path.split("/", 1)[0]
if self.env[next_model]._fields[next_field]._related_comodel_name:
if (
next_model
and self.env[next_model]._fields[next_field]._related_comodel_name
):
return self._get_last_relation_field(next_model, path, level=level + 1)
return field, model, level

Expand Down

0 comments on commit 507004f

Please sign in to comment.