Skip to content
Permalink
Browse files

[FIX] account: wrong domain from dashboard to go to reconcile model

The domain by default when clicking a button on the dashboard is
`('journal_id', '=', self.id)` but in this case, the field is not
`journal_id` but `match_journal_id`
  • Loading branch information...
william-andre committed Nov 7, 2019
1 parent f183f74 commit acec00ae862d34f6e6f89b6934c41111f19bb6e7
@@ -433,7 +433,8 @@ def open_action_with_context(self):
[action] = self.env[model].browse(action_id).read()
action['context'] = ctx
if ctx.get('use_domain', False):
action['domain'] = ['|', ('journal_id', '=', self.id), ('journal_id', '=', False)]
journal_field = ctx.get('journal_field', 'journal_id')
action['domain'] = ['|', (journal_field, '=', self.id), (journal_field, '=', False)]
action['name'] += ' for journal ' + self.name
return action

@@ -107,7 +107,7 @@
<span role="separator">Reconciliation</span>
</div>
<div>
<a role="menuitem" type="object" name="open_action_with_context" context="{'action_name': 'action_account_reconcile_model', 'use_domain': True}" groups="account.group_account_manager">Reconciliation Models</a>
<a role="menuitem" type="object" name="open_action_with_context" context="{'action_name': 'action_account_reconcile_model', 'use_domain': True, 'journal_field': 'match_journal_ids'}" groups="account.group_account_manager">Reconciliation Models</a>
</div>
</div>
</div>

0 comments on commit acec00a

Please sign in to comment.
You can’t perform that action at this time.