I want to generate an excel file with only field name and to download the same excel file on button click.The button should be inside the form view.I am using version 10
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
4043
瀏覽次數
Hello,
You can do like this.
Take one Binary field in model for storing XLS file like
file = fields.Binary('Label', filters='.xls', readonly=True)
and then do code when you have prepared file:
temp_file = base64.encodestring(prepared_file)
self.write({'file': temp_file})
# make sure convert prepared file based on content type
Accept and upvote answer if helpful
Thanks and Regards
Haresh Kansara
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
11月 16
|
5355 | ||
|
7
6月 20
|
20127 | ||
|
2
5月 16
|
4885 | ||
|
0
9月 15
|
5197 | ||
|
0
3月 15
|
4674 |
@Haresh kansara yes i have created the excel file now i want to download it on the same click