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

How to generate report by button using webkite?

By
Mohammed Khamis
on 1/8/15, 1:17 PM 674 views

Hello every body ,

Please I want to generate report when I click on button from wizared form using webkite but I do not know how to make this technice ,

this report for Chart of account

Thank you for all 

0
Anand
On 1/9/15, 12:31 AM

##################1st create report like this :#########################

     <report
                auto="False" 
                id="report_test_report"
                model="report.model"
                name="report_testing_model"
                file="report_testing/report/report_webkit.mako"
                string="Webkit report"
                report_type="webkit" 
                webkit_header=""/>

######################create a mako file like this...#################### 

<html>
<head>

</head>
    <body>
        <br><br>
        <table border="1.0" width="100%" >
                <tr>
                    <th>Name</th>
                    <th>Experience</th>
                    <th>Salary</th>
                </tr>
            %for obj in objects:
                <tr>
                    <td>${obj.name}</td>
                    <td>${obj.exp}</td>
                    <td>${obj.sal}</td>
                </tr>
                %endfor
            </table>
    </body>
</html>

##################atlast make your print button to do this############### 

 return {
                    'type':'ir.actions.report.xml',
                    'report_name':'report_testing_model',
                    'datas':datas,
                    'context':context

            }

this is sample...

u can get some more details here

   

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: 1/8/15, 1:17 PM
Seen: 674 times
Last updated: 3/16/15, 8:10 AM