Browse Source

[FIX] Fixing gliches


			
			
				pull/79/head
			
			
		
Humberto Arocha 12 years ago
parent
commit
5b8196e63f
  1. 8
      account_financial_report/report/account_balance.py
  2. 8
      account_financial_report/report/account_balance_2_cols.py
  3. 9
      account_financial_report/report/account_balance_4_cols.py

8
account_financial_report/report/account_balance.py

@ -123,11 +123,11 @@ class account_balance(report_sxw.rml_parse):
return {'periods':periods_str, 'date':dates_str}
def exchange_name(self, form):
self.from_currency_id = self.get_company_currency(form['company_id'] and form['company_id'][0])
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
return self.pool.get('res.currency').browse(self.cr, self.uid, self.to_currency_id).name
def exchange(self, from_amount):
@ -148,11 +148,11 @@ class account_balance(report_sxw.rml_parse):
and the full year)
"""
self.from_currency_id = self.get_company_currency(form['company_id'] and form['company_id'][0])
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
tot_eje = 0.0

8
account_financial_report/report/account_balance_2_cols.py

@ -125,11 +125,11 @@ class account_balance(report_sxw.rml_parse):
def exchange_name(self, form):
self.from_currency_id = self.get_company_currency(form['company_id'] and form['company_id'][0])
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
return self.pool.get('res.currency').browse(self.cr, self.uid, self.to_currency_id).name
def exchange(self, from_amount):
@ -152,11 +152,11 @@ class account_balance(report_sxw.rml_parse):
"""
self.from_currency_id = self.get_company_currency(form['company_id'] and form['company_id'][0])
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
tot_bin = 0.0
tot_deb = 0.0

9
account_financial_report/report/account_balance_4_cols.py

@ -132,11 +132,12 @@ class account_balance(report_sxw.rml_parse):
return False
def exchange_name(self, form):
self.from_currency_id = self.get_company_currency(form['company_id'] and form['company_id'][0])
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
name = self.pool.get('res.currency').browse(self.cr, self.uid, self.to_currency_id).name
return self.pool.get('res.currency').browse(self.cr, self.uid, self.to_currency_id).name
def exchange(self, from_amount):
@ -155,11 +156,11 @@ class account_balance(report_sxw.rml_parse):
(account info plus debit/credit/balance in the selected period
and the full year)
"""
self.from_currency_id = self.get_company_currency(form['company_id'] and form['company_id'][0])
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']:
self.to_currency_id = self.from_currency_id
else:
self.to_currency_id = form['currency_id'] and form['currency_id'][0]
self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
tot_bin = 0.0
tot_deb = 0.0

Loading…
Cancel
Save