[FIX] account,mail: fix no depends not computing field
Computed fields with no depends are not computed before record creation rendering those fields empty instead of being computed on the first request. By adding a depends (the field does not actually depend on it) the field is computed correctly and may be used directly. TaskId-2647225 closes odoo/odoo#76744 X-original-commit: f03e74317a40957a355235b92dacff6310fbdd5b Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -323,6 +323,7 @@ class AccountJournal(models.Model):
|
||||
else:
|
||||
journal.suspense_account_id = False
|
||||
|
||||
@api.depends('name')
|
||||
def _compute_alias_domain(self):
|
||||
self.alias_domain = self.env["ir.config_parameter"].sudo().get_param("mail.catchall.domain")
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ class Alias(models.Model):
|
||||
alias.alias_name,
|
||||
))
|
||||
|
||||
@api.depends('alias_name')
|
||||
def _compute_alias_domain(self):
|
||||
self.alias_domain = self.env["ir.config_parameter"].sudo().get_param("mail.catchall.domain")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user