[REF] Account: Remove some warnings from buildbot

bzr revid: mra@mra-laptop-20101026054351-68olcwfpq81rinr2
This commit is contained in:
Mustufa Rangwala 2010-10-26 11:13:51 +05:30
parent dfea5584e7
commit 2cc265aaef
4 changed files with 6 additions and 10 deletions

View File

@ -79,7 +79,6 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
move_state = ['posted']
full_account = []
result_tmp = 0.0
self.cr.execute(
"SELECT p.ref,l.account_id,ac.name AS account_name,ac.code AS code,p.name, sum(debit) AS debit, sum(credit) AS credit, " \
"CASE WHEN sum(debit) > sum(credit) " \

View File

@ -77,7 +77,6 @@ class report_pl_account_horizontal(rml_parse.rml_parse, common_report_header):
db_pool = pooler.get_pool(self.cr.dbname)
account_pool = db_pool.get('account.account')
year_pool = db_pool.get('account.fiscalyear')
types = [
'expense',

View File

@ -21,9 +21,9 @@
##############################################################################
import time
import rml_parse
from report import report_sxw
import re
def _get_country(record):
if record.partner_id \

View File

@ -19,7 +19,6 @@
#
##############################################################################
import time
import re
import sys
@ -55,15 +54,15 @@ class rml_parse(report_sxw.rml_parse):
ellipsis = ellipsis or ''
try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e:
except:
return False
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...')
def _get_and_change_date_format_for_swiss (self,date_to_format):
def _get_and_change_date_format_for_swiss(self,date_to_format):
date_formatted=''
if date_to_format:
date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
date_formatted = strptime(date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
return date_formatted
def _explode_name(self,chaine,length):
@ -109,15 +108,14 @@ class rml_parse(report_sxw.rml_parse):
i = i + length
chaine = str("".join(ast))
return chaine
def repair_string(self,chaine):
def repair_string(self, chaine):
ast = list(chaine)
UnicodeAst = []
_previouslyfound = False
i = 0
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
print str(to_reencode)