Skip to Content
Menú
This question has been flagged
3 Respostes
8654 Vistes

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
Descartar
Best Answer

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
Descartar
Autor Best Answer

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

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

Avatar
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
0
de set. 16
2829
3
de gen. 16
5715
3
de des. 15
4008
0
de gen. 17
4064
0
de juny 16
3340