From b5ee7a5ab642637c06cf9660ca58229c6a66ec24 Mon Sep 17 00:00:00 2001 From: Yves Goldberg Date: Thu, 11 Apr 2019 09:51:47 -0500 Subject: [PATCH] Update agreement/models/agreement.py Co-Authored-By: max3903 --- agreement/models/agreement.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/agreement/models/agreement.py b/agreement/models/agreement.py index d9595e27..e96b303a 100644 --- a/agreement/models/agreement.py +++ b/agreement/models/agreement.py @@ -347,7 +347,12 @@ class Agreement(models.Model): if self.field_id and self.field_id.relation: self.sub_object_id = self.env['ir.model'].search( [('model', '=', self.field_id.relation)])[0] - if self.sub_model_object_field_id: + 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 '\'\'') + self.copyvalue = "${object.%s.%s or %s}" %\ (self.field_id.name, self.sub_model_object_field_id.name,