Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Is possible create a txt file with odoo?

Hector McAmazing
on 5/18/16, 10:30 AM 384 views

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?

Juan Vicente Pascual
On 5/18/16, 11:14 AM

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")

 then just add all you need.

Kind Regards.

Hector McAmazing
On 5/23/16, 3:47 AM

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

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

Gustavo Hinojosa
On 5/18/16, 1:51 PM

Hi, hope you it help

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 5/18/16, 10:30 AM
Seen: 384 times
Last updated: 5/23/16, 3:47 AM