|
|
@ -230,8 +230,8 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit): |
|
|
|
return start_period, stop_period, start, stop |
|
|
|
|
|
|
|
def compute_balance_data(self, data, filter_report_type=None): |
|
|
|
new_ids = data['form']['account_ids'] or data[ |
|
|
|
'form']['chart_account_id'] |
|
|
|
new_ids = (data['form']['account_ids'] or |
|
|
|
[data['form']['chart_account_id']]) |
|
|
|
max_comparison = self._get_form_param( |
|
|
|
'max_comparison', data, default=0) |
|
|
|
main_filter = self._get_form_param('filter', data, default='filter_no') |
|
|
@ -259,10 +259,14 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit): |
|
|
|
start) or False |
|
|
|
|
|
|
|
# Retrieving accounts |
|
|
|
ctx = {} |
|
|
|
if data['form'].get('account_level'): |
|
|
|
# Filter by account level |
|
|
|
ctx['account_level'] = int(data['form']['account_level']) |
|
|
|
account_ids = self.get_all_accounts( |
|
|
|
new_ids, only_type=filter_report_type) |
|
|
|
new_ids, only_type=filter_report_type, context=ctx) |
|
|
|
|
|
|
|
# get details for each accounts, total of debit / credit / balance |
|
|
|
# get details for each account, total of debit / credit / balance |
|
|
|
accounts_by_ids = self._get_account_details( |
|
|
|
account_ids, target_move, fiscalyear, main_filter, start, stop, |
|
|
|
initial_balance_mode) |
|
|
|