Files
odoo_source/addons/hr/models/mail_alias.py
T
Thibault Delavallée 76616dc888 [IMP] mail: improve default bounce message
Current bounce message is not very user friendly. Purpose of this commit
is to improve it, by improving wording and overall phrasing used in it.

Form view is improved so that bounce message takes all available width in
form view.

Some tests are added, notably to detect pseudo-void content from editor.

Task ID-2532529
PR odoo/odoo#71793

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-07 06:29:01 +00:00

18 lines
563 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, _
class Alias(models.Model):
_inherit = 'mail.alias'
alias_contact = fields.Selection(selection_add=[
('employees', 'Authenticated Employees'),
], ondelete={'employees': 'cascade'})
def _get_alias_contact_description(self):
if self.alias_contact == 'employees':
return _('addresses linked to registered employees')
return super(Alias, self)._get_alias_contact_description()