Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
8669 Weergaven

I have a module in which i can choose a product. Now i want to get that product and generate a txt file with the product information by clicking a button. Is it possible?

Avatar
Annuleer
Beste antwoord

Yes, create a button and in the function just create the text file like

file = open("newfile.txt", "w")
file.write("hello world in the new file")
file.write("and another line")
file.close()

 then just add all you need.


Kind Regards.

Avatar
Annuleer
Auteur Beste antwoord

Gustavo, i try your answer, and odoo  tells me that: 

creafich() takes at least 4 arguments (1 given)

Avatar
Annuleer
Beste antwoord

Hi, hope you it help
https://www.odoo.com/es_ES/forum/ayuda-1/question/not-able-to-create-simple-txt-report-in-odoo-101033#answer-101052

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 16
2831
3
jan. 16
5715
3
dec. 15
4009
0
jan. 17
4066
0
jun. 16
3341