跳至內容
選單
此問題已被標幟
3 回覆
4929 瀏覽次數

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

相關帖文 回覆 瀏覽次數 活動
3
11月 23
7391
2
6月 24
4631
2
8月 22
6392
1
7月 24
1579
4
5月 24
2864