Odoo Help


Is possible create a txt file with odoo?

Hector McAmazing
on 5/18/16, 10:30 AM 1,120 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

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


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