You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Savoir-faire Linux
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp import fields, models
  5. class EmailTemplateReportLine(models.Model):
  6. """Email Template Report Line"""
  7. _name = 'email.template.report.line'
  8. _description = __doc__
  9. template_id = fields.Many2one(
  10. 'email.template', string='Email Template'
  11. )
  12. report_name = fields.Char(
  13. 'Report Filename', translate=True,
  14. help="Name to use for the generated report "
  15. "file (may contain placeholders)\n"
  16. "The extension can be omitted and will then come from the report type."
  17. )
  18. condition = fields.Char(
  19. 'Condition',
  20. help="An expression evaluated to determine if the report is "
  21. "to be attached to the email. If blank, the report will always be "
  22. "attached."
  23. )
  24. report_template_id = fields.Many2one(
  25. 'ir.actions.report.xml',
  26. 'Optional report to print and attach',
  27. domain=[('report_type', 'in', ['qweb-html', 'qweb-pdf'])],
  28. )