Odoo Help

1

0
4 Answers
0
Samo Arko
29‏/6‏/2018 9:07 ص

I'm now trying to pass text values with docargs but even they don't show on the report.  

    @api.model
    def render_html(self, docids, data=None):
        docargs = {
            'doc_ids': docids,
            'doc_model': 'report.hr.report_my_report',
'data': data, 'company': 'BLABLABLA', }         return self.env['report'].render('hr_izracun_place.report_my_report', docargs)

And I try to show it in my qweb report template with

<t t-esc="company"/>

But nothing is displayed!? 

------------------------------------------------

I haven't added the reports Abstract Models correctly into the __init__.py in the get_pdf you can pass ids that you want to use in the report, because it's the first parameter in render_html method. So you can than use those ids to search for records in models that you want.





0
Sehrish
28‏/6‏/2018 6:10 ص

I hope below links are helps you.

1- http://learnopenerp.blogspot.com/2016/11/how-to-create-qweb-reports-in-openerp.html

2- http://learnopenerp.blogspot.com/2016/09/how-to-create-custom-reports-in-odoo.html

2 Comments
Tabla d.o.o., Samo Arko
28‏/6‏/2018 6:49 ص

Nope... not even close!

Ask a Question
Writer
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.

Register
Odoo Training Center

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

Test it now