[FIX] account: general ledger & trial balance report from accounts list

When printing these reports from the accounts list
Accounting > Configuration > Accounts > Print menu > General Ledger
the ID of the wizard was considered as the ID of an account,
leading to obvious issues when this ID wasn't available
in the account_account table, or when the user
do not had the access rights to see the accounts with this
ID.

The override was completely useless: The wizard is
launched whether you print these reports from
Accounting > Reporting > Legal reports > Accounting Reports
or from the accounts list, and the super _get_account can
be called correctly for these two use cases.

opw-643589
This commit is contained in:
Denis Ledoux 2015-07-01 11:01:52 +02:00
parent 29582605d1
commit 3aae56582a
2 changed files with 0 additions and 10 deletions

View File

@ -60,11 +60,6 @@ class account_balance(report_sxw.rml_parse, common_report_header):
objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
return super(account_balance, self).set_context(objects, data, new_ids, report_type=report_type)
def _get_account(self, data):
if data['model']=='account.account':
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
return super(account_balance ,self)._get_account(data)
def lines(self, form, ids=None, done=None):
def _process_child(accounts, disp_acc, parent):
account_rec = [acct for acct in accounts if acct['id']==parent][0]

View File

@ -294,11 +294,6 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
sum_balance += self.cr.fetchone()[0] or 0.0
return sum_balance
def _get_account(self, data):
if data['model'] == 'account.account':
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
return super(general_ledger ,self)._get_account(data)
def _get_sortby(self, data):
if self.sortby == 'sort_date':
return self._translate('Date')