Skip to Content
Menu
This question has been flagged
1 Reply
2022 Views

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

Avatar
Discard

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

Best Answer

Hello Selman Yilmaz,

Please find code in comment. 

I hope this will help you.

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

Avatar
Discard

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
.
.
.
.
.

Related Posts Replies Views Activity
0
Jan 23
1318
0
Jul 24
186
1
Feb 24
2150
1
Dec 23
997
2
Aug 23
929