diff options
| author | mreficent <miquel.raich@eficent.com> | 2020-02-19 12:42:23 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-02-20 14:58:33 +0000 |
| commit | 3dffce34bf80c2a8d8682ef986d6daafa5bb0b7f (patch) | |
| tree | 3ec174f7aa3d672d07635d4f54401ff3d7fa3725 /addons/sms/wizard | |
| parent | 62c9227fdaac43329e48cd9446b40eee60dfeb1c (diff) | |
[IMP] fields: log warning for ignored selection
When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.
Log a warning and fix all fields badly definied
Closes odoo/odoo#45716
closes odoo/odoo#45832
Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/sms/wizard')
| -rw-r--r-- | addons/sms/wizard/sms_resend.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/addons/sms/wizard/sms_resend.py b/addons/sms/wizard/sms_resend.py index aad00074c67..4d747e38b63 100644 --- a/addons/sms/wizard/sms_resend.py +++ b/addons/sms/wizard/sms_resend.py @@ -12,11 +12,8 @@ class SMSRecipient(models.TransientModel): sms_resend_id = fields.Many2one('sms.resend', required=True) notification_id = fields.Many2one('mail.notification', required=True, ondelete='cascade') resend = fields.Boolean(string="Resend", default=True) - failure_type = fields.Selection([ - ('sms_number_missing', 'Missing Number'), - ('sms_number_format', 'Wrong Number Format'), - ('sms_credit', 'Insufficient Credit'), - ('sms_server', 'Server Error')], related='notification_id.failure_type', related_sudo=True, readonly=True) + failure_type = fields.Selection( + related='notification_id.failure_type', related_sudo=True, readonly=True) partner_id = fields.Many2one('res.partner', 'Partner', related='notification_id.res_partner_id', readonly=True) partner_name = fields.Char('Recipient', readonly='True') sms_number = fields.Char('Number') |
