Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2556 Tampilan

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
Buang

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

Jawaban Terbai

Hello Selman Yilmaz,

Please find code in comment. 

I hope this will help you.

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

Avatar
Buang

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

Post Terkait Replies Tampilan Aktivitas
0
Jan 23
1560
0
Jul 24
681
1
Feb 24
3144
1
Des 23
1714
2
Agu 23
1592