[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
This commit is contained in:
Nicolas Martinelli 2016-03-21 16:27:06 +01:00
parent 43445db7e4
commit d6c88b8809
3 changed files with 4 additions and 2 deletions

View File

@ -314,7 +314,7 @@ class account_account(osv.osv):
res = {} res = {}
null_result = dict((fn, 0.0) for fn in field_names) null_result = dict((fn, 0.0) for fn in field_names)
if children_and_consolidated: 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 = [""] wheres = [""]
if query.strip(): if query.strip():

View File

@ -336,7 +336,8 @@
on_change="onchange_journal_id(journal_id)" options="{'no_create': True}" on_change="onchange_journal_id(journal_id)" options="{'no_create': True}"
attrs="{'readonly':[('internal_number','!=',False)]}"/> attrs="{'readonly':[('internal_number','!=',False)]}"/>
<field domain="[('company_id', '=', company_id),('type','=', 'receivable')]" <field domain="[('company_id', '=', company_id),('type','=', 'receivable')]"
name="account_id" groups="account.group_account_user"/> name="account_id" groups="account.group_account_user"
context="{'periods_special': False}"/>
<label for="currency_id" groups="base.group_multi_currency"/> <label for="currency_id" groups="base.group_multi_currency"/>
<div groups="base.group_multi_currency"> <div groups="base.group_multi_currency">

View File

@ -247,6 +247,7 @@
<field name="view_mode">tree,form,graph</field> <field name="view_mode">tree,form,graph</field>
<field name="search_view_id" ref="view_account_search"/> <field name="search_view_id" ref="view_account_search"/>
<field name="view_id" ref="view_account_list"/> <field name="view_id" ref="view_account_list"/>
<field name="context">{'periods_special': False}</field>
<field name="help" type="html"> <field name="help" type="html">
<p class="oe_view_nocontent_create"> <p class="oe_view_nocontent_create">
Click to add an account. Click to add an account.