|
@ -117,7 +117,7 @@ class wizard(models.TransientModel): |
|
|
break |
|
|
break |
|
|
if contact_field: |
|
|
if contact_field: |
|
|
domain['res_id'] = [(contact_field, '=', self.partner_id.id)] |
|
|
domain['res_id'] = [(contact_field, '=', self.partner_id.id)] |
|
|
if self.model and self.partner_id: |
|
|
|
|
|
|
|
|
if self.model: |
|
|
res_id = self.env[self.model].search(domain['res_id'], order='id desc', limit=1) |
|
|
res_id = self.env[self.model].search(domain['res_id'], order='id desc', limit=1) |
|
|
self.res_id = res_id and res_id[0].id |
|
|
self.res_id = res_id and res_id[0].id |
|
|
else: |
|
|
else: |
|
|