From d6c88b8809db5eec83bf3818391386d687f42340 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 21 Mar 2016 16:27:06 +0100 Subject: [PATCH] [FIX] account: filter out special periods Commit 7b7f3fa filters out the special periods. However, the filtering should be done only for the display in the form view, nto for the reporting which is actually correct. opw-672531 --- addons/account/account.py | 2 +- addons/account/account_invoice_view.xml | 3 ++- addons/account/account_view.xml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 306bb18fef9..da19fcf7197 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -314,7 +314,7 @@ class account_account(osv.osv): res = {} null_result = dict((fn, 0.0) for fn in field_names) if children_and_consolidated: - aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=dict(context or {}, periods_special=False)) + aml_query = self.pool.get('account.move.line')._query_get(cr, uid, context=context) wheres = [""] if query.strip(): diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 3be43cd00e9..71b6779178f 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -336,7 +336,8 @@ on_change="onchange_journal_id(journal_id)" options="{'no_create': True}" attrs="{'readonly':[('internal_number','!=',False)]}"/> + name="account_id" groups="account.group_account_user" + context="{'periods_special': False}"/>