Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
4823 Weergaven

I want to write a module in which you can upload a file (an excel file in my case) and after uploading, I want to do some processing using the file's data. I couldn't find any tutorials for uploading a file in odoo in a custom modules. anyone can help?

Avatar
Annuleer

to upload file you can use binary field, than on button click read that file and process further

Auteur

@Sehrish can you be more specific? or send me a link so I can check it out.

Beste antwoord

You can use Binary Field to feed uploads.

logo = fields.Binary('Website Logo', default=_default_logo, help="Display this logo on the website.")

above field defined to upload logos. Same can be used to feed any files.

Avatar
Annuleer
Auteur

How can I process the file that I uploaded? in my case its an excel file

Whenever you upload a file, it will automatically processed by odoo in default and save in ir_attachment field. If you need to do more operations then you can access the file from current object or from ir_attachment table

Gerelateerde posts Antwoorden Weergaven Activiteit
3
nov. 23
7187
2
jun. 24
4441
2
aug. 22
6187
1
jul. 24
1427
4
mei 24
2682