[FIX] remove print statement

bzr revid: hmo@tinyerp.com-20100702070753-0wx80gcmms9acom1
This commit is contained in:
Harry (OpenERP) 2010-07-02 12:37:53 +05:30
parent e4a6411665
commit 6d025f60c6
7 changed files with 16 additions and 43 deletions

View File

@ -2057,7 +2057,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
def _get_def_cparent(self, cr, uid, context):
acc_obj=self.pool.get('account.account')
tmpl_obj=self.pool.get('account.account.template')
#print "Searching for ",context
tids=tmpl_obj.read(cr, uid, [context['tmpl_ids']], ['parent_id'])
if not tids or not tids[0]['parent_id']:
return False
@ -2099,7 +2098,6 @@ class account_add_tmpl_wizard(osv.osv_memory):
# 'tax_ids': [(6,0,tax_ids)], todo!!
'company_id': company_id,
}
# print "Creating:", vals
new_account = acc_obj.create(cr, uid, vals)
return {'type':'state', 'state': 'end' }

View File

@ -41,7 +41,6 @@ class rml_parse(report_sxw.rml_parse):
})
def comma_me(self,amount):
#print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
@ -98,7 +97,6 @@ class rml_parse(report_sxw.rml_parse):
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
print "UTF_16 Error"
Stringer = str
else:
return Stringer
@ -120,14 +118,12 @@ class rml_parse(report_sxw.rml_parse):
UnicodeAst = []
_previouslyfound = False
i = 0
#print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
@ -139,14 +135,11 @@ class rml_parse(report_sxw.rml_parse):
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
print "DECODING ERROR"
return str.encode("ascii")
else:

View File

@ -113,7 +113,6 @@ class accounting_report_indicator(report_sxw.rml_parse):
else:
temp_head = [str(x[0:3]) for x in self.header_name]
head_dict = dict(zip(temp_head,temp_head))
print "head_dict",head_dict
return [head_dict]
def getarray(self,data,object,array_header=''):

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -41,7 +41,6 @@ class rml_parse(report_sxw.rml_parse):
})
def comma_me(self,amount):
#print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
@ -56,14 +55,14 @@ class rml_parse(report_sxw.rml_parse):
return new
else:
return self.comma_me(new)
def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
ellipsis = ellipsis or ''
try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e:
return False
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...')
@ -100,14 +99,13 @@ class rml_parse(report_sxw.rml_parse):
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
print "UTF_16 Error"
Stringer = str
else:
return Stringer
else:
return Stringer
return Stringer
def explode_this(self,chaine,length):
#chaine = self.repair_string(chaine)
chaine = rstrip(chaine)
@ -118,20 +116,18 @@ class rml_parse(report_sxw.rml_parse):
i = i + length
chaine = str("".join(ast))
return chaine
def repair_string(self,chaine):
ast = list(chaine)
UnicodeAst = []
_previouslyfound = False
i = 0
#print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
@ -141,17 +137,13 @@ class rml_parse(report_sxw.rml_parse):
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
print "DECODING ERROR"
return str.encode("ascii")
else:
print Stringer
return Stringer
def _add_header(self, node, header=1):

View File

@ -177,7 +177,7 @@ class Code128(MultiWidthBarcode):
Code 128 can also encode digits at double density (2 per byte)
and has a mandatory checksum. Code 128 is well supported and
commonly used -- for example, by UPS for tracking labels.
Because of these qualities, Code 128 is probably the best choice
for a linear symbology today (assuming you have a choice).
@ -185,11 +185,11 @@ class Code128(MultiWidthBarcode):
value (int, or numeric string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
Minumum is .0075 inch (7.5 mils).
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
@ -197,14 +197,14 @@ class Code128(MultiWidthBarcode):
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdim
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Code 128:
http://www.semiconductor.agilent.com/barcode/sg/Misc/code_128.html
@ -223,7 +223,7 @@ class Code128(MultiWidthBarcode):
if type(value) is type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
@ -288,12 +288,11 @@ class Code128(MultiWidthBarcode):
if l[1] in tos:
l[:2] = ['START_' + l[1][-1]]
# print `l`
# encode into numbers
start, set, shset = setmap[l[0]]
e = [start]
l = l[1:-1]
while l:
c = l[0]

View File

@ -34,8 +34,6 @@ def run():
story.append(Extended93("L@@K! Code 93 :-)")) #, xdim=0.005 * inch))
story.append(Paragraph('Code 128', styleN))
c=Code128("AB-12345678") #, xdim=0.005 * inch)
#print 'WIDTH =', (c.width / inch), 'XDIM =', (c.xdim / inch)
#print 'LQ =', (c.lquiet / inch), 'RQ =', (c.rquiet / inch)
story.append(c)
story.append(Paragraph('USPS FIM', styleN))
story.append(FIM("A"))

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -132,12 +132,6 @@ class report_custom(report_rml):
# file('/tmp/terp.xml','wb+').write(xml)
# end_time = time.clock()
# print "db:", mid_time-start_time
# print "addition:", mid_time2-mid_time
# print "buyer costs:", mid_time3-mid_time2
# print "seller costs:", mid_time4-mid_time3
# print "rest:", end_time-mid_time4
# print "total:", end_time-start_time
return self.post_process_xml_data(cr, uid, xml, context)
report_custom('report.auction.total', 'auction.lots', '', 'addons/auction/report/total.xsl')