Browse Source

[FIX] agreement: Issue #290

pull/293/head
Maxime Chambreuil 6 years ago
parent
commit
4bc9d0b159
  1. 2
      agreement/models/agreement.py

2
agreement/models/agreement.py

@ -336,7 +336,7 @@ class Agreement(models.Model):
@api.onchange('field_id') @api.onchange('field_id')
def onchange_sub_object_id(self): 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( self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0] [('model', '=', self.field_id.relation)])[0]

Loading…
Cancel
Save