[IMP] attributes of barcode
bzr revid: dsh@tinyerp.com-20090701082850-e4uelitk1ijm30g0
This commit is contained in:
parent
dfafebf681
commit
004cb7d89c
|
@ -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),
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue