I am trying to upload and import a csv file. When I chose file I'm getting warning/ error of file_type False. When Iam debugging the code I'm getting file content in binary, file_name also, but getting file_type field as false.
here is my .py code
file = fields.Binary(string='Input file')
file_type = fields.Char(string='Content Type', size=128)
file_name = fields.Char(string='File Name', size=128)
Here is the view code
<group>
<field name="file" filename="file_name"/>
<field name="file_name" invisible="1"/>
<field name="file_type" invisible="True" attrs="{'readonly':[('file_type','!=', False)]}" />
<field name="size" invisible="True" />
</group>
Help appreciated.