From e269b49f8436ac917b0fae3276766dd43f21970b Mon Sep 17 00:00:00 2001 From: houssine Date: Mon, 15 Apr 2019 13:43:38 +0200 Subject: [PATCH] [FIX] fix the logo display in the mail template --- easy_my_coop/data/mail_template_data.xml | 14 +++++++------- easy_my_coop/models/company.py | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/easy_my_coop/data/mail_template_data.xml b/easy_my_coop/data/mail_template_data.xml index ba772e6..be29a3e 100644 --- a/easy_my_coop/data/mail_template_data.xml +++ b/easy_my_coop/data/mail_template_data.xml @@ -50,7 +50,7 @@ %endif
- +
]]> @@ -102,7 +102,7 @@ %endif
- +
]]> @@ -156,7 +156,7 @@ %endif
- +
]]> @@ -211,7 +211,7 @@ %endif
- +
]]> @@ -265,7 +265,7 @@ %endif
- +
]]> @@ -319,7 +319,7 @@ %endif
- +
]]> @@ -373,7 +373,7 @@ %endif
- +
]]> diff --git a/easy_my_coop/models/company.py b/easy_my_coop/models/company.py index 5c8b9fe..95c8db3 100644 --- a/easy_my_coop/models/company.py +++ b/easy_my_coop/models/company.py @@ -5,6 +5,10 @@ from openerp import fields, models class ResCompany(models.Model): _inherit = 'res.company' + def _get_base_logo(self): + base_url = self.env['ir.config_parameter'].get_param('web.base.url') + self.logo_url = base_url + "/logo.png" + coop_email_contact = fields.Char(string="Contact email address for the" " cooperator") subscription_maximum_amount = fields.Float(string="Maximum authorised" @@ -38,3 +42,5 @@ class ResCompany(models.Model): display_logo2 = fields.Boolean(string="Display logo 2") bottom_logo1 = fields.Binary(string="Bottom logo 1") bottom_logo2 = fields.Binary(string="Bottom logo 2") + logo_url = fields.Char(string="logo url", + compute="_get_base_logo")