diff options
| author | Thibault Delavallée <tde@odoo.com> | 2020-03-30 11:36:52 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-03-30 12:05:47 +0000 |
| commit | 92b176e89c4261bc7cc3b502eab8d308189b3e40 (patch) | |
| tree | bbfb60841ee99cde06c1fcc848fd7e91b31844ff | |
| parent | fba2f5d33105eb20a4c2689a1ddba97d50c47c40 (diff) | |
[FIX] maintenance: do not create random aliases
PURPOSE
Make aliases usage more unique, prevent re-using bounce or catchall aliases
and remove auto-uniqueness of aliases.
SPECIFICATION
Remove automatic aliases creation. Aliases should be created on demand with
real emails owned by users, not hidden in creation.
Task ID 2160070
| -rw-r--r-- | addons/maintenance/models/maintenance.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/maintenance/models/maintenance.py b/addons/maintenance/models/maintenance.py index c2f67db0412..4b8598796f4 100644 --- a/addons/maintenance/models/maintenance.py +++ b/addons/maintenance/models/maintenance.py @@ -64,8 +64,6 @@ class MaintenanceEquipmentCategory(models.Model): @api.model def create(self, vals): self = self.with_context(alias_model_name='maintenance.request', alias_parent_model_name=self._name) - if not vals.get('alias_name'): - vals['alias_name'] = vals.get('name') category_id = super(MaintenanceEquipmentCategory, self).create(vals) category_id.alias_id.write({'alias_parent_thread_id': category_id.id, 'alias_defaults': {'category_id': category_id.id}}) return category_id |
