diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 475b854ef0e..3bce3c10ed0 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -127,4 +127,9 @@ class common_report_header(object): codes = [x for x, in self.cr.fetchall()] return codes + def _get_currency(self, data): + if data.get('form', False) and data['form'].get('chart_account_id', False): + return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code + return '' + #vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/report/partner_balance.py b/addons/account/report/partner_balance.py index 2f17fbdac69..5a82ffdab1d 100644 --- a/addons/account/report/partner_balance.py +++ b/addons/account/report/partner_balance.py @@ -533,11 +533,6 @@ class partner_balance(report_sxw.rml_parse, common_report_header): debit, credit = self._sum_debit(data), self._sum_credit(data) return credit > debit and credit - debit - def _get_currency(self, data): - if data.get('form', False) and data['form'].get('chart_account_id', False): - return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code - return '' - def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' diff --git a/addons/account/report/report_bs.py b/addons/account/report/report_bs.py index 53aea1411ab..a183c4f476b 100644 --- a/addons/account/report/report_bs.py +++ b/addons/account/report/report_bs.py @@ -199,11 +199,6 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header): def get_lines_another(self, group): return self.result.get(group, []) - def _get_currency(self, data): - if data.get('form', False) and data['form'].get('chart_account_id', False): - return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code - return '' - report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account', 'addons/account/report/report_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal, header='internal') diff --git a/addons/account/report/report_pl.py b/addons/account/report/report_pl.py index f5c84e745b4..7411f5f9c52 100644 --- a/addons/account/report/report_pl.py +++ b/addons/account/report/report_pl.py @@ -173,11 +173,6 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header): def get_lines_another(self, group): return self.result.get(group, []) - def _get_currency(self, data): - if data.get('form', False) and data['form'].get('chart_account_id', False): - return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.code - - report_sxw.report_sxw('report.pl.account.horizontal', 'account.account', 'addons/account/report/report_pl_account_horizontal.rml',parser=report_pl_account_horizontal, header=False) diff --git a/addons/account/report/third_party_ledger.py b/addons/account/report/third_party_ledger.py index aa3cf64631a..bf5bd14a5a2 100644 --- a/addons/account/report/third_party_ledger.py +++ b/addons/account/report/third_party_ledger.py @@ -408,9 +408,6 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): # def _get_company(self, form): # return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).name - def _get_currency(self, form): - return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name - def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts'