Odoo Help

0

0
3 Answers
2
Avatar

Manish Kumar Bohra

--Manish Kumar Bohra--
8801
| 6 4 10
Bikaner, الهند
--Manish Kumar Bohra--


Manish Kumar Bohra
25‏/9‏/2018 1:42 ص

Hello

You Can try this i hope it's help you.

 
@api.multi
def printWOImportAction(self):
return self.env.ref('Modulename.ReportActionID').report_action(self)

Thanks

0
Tintuk Tomin
25‏/9‏/2018 5:01 ص
return {
'type': 'ir.actions.report',
'report_name':'account.report_invoice_document',
'model':'account.invoice',
'report_type':"qweb-pdf"
  } 

There was an extra , after 'report_type':"qweb-pdf" and also the report will be generated only according to the template xml which you are created. And the template is not shown in your question.
0
Avatar

Mitul Shingala

--Mitul Shingala--
--Mitul Shingala--

Odoo Developer

Mitul Shingala
25‏/9‏/2018 4:43 ص

Hello, 

see this below. this type of example already exist into sale order.

    @api.multi
    def print_report(self):
        return self.env.ref('<modulename.report_action_id>').report_action(self)
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.

Register
Odoo Training Center

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

Test it now