[FIX] agreement: Issue #290

This commit is contained in:
Maxime Chambreuil
2019-03-27 12:47:02 -06:00
parent ab320ddf79
commit a118dc7141
4 changed files with 4 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ class AgreementAppendix(models.Model):
@api.onchange('field_id')
def onchange_sub_object_id(self):
if self.field_id:
if self.field_id and self.field_id.relation:
self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0]