Handling Text file

I am trying to create a system to download the text file from client. (This text file has to be used by bank and hence needed to be provided manually to them).

  1. If I use the reporting engine, (FODT to TXT), then it comes with a lot of binary data.
  2. If I am using the reporting engine from TXT to TXT, then it expects some additional tags.
  3. If I try to create the file in tmp folder, and then save it on a binary field, then it is not able to convert from TextIOWrapper to Binary.

What is best way to complete this task?

Can a text file be created and returned to the user on the click on a button ?

Thanks in advance.

Use a text template that generates a text file.
This is full supported by the report engine like in the account_es module.

1 Like