[IMP] attributes of barcode

bzr revid: dsh@tinyerp.com-20090701082850-e4uelitk1ijm30g0
This commit is contained in:
dsh (Open ERP) 2009-07-01 13:58:50 +05:30
parent dfafebf681
commit 004cb7d89c
2 changed files with 3 additions and 1 deletions

View File

@ -573,7 +573,7 @@ class _rml_flowable(object):
from reportlab.graphics.barcode import usps
except Exception, e:
return None
args = utils.attr_get(node, [], {'ratio':'float','xdim':'unit','height':'unit','checksum':'bool','quiet':'bool'})
args = utils.attr_get(node, [], {'ratio':'float','xdim':'unit','height':'unit','checksum':'int','quiet':'int','width':'unit','stop':'bool','bearers':'int','barWidth':'float','barHeight':'float'})
codes = {
'codabar': lambda x: common.Codabar(x, **args),
'code11': lambda x: common.Code11(x, **args),

View File

@ -162,6 +162,8 @@ def attr_get(node, attrs, dict={}):
res[key] = int(node.get(key))
elif dict[key]=='unit':
res[key] = unit_get(node.get(key))
elif dict[key] == 'float' :
res[key] = float(node.get(key))
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: