[FIX] hr_expense,crm: save alias domain on settings

Before this commit, the external email settings were saved but the
alias domain model was empty. This was caused by this field being
editable in mail module, but readonly in hr_expense and crm_module.

This commit fixes the issue by force saving the readonly fields, so
that they are stored in database and non-empty after save.

Task-ID 2047446

closes odoo/odoo#35589

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sapan Zaveri
2019-08-20 13:52:34 +00:00
committed by Alexandre Kühn
parent e03c1a836f
commit e8544f2f0f
2 changed files with 2 additions and 2 deletions
@@ -39,7 +39,7 @@
<field name="crm_alias_prefix" class="oe_inline"
attrs="{'required': [('generate_lead_from_alias', '=', True)]}"/>
<label for="alias_domain" string="@"/>
<field name="alias_domain" readonly="1" class="oe_inline"/>
<field name="alias_domain" readonly="1" force_save="1" class="oe_inline"/>
</div>
<div attrs="{'invisible': [('alias_domain', 'not in', ['localhost', '', False])]}">
<button type="action"
@@ -25,7 +25,7 @@
<label for="expense_alias_prefix" string="Email Alias" class="o_light_label"/>
<field name="expense_alias_prefix" class="oe_inline"/>
<span>@</span>
<field name="alias_domain" class="oe_inline" readonly="1"/>
<field name="alias_domain" class="oe_inline" readonly="1" force_save="1"/>
</div>
</div>
<div class="content-group" attrs="{'invisible': ['|', ('use_mailgateway', '=', False), ('alias_domain', 'not in', ['localhost', '', False])]}">