[ADD] account: allow filtering moves on account_ids throught context

The check register report is the same as the general ledger except it only displays
account in type cash. On report, a "totals" line appears when only one journal is selected
but it's value is computed based on the whole accounts without filtering. Then, we need a
way to compute this totals only based on specific accounts

task: https://www.odoo.com/web#id=28656&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
This commit is contained in:
Laurent Smet
2017-07-13 12:04:51 +02:00
committed by qdp-odoo
parent bb908979e9
commit 93be8cdc2d
+3
View File
@@ -1400,6 +1400,9 @@ class AccountMoveLine(models.Model):
if context.get('account_tag_ids'):
domain += [('account_id.tag_ids', 'in', context['account_tag_ids'].ids)]
if context.get('account_ids'):
domain += [('account_id', 'in', context['account_ids'].ids)]
if context.get('analytic_tag_ids'):
domain += ['|', ('analytic_account_id.tag_ids', 'in', context['analytic_tag_ids'].ids), ('analytic_tag_ids', 'in', context['analytic_tag_ids'].ids)]