diff --git a/addons/account/wizard/account_report_aged_partner_balance_view.xml b/addons/account/wizard/account_report_aged_partner_balance_view.xml
index 77ebf02570f..be1d710c09d 100644
--- a/addons/account/wizard/account_report_aged_partner_balance_view.xml
+++ b/addons/account/wizard/account_report_aged_partner_balance_view.xml
@@ -11,7 +11,8 @@
-
+
+
diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py
index 229ef3e4167..58f8c5dd959 100644
--- a/addons/account/wizard/account_report_common.py
+++ b/addons/account/wizard/account_report_common.py
@@ -34,7 +34,10 @@ class account_common_report(osv.osv_memory):
res = {}
if chart_account_id:
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
- res['value'] = {'company_id': company_id}
+ now = time.strftime('%Y-%m-%d')
+ domain = [('company_id', '=', company_id), ('date_start', '<', now), ('date_stop', '>', now)]
+ fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, domain, limit=1)
+ res['value'] = {'company_id': company_id, 'fiscalyear_id': fiscalyears and fiscalyears[0] or False}
return res
_columns = {
@@ -124,10 +127,11 @@ class account_common_report(osv.osv_memory):
now = time.strftime('%Y-%m-%d')
company_id = False
ids = context.get('active_ids', [])
- domain = [('date_start', '<', now), ('date_stop', '>', now)]
if ids and context.get('active_model') == 'account.account':
company_id = self.pool.get('account.account').browse(cr, uid, ids[0], context=context).company_id.id
- domain += [('company_id', '=', company_id)]
+ else: # use current company id
+ company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
+ domain = [('company_id', '=', company_id), ('date_start', '<', now), ('date_stop', '>', now)]
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, domain, limit=1)
return fiscalyears and fiscalyears[0] or False
diff --git a/addons/report_webkit/ir_report_view.xml b/addons/report_webkit/ir_report_view.xml
index e9f9ebd2234..37260628396 100644
--- a/addons/report_webkit/ir_report_view.xml
+++ b/addons/report_webkit/ir_report_view.xml
@@ -7,11 +7,14 @@
-
-
-
-
-
+
+
+
+
+
+
+
+