Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4189 Weergaven

I have generated an xml file with python and trying to attach it with a binary field or I can download it directly into the user browser. I am open to use any one of the option. For now I am trying the following code :

sepa.export(validate=True)

contents = sepa.export()

doc = minidom.parseString(contents)

filee = open("/home/odoo/xml_files/" + str(self.name) + ' - ' + str(res) + ".xml", "w+")

doc.writexml(filee)

out = filee.read()

filee.close()

self.write({'report': base64.b64encode(bytes(out, 'utf-8')), 'filename':  str(self.name) + ' - ' + str(res)})

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 24
2599
2
dec. 23
12482
3
apr. 24
5688
0
jul. 22
1041
3
jul. 22
22772