Odoo Help

Welcome!

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

0

What is the meaning of these lines in the print_report method when using the module report_xls?

By
Juan Formoso
on 6/27/14, 7:21 AM 547 views

I am using the module report_xls, the only documentation I could find of it is the one one in its __openerp__.py description, which suggests you to download the modules account_journal_report_xls and account_move_line_report_xls to see how it works, because those modules use it to export to Excel.

I was looking their codes for a long time and from other module which seems to use report_xls too, but I am not able to know the meaning of several lines. For example, account_journal_report_xls adds in the wizard a button to export, and this one calls a function which finally returns this:

return {
   'type': 'ir.actions.report.xml',
   'report_name': 'nov.account.journal.xls',
   'datas': datas,
}

The first item of the dictionary, 'type', is always the same ('ir.actions.report.xml') for every module. But I do not have any idea of which is the meaning of the other two items, 'report name', and 'datas'. Obviously I do not want to know what the module is exactly doing, only what are the meanings of those two fields, what I should write as 'report_name' and as 'datas'.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/27/14, 7:21 AM
Seen: 547 times
Last updated: 3/16/15, 8:10 AM