[FIX] account: traceback on clicking journal in account dashboard
before this commit, on clicking the bank journal in ce,
is showing traceback.
traceback:
action['domain'] = (action['domain'] or []) + [('journal_id', '=', self.id)]
TypeError: can only concatenate str (not "list") to str
after this commit, on clicking no traceback wont be shown
and corresponding action will get open
closes odoo/odoo#129439
X-original-commit: bbcb925f88cbdc34532894918e50fd11afe7a95d
Signed-off-by: John Laterre (jol) <jol@odoo.com>
This commit is contained in:
@@ -679,15 +679,15 @@ class account_journal(models.Model):
|
||||
|
||||
# Override the domain only if the action was not explicitly specified in order to keep the
|
||||
# original action domain.
|
||||
if action.get('domain') and isinstance(action['domain'], str):
|
||||
action['domain'] = ast.literal_eval(action['domain'] or '[]')
|
||||
if not self._context.get('action_name'):
|
||||
if self.type == 'sale':
|
||||
action['domain'] = [(domain_type_field, 'in', ('out_invoice', 'out_refund', 'out_receipt'))]
|
||||
elif self.type == 'purchase':
|
||||
action['domain'] = [(domain_type_field, 'in', ('in_invoice', 'in_refund', 'in_receipt', 'entry'))]
|
||||
elif action['domain']:
|
||||
action['domain'] = ast.literal_eval(action['domain'])
|
||||
|
||||
action['domain'] = (action['domain'] or []) + [('journal_id', '=', self.id)]
|
||||
action['domain'] = action['domain'] + [('journal_id', '=', self.id)]
|
||||
return action
|
||||
|
||||
def open_spend_money(self):
|
||||
|
||||
Reference in New Issue
Block a user