Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
4923 มุมมอง

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?

อวตาร
ละทิ้ง

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

ผู้เขียน

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

คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
ผู้เขียน

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
3
พ.ย. 23
7378
2
มิ.ย. 24
4619
2
ส.ค. 22
6377
1
ก.ค. 24
1573
4
พ.ค. 24
2849