跳至内容
菜单
此问题已终结
1 回复
2555 查看

Hi, 

I have a api and this api returning a binary pdf.

This pdf is changing everytime when a request come and i don't want the store it.


Simply i want the create a button and this should trigger a function.

Function should be take my api response (binary pdf) and show this pdf to user in interface. (with download button) 


Thanks for any suggestion

形象
丢弃

Hello @Selman Yilmaz
Hope you are doing well.

I would like to assist you with your requirement.

we can have a detailed discussion regarding the same over Email : Vanessa (at) cisinlabs (dot) com or you can connect me over Skype Directly : Live:Vanessa_12766

looking forward to have your response soon.

Best Regards,
Vanessa J

最佳答案

Hello Selman Yilmaz,

Please find code in comment. 

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

形象
丢弃

You can add a button in the form view by using the xpath .

<button name="call_api" string="Download" type="object"/>

now create the function name "call_api" in the related model.

def call_api(self):
your api code
.
.
.
.
.

相关帖文 回复 查看 活动
0
1月 23
1560
0
7月 24
680
1
2月 24
3143
1
12月 23
1713
2
8月 23
1589