Odoo Help


2 Answers
--Haresh Kansara--

Odoo Application Engineer

I have completed odoo training from Odoo India, and i have formerly worked there as an application engineer. And currently works as an application engineer. 

I have worked on different projects like Sales, Purchase, MRP, Account etc. I have also worked on website development.

I can help you to:

- Develop new module

- Customise existing module

- Provide Odoo Functional / Technical training

Connect me at: https://www.linkedin.com/in/haresh-kansara-50048914b

Haresh Kansara
2019/1/29 上午10:27

Hi Gleb,

i think you want to generate report from background (python side) or from other model/resource.

you can do like this:

                # render report and get as pdf

                REPORT_ID = 'moduleName.template_id' # template id (that you have to find from report template)

                pdf = self.env.ref(REPORT_ID).render_qweb_pdf(record_id) # Give record id to generate for

                b64_pdf = base64.b64encode(pdf[0])

Now you will get pdf in b64_pdf so you can set this as attachment or send as email whatever you want 


don't forget to accept answer if helpful.

thank you

La Jayuhni Yarsyah
2019/1/29 上午6:55

f you mean that "/home" is a module directory,, then you just can call template by <t t-call="home.template_xml_id" />


Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now