Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3155 Lượt xem

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 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

##################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

   

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 9 18
5565
0
thg 2 16
3660
0
thg 8 15
5510
1
thg 3 15
465
3
thg 3 15
445