mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] agreement: Issue #290
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user