|
diff --git a/addons/account/report/report_bs.py b/addons/account/report/report_bs.py
index 271f1e5c214..347c40c67f1 100644
--- a/addons/account/report/report_bs.py
+++ b/addons/account/report/report_bs.py
@@ -46,10 +46,33 @@ class report_balancesheet_horizontal(rml_parse.rml_parse, common_report_header):
'sum_cr' : self.sum_cr,
'get_data':self.get_data,
'get_pl_balance':self.get_pl_balance,
+ 'get_fiscalyear': self._get_fiscalyear,
+ 'get_account': self._get_account,
+ 'get_start_period': self.get_start_period,
+ 'get_end_period': self.get_end_period,
+ 'get_sortby': self._get_sortby,
+ 'sum_currency_amount_account': self._sum_currency_amount_account,
+ 'get_filter': self._get_filter,
+ 'get_journal': self._get_journal,
+ 'get_start_date':self._get_start_date,
+ 'get_end_date':self._get_end_date,
+ 'get_company':self._get_company,
})
self.context = context
+
+ 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,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
+ total = self.cr.fetchone()
+
+ if self.account_currency:
+ return_field = str(total[0]) + self.account_currency
+ return return_field
+ else:
+ currency_total = self.tot_currency = 0.0
+ return currency_total
def sum_dr(self):
if self.res_pl['type'] == 'Net Profit':
self.result_sum_dr += self.res_pl['balance']
|