Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
8665 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 16
2831
3
thg 1 16
5715
3
thg 12 15
4009
0
thg 1 17
4066
0
thg 6 16
3341