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.

21 lines
661 B

  1. # Copyright 2019 Druidoo - Iván Todorovich
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from odoo import models, fields
  4. class PosConfig(models.Model):
  5. _inherit = 'pos.config'
  6. iface_invoice_mail = fields.Boolean('Send Invoice by Mail')
  7. invoice_mail_template_id = fields.Many2one(
  8. 'mail.template',
  9. string='Invoice Email Template',
  10. domain=[('model', '=', 'account.invoice')],
  11. context=lambda self: {
  12. 'default_model_id': self.ref('account.model_account_invoice').id,
  13. },
  14. default=lambda self:
  15. self.env.ref('account.email_template_edi_invoice', False),
  16. )