summaryrefslogtreecommitdiff
path: root/addons/project/models
diff options
context:
space:
mode:
authorjdoutreloux <jud@odoo.com>2020-08-18 14:41:02 +0000
committerjdoutreloux <jud@odoo.com>2020-09-28 10:06:57 +0000
commit27a85263526ebf7621d5767939b984988f9352ba (patch)
tree03d2c11f7ef84ab643ef694c22b5dbf756a51daf /addons/project/models
parent27337bfa932411d9b746cbe56f03ba888538044e (diff)
[FIX] project : fix issue with alias and display issue in portal
When the alias had been set, if the user wanted to disable it he had to erase the email first. Otherwise unchecking the check box didn't work. Task-2299286 closes odoo/odoo#58571 X-original-commit: 45cd13e14fef0bab6921a1fff79335df9015cbf0 Related: odoo/enterprise#13583 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/project/models')
-rw-r--r--addons/project/models/project.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/project/models/project.py b/addons/project/models/project.py
index c75234eba9b..c59fcab8b97 100644
--- a/addons/project/models/project.py
+++ b/addons/project/models/project.py
@@ -265,6 +265,11 @@ class Project(models.Model):
if project.partner_id and project.partner_phone != project.partner_id.phone:
project.partner_id.phone = project.partner_phone
+ @api.onchange('alias_enabled')
+ def _onchange_alias_name(self):
+ if not self.alias_enabled:
+ self.alias_name = False
+
def _compute_alias_enabled(self):
for project in self:
project.alias_enabled = project.alias_domain and project.alias_id.alias_name