← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 532559] Re: Printing ean13 not possible

 

On Thursday 16 December 2010, you wrote:
> We Let the Framework team decide.

It is somewhere in my endless TODO list. 
One thing is that I wanted to also write a test case (simple report) for all 
the barcodes first.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/532559

Title:
  Printing ean13 not possible

Status in OpenObject Server:
  Triaged

Bug description:
  Hi

I try to print ean13 code so, in trml2pdf.py, i have add two lines to import eanbc from reportlab as the other standard barcodes :

        elif node.tag=='barCode':
            try:
                from reportlab.graphics.barcode import code128
                from reportlab.graphics.barcode import code39
                from reportlab.graphics.barcode import code93
                from reportlab.graphics.barcode import eanbc
                from reportlab.graphics.barcode import common
                from reportlab.graphics.barcode import fourstate
                from reportlab.graphics.barcode import usps
            except Exception, e:
                return None
            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),
                'code128': lambda x: code128.Code128(x, **args),
                'standard39': lambda x: code39.Standard39(x, **args),
                'standard93': lambda x: code93.Standard93(x, **args),
                'ean13': lambda x: eanbc.Ean13BarcodeWidget(x, **args),
                'i2of5': lambda x: common.I2of5(x, **args),
                'extended39': lambda x: code39.Extended39(x, **args),
                'extended93': lambda x: code93.Extended93(x, **args),
                'msi': lambda x: common.MSI(x, **args),
                'fim': lambda x: usps.FIM(x, **args),
                'postnet': lambda x: usps.POSTNET(x, **args),
            }
            code = 'code128'
            if node.get('code'):
                code = node.get('code').lower()

 but i have an error :

 File "/usr/lib/python2.6/dist-packages/reportlab/platypus/doctemplate.py", line 613, in handle_keepWithNext
    while i<n and flowables[i].getKeepWithNext(): i += 1
AttributeError: Ean13BarcodeWidget instance has no attribute 'getKeepWithNext'

I have the version 2.3 of reportlab.

Thks

Laurent





References