From 36868a1600b3655d2cf383b3daf2fdf32fd6a481 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 29 Sep 2008 11:02:13 +0530 Subject: [PATCH] *General ledger:Total for currency for non landscape print----Solved bzr revid: patelamit2003@gmail.com-20080929053213-bxpunm317g6288zd --- addons/account/report/general_ledger.py | 4 +--- addons/account/report/general_ledger_landscape.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/account/report/general_ledger.py b/addons/account/report/general_ledger.py index 3dfe8c5ea97..f4ff9f9ef45 100755 --- a/addons/account/report/general_ledger.py +++ b/addons/account/report/general_ledger.py @@ -351,9 +351,7 @@ class general_ledger(rml_parse.rml_parse): def _sum_currency_amount_account(self, account, form): self._set_get_account_currency_code(account.id) - self.cr.execute("select sum(aml.amount_currency) from account_move_line as aml "\ - "LEFT JOIN account_account aa on aml.account_id=%d "\ - "AND aml.currency_id = aa.currency_id"%account.id) + self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %d "%account.id) total = self.cr.fetchone() if self.account_currency: diff --git a/addons/account/report/general_ledger_landscape.py b/addons/account/report/general_ledger_landscape.py index a36a1ea0d3b..f090b18c090 100755 --- a/addons/account/report/general_ledger_landscape.py +++ b/addons/account/report/general_ledger_landscape.py @@ -352,9 +352,7 @@ class general_ledger_landscape(rml_parse.rml_parse): def _sum_currency_amount_account(self, account, form): self._set_get_account_currency_code(account.id) - self.cr.execute("select sum(aml.amount_currency) from account_move_line as aml "\ - "LEFT JOIN account_account aa on aml.account_id=%d "\ - "AND aml.currency_id = aa.currency_id"%account.id) + self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %d "%account.id) total = self.cr.fetchone() if self.account_currency: