diff --git a/account_financial_report_qweb/__openerp__.py b/account_financial_report_qweb/__openerp__.py
index 9c91f18f..0c94ae59 100644
--- a/account_financial_report_qweb/__openerp__.py
+++ b/account_financial_report_qweb/__openerp__.py
@@ -10,15 +10,19 @@
OCA Financial Reports
""",
'author': 'Camptocamp SA,'
+ 'initOS GmbH,'
'Odoo Community Association (OCA)',
'website': 'http://www.camptocamp.com',
'depends': [
'account',
+ # 'date_range',
],
'data': [
'wizard/aged_partner_balance_wizard_view.xml',
'wizard/ledger_report_wizard_view.xml',
'report_menus.xml',
+ 'wizard/balance_common_wizard_view.xml',
+ 'views/report_menus.xml',
],
'test': [
],
diff --git a/account_financial_report_qweb/views/report_menus.xml b/account_financial_report_qweb/views/report_menus.xml
new file mode 100644
index 00000000..d35f31ba
--- /dev/null
+++ b/account_financial_report_qweb/views/report_menus.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/account_financial_report_qweb/wizard/__init__.py b/account_financial_report_qweb/wizard/__init__.py
index 0b3093a7..409aa005 100644
--- a/account_financial_report_qweb/wizard/__init__.py
+++ b/account_financial_report_qweb/wizard/__init__.py
@@ -4,3 +4,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import aged_partner_balance_wizard
from . import ledger_report_wizard
+from . import balance_common_wizard
diff --git a/account_financial_report_qweb/wizard/balance_common_wizard.py b/account_financial_report_qweb/wizard/balance_common_wizard.py
new file mode 100644
index 00000000..a52e0a24
--- /dev/null
+++ b/account_financial_report_qweb/wizard/balance_common_wizard.py
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+# Author: Thomas Rehn, Guewen Baconnier
+# Copyright 2016 initOS GmbH, camptocamp
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from openerp import models, fields, api
+
+
+class AccountBalanceCommonWizard(models.TransientModel):
+ """Will launch some balance report wizards and pass required args"""
+
+ _inherit = "account.common.account.report"
+ _name = "account.common.balance.report"
+ _description = "Common Balance Report"
+
+ @api.model
+ def _get_account_ids(self):
+ context = self.env.context or {}
+ res = False
+ if context.get('active_model', False) == 'account.account' \
+ and context.get('active_ids', False):
+ res = context['active_ids']
+ return res
+
+ account_ids = fields.Many2many(
+ comodel_name='account.account',
+ string='Filter on accounts',
+ help="Only selected accounts will be printed. Leave empty to \
+ print all accounts.",
+ default=_get_account_ids
+ )
+ # date_range = fields.Many2one(
+ # comodel_name='date.range',
+ # string='Date Range',
+ # )
+ # comparison_date_range = fields.Many2one(
+ # comodel_name='date.range',
+ # string='Date Range',
+ # )
+ comparison_date_start = fields.Datetime(
+ string='Start Date'
+ )
+ comparison_date_end = fields.Datetime(
+ string='End Date'
+ )
+ partner_ids = fields.Many2many(
+ comodel_name='res.partner',
+ string='Filter on partner',
+ help="Only selected partners will be printed. \
+ Leave empty to print all partners."
+ )
+ debit_credit = fields.Boolean(
+ string='Display Debit/Credit Columns',
+ help="This option allows you to get more details about the way your "
+ "balances are computed. Because it is space consuming, "
+ "we do not allow to use it while doing a comparison."
+ )
+
+ def pre_print_report(self, cr, uid, ids, data, context=None):
+ data = super(AccountBalanceCommonWizard, self).pre_print_report(
+ cr, uid, ids, data, context)
+ return data
diff --git a/account_financial_report_qweb/wizard/balance_common_wizard_view.xml b/account_financial_report_qweb/wizard/balance_common_wizard_view.xml
new file mode 100644
index 00000000..acc5dc7c
--- /dev/null
+++ b/account_financial_report_qweb/wizard/balance_common_wizard_view.xml
@@ -0,0 +1,100 @@
+
+
+
+
+
+ Balance Common Wizard
+ account.common.balance.report
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+
+ Partner Balance
+ ir.actions.act_window
+ account.common.balance.report
+ form
+ form
+
+ new
+ {'balance_common': 'partner_balance'}
+
+
+
+ Trial Balance
+ ir.actions.act_window
+ account.common.balance.report
+ form
+ form
+
+ new
+ {'balance_common': 'trial_balance'}
+
+
+
+
+ Partner Balance
+ client_print_multi
+
+ action
+ account.account
+
+
+
+