Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
8660 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore Risposta migliore

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

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

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
set 16
2830
3
gen 16
5715
3
dic 15
4009
0
gen 17
4065
0
giu 16
3341