The purpose is to have more common code for failure and notifications, with less override in `sms` and `snailmail`. task-2176017 closes odoo/odoo#44170 Related: odoo/enterprise#9140 Related: odoo/upgrade#918 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
19 lines
719 B
Python
19 lines
719 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class Notification(models.Model):
|
|
_inherit = 'mail.notification'
|
|
|
|
notification_type = fields.Selection(selection_add=[('snail', 'Snailmail')], ondelete={'snail': 'cascade'})
|
|
letter_id = fields.Many2one('snailmail.letter', string="Snailmail Letter", index=True, ondelete='cascade')
|
|
failure_type = fields.Selection(selection_add=[
|
|
('sn_credit', "Snailmail Credit Error"),
|
|
('sn_trial', "Snailmail Trial Error"),
|
|
('sn_price', "Snailmail No Price Available"),
|
|
('sn_fields', "Snailmail Missing Required Fields"),
|
|
('sn_format', "Snailmail Format Error"),
|
|
('sn_error', "Snailmail Unknown Error"),
|
|
])
|