Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.68 KB | None | 0 0
  1. I am creating report in odoo using qweb template, while I am editing the paper format, I am not getting the desired view, here is my code.
  2.  
  3. <?xml version="1.0" encoding="UTF-8"?>
  4. <openerp>
  5. <data>
  6. <template id="leave_card_report_temp">
  7. <!-- <t t-call="report.html_container">-->
  8. <!-- <t t-foreach="docs" t-as="doc">-->
  9. <t t-call="report.external_layout">
  10. <div class="page" style="width:860px;">
  11. <!--<img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height:60px;align:left"/>-->
  12. <h3><p style="text-center;">Leave Card</p></h3>
  13.  
  14. <br/>
  15.  
  16. <style>
  17. table, th, td {
  18. border: 2px solid black;
  19.  
  20. border-collapse: collapse;
  21. }
  22. th, td {
  23. padding: 5px;
  24. text-align: left;
  25. }
  26. </style>
  27.  
  28. <table style="width:860px;font-Size:11px; border:1px solid black;border-collapse:collapse;border-bottom:1px solid white;">
  29. <!-- <t t-foreach="docs" t-as="doc">-->
  30. <!-- <t t-if="o.name">-->
  31. <tr>
  32.  
  33. <td><strong>Name:</strong></td>
  34. <td>
  35.  
  36. <!-- <span t-field="doc.name"/>-->
  37.  
  38. </td>
  39.  
  40. <td><strong>Designation:</strong></td>
  41. <!-- <td><span t-field="designation"/></td>-->
  42. <td><strong>Department:</strong></td>
  43. <!-- <td><span t-field="department"/></td>-->
  44. <td><strong>Employee Code:</strong></td>
  45. <!-- <td><span t-field="name"/></td>-->
  46. </tr>
  47. <tr>
  48. <td><strong>DOJ(C):</strong></td><td></td>
  49. <td><strong>DOJ(R):</strong></td><td></td>
  50. </tr>
  51. <!-- </t> -->
  52.  
  53. </table>
  54. <br/>
  55. <br/>
  56. <table cellspacing="1" cellpadding="4" border="3" class = "table table-striped">
  57. <!--<table style="width:860px;font-Size:11px; border:1px solid black;border-collapse:collapse;border-bottom:1px solid white;">-->
  58. <tr>
  59. <th width="70" rowspan="2" >DATE FROM</th>
  60. <th width="70" rowspan="2" >DATE TO</th>
  61. <th width="70" rowspan="2" >No Of Days</th>
  62. <th colspan="3"> CL</th>
  63. <th colspan="4"> EL</th>
  64. <th width="70" rowspan="2">LOP</th>
  65. <th colspan="2">INITIALS</th>
  66. <th width="70" rowspan="2"> REMARKS</th>
  67. </tr>
  68.  
  69. <tr align="right">
  70. <th width="70">Earned</th>
  71. <th width="70">Availed</th>
  72. <th width="70">Balance</th>
  73. <th width="70">Earned</th>
  74. <th width="70">Availed</th>
  75. <th width="70">Balance</th>
  76. <th width="70">Encashment</th>
  77. <th width="70">Reporting Officer</th>
  78. <th width="70">Reviewing Officer</th>
  79.  
  80. </tr>
  81. <tbody>
  82. <t t-foreach = "docs" t-as = "doc">
  83. <tr>
  84.  
  85. <td><span t-field="doc.date_from"/></td>
  86. <td><span t-field="doc.date_to"/></td>
  87. <td><span t-field="doc.no_of_days"/></td>
  88. <td><span t-field = "doc.earned_cl"/></td>
  89. <td><span t-field = "doc.availed_cl"/></td>
  90. <td><span t-field = "doc.balance_cl"/></td>
  91. <td><span t-field = "doc.earned_el"/></td>
  92. <td><span t-field = "doc.availed_el"/></td>
  93. <td><span t-field = "doc.balance_el"/></td>
  94. <td><span t-field = "doc.encash"/></td>
  95. <td><span t-field = "doc.loss_of_pay"/></td>
  96. <td><span t-field = "doc.reporting_officer"/></td>
  97. <td><span t-field = "doc.reviewing_officer"/></td>
  98. <td><span t-field = "doc.remark"/></td>
  99. </tr>
  100. </t>
  101. </tbody>
  102. </table>
  103.  
  104.  
  105.  
  106. </div>
  107.  
  108. </t>
  109. <!-- </t>-->
  110. <!-- </t>-->
  111. </template>
  112. <template id="leave_card_view">
  113. <t t-call="report.html_container">
  114. <t t-foreach="doc_ids" t-as="doc_id">
  115. <t t-raw="translate_doc(doc_id, doc_model, 'leaves_management.leave_card_report_temp')"/>
  116. </t>
  117. </t>
  118. </template>
  119.  
  120. </data>
  121. </openerp>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement