Browse Source

Fix minor issues

pull/74/head
dufresnedavid 9 years ago
parent
commit
ad9cb2078e
  1. 3
      email_template_multi_report/__openerp__.py
  2. 88
      email_template_multi_report/i18n/email_template_multi_report.pot
  3. 2
      email_template_multi_report/models/email_template.py

3
email_template_multi_report/__openerp__.py

@ -7,8 +7,7 @@
'version': '8.0.1.0.0', 'version': '8.0.1.0.0',
'category': 'Marketing', 'category': 'Marketing',
'summary': 'Multiple Reports in Email Templates', 'summary': 'Multiple Reports in Email Templates',
'author': 'Savoir-faire Linux',
'maintainer': 'Savoir-faire Linux,Odoo Community Association (OCA)',
'author': 'Savoir-faire Linux,Odoo Community Association (OCA)',
'website': 'http://www.savoirfairelinux.com', 'website': 'http://www.savoirfairelinux.com',
'license': 'AGPL-3', 'license': 'AGPL-3',
'depends': [ 'depends': [

88
email_template_multi_report/i18n/email_template_multi_report.pot

@ -1,88 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * email_template_multi_report
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-23 18:31+0000\n"
"PO-Revision-Date: 2016-06-23 18:31+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: email_template_multi_report
#: help:email.template.report.line,condition:0
msgid "An expression evaluated to determine if the report is to be attached to the email. If blank, the report will always be attached."
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,condition:0
msgid "Condition"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,create_uid:0
msgid "Created by"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,create_date:0
msgid "Created on"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,template_id:0
msgid "Email Template"
msgstr ""
#. module: email_template_multi_report
#: model:ir.model,name:email_template_multi_report.model_email_template_report_line
msgid "Email Template Report Line"
msgstr ""
#. module: email_template_multi_report
#: model:ir.model,name:email_template_multi_report.model_email_template
msgid "Email Templates"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,id:0
msgid "ID"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,write_uid:0
msgid "Last Updated by"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,write_date:0
msgid "Last Updated on"
msgstr ""
#. module: email_template_multi_report
#: help:email.template.report.line,report_name:0
msgid "Name to use for the generated report file (may contain placeholders)\n"
"The extension can be omitted and will then come from the report type."
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,report_template_id:0
msgid "Optional report to print and attach"
msgstr ""
#. module: email_template_multi_report
#: field:email.template,report_line_ids:0
msgid "Other Reports"
msgstr ""
#. module: email_template_multi_report
#: field:email.template.report.line,report_name:0
msgid "Report Filename"
msgstr ""

2
email_template_multi_report/models/email_template.py

@ -23,14 +23,12 @@ class EmailTemplate(models.Model):
template = self.browse(template_id) template = self.browse(template_id)
for report_line in template.report_line_ids: for report_line in template.report_line_ids:
records = self.env[template.model_id.model].browse(res_ids) records = self.env[template.model_id.model].browse(res_ids)
for rec in records: for rec in records:
condition = report_line.condition condition = report_line.condition
if condition and condition.strip(): if condition and condition.strip():
condition_result = self.render_template( condition_result = self.render_template(
condition, template.model, rec.id) condition, template.model, rec.id)

Loading…
Cancel
Save