Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8663 มุมมอง

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?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 16
2831
Currency in Odoo 9 ecommerce แก้ไขแล้ว
3
ม.ค. 16
5715
3
ธ.ค. 15
4009
0
ม.ค. 17
4066
0
มิ.ย. 16
3341