[FIX]flake8 fixes

This commit is contained in:
Sandip Mangukiya
2018-12-21 01:13:07 -08:00
parent 56812369bc
commit 3fc4a1be86
5 changed files with 20 additions and 15 deletions

View File

@@ -40,7 +40,8 @@ class Agreement(models.Model):
track_visibility='onchange',
help="Description of the agreement"
)
dynamic_description = fields.Text(compute="_compute_dynamic_description",
dynamic_description = fields.Text(
compute="_compute_dynamic_description",
string="Dynamic Description",
help='compute dynamic description')
start_date = fields.Date(
@@ -332,8 +333,8 @@ class Agreement(models.Model):
MailTemplates = self.env['mail.template']
for agreement in self:
lang = agreement.partner_id.lang or 'en_US'
description = \
MailTemplates.with_context(lang=lang).render_template(
description = MailTemplates.with_context(
lang=lang).render_template(
agreement.description, 'agreement', agreement.id)
agreement.dynamic_description = description