Files
odoo_source/addons/sms/models/mail_notification.py
T
Rémi Rahir 7287800101 [IMP] sms: Add new failure status for unregistered accounts
Since January 2020, users are required to validate their IAP account via
SMS code validation. This new behaviour needed to be properly ported to
the client to correctly inform the user.

This commit adds support of a new failure_type: 'Unregistered Account'.

Task #2209567

closes odoo/odoo#48512

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-12 16:39:40 +00:00

22 lines
752 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class MailNotification(models.Model):
_inherit = 'mail.notification'
notification_type = fields.Selection(selection_add=[
('sms', 'SMS')
], ondelete={'sms': 'set default'})
sms_id = fields.Many2one('sms.sms', string='SMS', index=True, ondelete='set null')
sms_number = fields.Char('SMS Number')
failure_type = fields.Selection(selection_add=[
('sms_number_missing', 'Missing Number'),
('sms_number_format', 'Wrong Number Format'),
('sms_credit', 'Insufficient Credit'),
('sms_server', 'Server Error'),
('sms_acc', 'Unregistered Account')
])