mail_notification.py 731 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. from odoo import fields, models
  3. class Notification(models.Model):
  4. _inherit = 'mail.notification'
  5. notification_type = fields.Selection(selection_add=[('snail', 'Snailmail')], ondelete={'snail': 'cascade'})
  6. letter_id = fields.Many2one('snailmail.letter', string="Snailmail Letter", index='btree_not_null', ondelete='cascade')
  7. failure_type = fields.Selection(selection_add=[
  8. ('sn_credit', "Snailmail Credit Error"),
  9. ('sn_trial', "Snailmail Trial Error"),
  10. ('sn_price', "Snailmail No Price Available"),
  11. ('sn_fields', "Snailmail Missing Required Fields"),
  12. ('sn_format', "Snailmail Format Error"),
  13. ('sn_error', "Snailmail Unknown Error"),
  14. ])