[REM] mail: remove leftover mail alias fields from res.users
A mail alias is still linked with the res.users model with 2 fields, alias_id and alias_contact (related). It is not used anymore. We can therefore remove those fields. Aliases were added at052f2ace57. Purpose was to be able to discuss with users directly using Odoo as a mailbox. However it was not usable and was quickly deactivated. Aliases on res.users was removed at029d1baf35. It was decided at that time to not support alias on users anymore as it was creating more issues than adding communication facility. This commit finally removes the unused fields. If necessary in some custom flow they can always be added through studio. LINKS Task ID 1919277 Community PR odoo/odoo#41160 Enterprise PR odoo/enterprise#6983 Upgrade PR odoo/upgrade#872 Co-Authored-By: Rémy Voet <ryv@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
This commit is contained in:
committed by
Thibault Delavallée
co-authored by
Thibault Delavallée
parent
e3189298cb
commit
4385ed024e
@@ -18,11 +18,6 @@ class Users(models.Model):
|
||||
_inherit = ['res.users']
|
||||
_description = 'Users'
|
||||
|
||||
alias_id = fields.Many2one('mail.alias', 'Alias', ondelete="set null", required=False,
|
||||
help="Email address internally associated with this user. Incoming "\
|
||||
"emails will appear in the user's notifications.", copy=False, auto_join=True)
|
||||
alias_contact = fields.Selection(
|
||||
string='Alias Contact Security', related='alias_id.alias_contact', readonly=False)
|
||||
notification_type = fields.Selection([
|
||||
('email', 'Handle by Emails'),
|
||||
('inbox', 'Handle in Odoo')],
|
||||
@@ -64,8 +59,8 @@ GROUP BY channel_moderator.res_users_id""", [tuple(self.ids)])
|
||||
|
||||
def __init__(self, pool, cr):
|
||||
""" Override of __init__ to add access rights on notification_email_send
|
||||
and alias fields. Access rights are disabled by default, but allowed
|
||||
on some specific fields defined in self.SELF_{READ/WRITE}ABLE_FIELDS.
|
||||
fields. Access rights are disabled by default, but allowed on some
|
||||
specific fields defined in self.SELF_{READ/WRITE}ABLE_FIELDS.
|
||||
"""
|
||||
init_res = super(Users, self).__init__(pool, cr)
|
||||
# duplicate list to avoid modifying the original reference
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
<field name="signature" position="before">
|
||||
<field name="notification_type" widget="radio"/>
|
||||
</field>
|
||||
<field name="signature" position="before">
|
||||
<field name="alias_id"/>
|
||||
<field name="alias_contact" attrs="{'invisible': [('alias_id', '=', False)]}"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="inherit_id" ref="mail.view_users_form_mail"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="alias_contact" position="after">
|
||||
<field name="signature" position="before">
|
||||
<field name="odoobot_state" readonly="0" groups="base.group_no_one"/>
|
||||
</field>
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user