Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2551 Näkymät

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
Hylkää

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

Paras vastaus

Hello Selman Yilmaz,

Please find code in comment. 

I hope this will help you.

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

Avatar
Hylkää

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
tammik. 23
1560
0
heinäk. 24
680
1
helmik. 24
3136
1
jouluk. 23
1712
2
elok. 23
1587