You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
3.6 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="qweb_pdf_export" model="ir.actions.report.xml">
  5. <field name="name">MIS report instance QWEB PDF report</field>
  6. <field name="model">mis.report.instance</field>
  7. <field name="type">ir.actions.report.xml</field>
  8. <field name="report_name">mis_builder.report_mis_report_instance</field>
  9. <field name="report_type">qweb-pdf</field>
  10. <field name="auto" eval="False"/>
  11. </record>
  12. <template id="assets_report" inherit_id="report.assets_common">
  13. <xpath expr="." position="inside">
  14. <link href="/mis_builder/static/src/css/report.css" rel="stylesheet"/>
  15. </xpath>
  16. </template>
  17. <!--
  18. TODO we use divs with css table layout, but this has drawbacks:
  19. (bad layout of first column, no colspan for first header row),
  20. consider getting back to a plain HTML table.
  21. -->
  22. <template id="report_mis_report_instance">
  23. <t t-call="report.html_container">
  24. <t t-foreach="docs" t-as="o">
  25. <t t-call="report.internal_layout">
  26. <t t-set="matrix" t-value="o._compute_matrix()"/>
  27. <t t-set="style_obj" t-value="o.env['mis.report.style']"/>
  28. <div class="page">
  29. <h2><span t-field="o.name" /> - <span t-field="o.company_id.name" /></h2>
  30. <div class="mis_table">
  31. <div class="mis_thead">
  32. <div class="mis_row">
  33. <div class="mis_cell mis_collabel"></div>
  34. <t t-foreach="matrix.iter_cols()" t-as="col">
  35. <div class="mis_cell mis_collabel">
  36. <t t-esc="col.label"/>
  37. <t t-if="col.description">
  38. <br/>
  39. <t t-esc="col.description"/>
  40. </t>
  41. </div>
  42. <!-- add empty cells because we have no colspan with css tables -->
  43. <t t-foreach="list(col.iter_subcols())[1:]" t-as="subcol">
  44. <div class="mis_cell mis_collabel"></div>
  45. </t>
  46. </t>
  47. </div>
  48. <div class="mis_row">
  49. <div class="mis_cell mis_collabel"></div>
  50. <t t-foreach="matrix.iter_subcols()" t-as="subcol">
  51. <div class="mis_cell mis_collabel">
  52. <t t-esc="subcol.label"/>
  53. <t t-if="subcol.description">
  54. <br/>
  55. <t t-esc="subcol.description"/>
  56. </t>
  57. </div>
  58. </t>
  59. </div>
  60. </div>
  61. <div class="mis_tbody">
  62. <div t-foreach="matrix.iter_rows()" t-as="row" class="mis_row">
  63. <div t-att-style="style_obj.to_css_style(row.style_props)" class="mis_cell mis_rowlabel">
  64. <t t-esc="row.label"/>
  65. <t t-if="row.description">
  66. <br/>
  67. <t t-esc="row.description"/>
  68. </t>
  69. </div>
  70. <t t-foreach="row.iter_cells()" t-as="cell">
  71. <div t-att-style="cell and style_obj.to_css_style(cell.style_props) or ''" class="mis_cell mis_amount">
  72. <t t-esc="cell and cell.val_rendered or ''"/>
  73. </div>
  74. </t>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </t>
  80. </t>
  81. </t>
  82. </template>
  83. </data>
  84. </openerp>