Read TXT file in Odoo Code using Binary Field

Read TXT file in Odoo

Mustufa Rangwala

Sample Code for Odoo / Python 


file_content = base64.decodestring(self.input_file)

Odoo CMS- Sample image floating

file_content = file_content.decode("utf-8")

file_lines = file_content.split("\r\n")

-----------------------

input_file = fields.Binary(

  string="Select file",

  required = True

)