diff options
| author | ryv-odoo <ryv@odoo.com> | 2019-11-29 12:46:24 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-04-17 06:51:06 +0000 |
| commit | 4385ed024e9ce9bfa9f733c30cc163d2f10bfd60 (patch) | |
| tree | da0b86b8279ec997b1f16da1a2bdb2f430f9a748 | |
| parent | e3189298cb4dbf86692195de148fb4d7ccad82e1 (diff) | |
[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 at 052f2ace57e20f06980bc8fadf37b32be1921420 . 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 at 029d1baf359eabb7ed531287f3cb2b3b8d586d39 . 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>
| -rw-r--r-- | addons/mail/models/res_users.py | 9 | ||||
| -rw-r--r-- | addons/mail/views/res_users_views.xml | 4 | ||||
| -rw-r--r-- | addons/mail_bot/views/res_users_views.xml | 2 |
3 files changed, 3 insertions, 12 deletions
diff --git a/addons/mail/models/res_users.py b/addons/mail/models/res_users.py index 58037fe43b8..64e0d1cd746 100644 --- a/addons/mail/models/res_users.py +++ b/addons/mail/models/res_users.py @@ -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 diff --git a/addons/mail/views/res_users_views.xml b/addons/mail/views/res_users_views.xml index c2d3d9ce825..f402858a1b5 100644 --- a/addons/mail/views/res_users_views.xml +++ b/addons/mail/views/res_users_views.xml @@ -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> diff --git a/addons/mail_bot/views/res_users_views.xml b/addons/mail_bot/views/res_users_views.xml index f82b2b96f72..36bb1abf22c 100644 --- a/addons/mail_bot/views/res_users_views.xml +++ b/addons/mail_bot/views/res_users_views.xml @@ -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> |
