[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#58634 X-original-commit: 45cd13e14fef0bab6921a1fff79335df9015cbf0 Related: odoo/enterprise#13613 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -74,10 +74,9 @@
|
||||
|
||||
<t t-call="portal.portal_record_layout">
|
||||
<t t-set="card_header">
|
||||
<h5 class="mb-0 row">
|
||||
<small class="text-muted col-3 col-md-1">Project - </small>
|
||||
<span t-field="project.name" class="col-7 col-sm-9 text-truncate "/>
|
||||
<span class="col-2 text-center">
|
||||
<h5 class="mb-0">
|
||||
<span t-field="project.name" class="text-truncate"/>
|
||||
<span class="float-right">
|
||||
<a role="button" t-attf-href="/my/tasks?filterby=#{project.id}" class="btn btn-sm btn-secondary">
|
||||
<span class="fa fa-tasks" role="img" aria-label="Tasks" title="Tasks"/>
|
||||
<span t-esc="project.task_count" />
|
||||
|
||||
Reference in New Issue
Block a user