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.

28 lines
684 B

  1. # Copyright 2018 Onestein
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import fields, models
  4. class IrAttachmentLanguage(models.Model):
  5. _name = 'ir.attachment.language'
  6. mail_template_id = fields.Many2one(
  7. comodel_name='mail.template',
  8. string='Template',
  9. required=True,
  10. ondelete='cascade',
  11. )
  12. lang = fields.Selection(
  13. selection=lambda self: self.env['res.lang'].get_installed(),
  14. string='Language',
  15. required=True,
  16. )
  17. attachment_id = fields.Many2one(
  18. comodel_name='ir.attachment',
  19. string='Attachment',
  20. required=True,
  21. ondelete='cascade',
  22. )