Maxime Chambreuil
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
5 deletions
-
agreement/models/agreement_appendix.py
|
@ -62,11 +62,11 @@ class AgreementAppendix(models.Model): |
|
|
if self.field_id and self.field_id.relation: |
|
|
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] |
|
|
if self.sub_model_object_field_id: |
|
|
|
|
|
self.copyvalue = "${object.%s.%s or %s}" %\ |
|
|
|
|
|
(self.field_id.name, |
|
|
|
|
|
self.sub_model_object_field_id.name, |
|
|
|
|
|
self.default_value or '\'\'') |
|
|
|
|
|
|
|
|
if self.sub_model_object_field_id: |
|
|
|
|
|
self.copyvalue = "${object.%s.%s or %s}" %\ |
|
|
|
|
|
(self.field_id.name, |
|
|
|
|
|
self.sub_model_object_field_id.name, |
|
|
|
|
|
self.default_value or '\'\'') |
|
|
|
|
|
|
|
|
# compute the dynamic content for mako expression |
|
|
# compute the dynamic content for mako expression |
|
|
@api.multi |
|
|
@api.multi |
|
|