~zaber/openobject-addons/stable_5.0-extra-addons

« back to all changes in this revision

Viewing changes to auction/report/catalog2.py

  • Committer: nel
  • Date: 2007-10-01 05:36:04 UTC
  • Revision ID: nel-96aa6366eff3c935db4b610739abba94e5d985f0
ref taken off

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
                        for cat in res:
119
119
                                product =doc.createElement('product')
120
120
                                products.appendChild(product)
121
 
 
122
121
                                if cat['obj_desc']:
123
122
                                        infos = doc.createElement('infos')
124
123
                                        lines = re.split('<br/>|\n', unicode(cat['obj_desc'],'utf-8').encode('latin1'))
125
 
 
126
124
                                        for line in lines:
127
125
                                                xline = doc.createElement('info')
128
 
                                                xline.appendChild(doc.createTextNode(escape(line)))
 
126
                                                xline.appendChild(doc.createTextNode(escape(line.decode('latin-1','replace').encode('utf-8'))))
129
127
                                                infos.appendChild(xline)
130
128
                                        product.appendChild(infos)
131
129
                                        if cat['lot_num']:
134
132
                                                infos.appendChild(lnum)
135
133
 
136
134
                                        dest = os.path.join('/tmp/pdf_catalog/',str(cwid),str(cat['obj_desc'])+'.jpg')
 
135
                                        print dest
137
136
                                        if not cat['image']:
138
137
                                                print "Cat wiht no Image "
139
138
#                                               limg = doc.createElement('Image')