|
1 |
| -<?xml version="1.0" encoding="UTF-8"?> |
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
2 | 2 | <odoo>
|
3 |
| - |
4 | 3 | <record id="qweb_pdf_export" model="ir.actions.report">
|
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</field> |
8 |
| - <field name="report_name">mis_builder.report_mis_report_instance</field> |
9 |
| - <field name="report_type">qweb-pdf</field> |
| 4 | + <field name="name">MIS report instance QWEB PDF report</field> |
| 5 | + <field name="model">mis.report.instance</field> |
| 6 | + <field name="type">ir.actions.report</field> |
| 7 | + <field name="report_name">mis_builder.report_mis_report_instance</field> |
| 8 | + <field name="report_type">qweb-pdf</field> |
10 | 9 | </record>
|
11 |
| - |
12 | 10 | <template id="assets_report" inherit_id="web.report_assets_common">
|
13 | 11 | <xpath expr="." position="inside">
|
14 |
| - <link href="/mis_builder/static/src/css/report.css" rel="stylesheet"/> |
| 12 | + <link href="/mis_builder/static/src/css/report.css" rel="stylesheet" /> |
15 | 13 | </xpath>
|
16 | 14 | </template>
|
17 |
| - |
18 | 15 | <!--
|
19 | 16 | TODO we use divs with css table layout, but this has drawbacks:
|
20 | 17 | (bad layout of first column, no colspan for first header row),
|
21 | 18 | consider getting back to a plain HTML table.
|
22 | 19 | -->
|
23 |
| - |
24 | 20 | <template id="report_mis_report_instance">
|
25 |
| - <t t-call="web.html_container"> |
26 |
| - <t t-foreach="docs" t-as="o"> |
27 |
| - <t t-call="web.internal_layout"> |
28 |
| - <t t-set="matrix" t-value="o._compute_matrix()"/> |
29 |
| - <t t-set="style_obj" t-value="o.env['mis.report.style']"/> |
30 |
| - <div class="page"> |
31 |
| - <h3><span t-field="o.name" /><span> - </span> |
32 |
| - <t t-foreach="o.query_company_ids" t-as="company"> |
33 |
| - <span t-field="company.name" /><span t-if="company != o.query_company_ids[-1]">, </span> |
34 |
| - </t> |
35 |
| - </h3> |
36 |
| - <p> |
37 |
| - <div class="mis_report_filers"> |
38 |
| - <t t-foreach="o.get_filter_descriptions_from_context()" t-as="filter_description"> |
39 |
| - <div> |
40 |
| - <span t-esc="filter_description"/> |
41 |
| - </div> |
42 |
| - </t> |
43 |
| - </div> |
44 |
| - </p> |
45 |
| - <div class="mis_table"> |
46 |
| - <div class="mis_thead"> |
47 |
| - <div class="mis_row"> |
48 |
| - <div class="mis_cell mis_collabel"></div> |
49 |
| - <t t-foreach="matrix.iter_cols()" t-as="col"> |
50 |
| - <div class="mis_cell mis_collabel"> |
51 |
| - <t t-esc="col.label"/> |
52 |
| - <t t-if="col.description"> |
53 |
| - <br/> |
54 |
| - <t t-esc="col.description"/> |
55 |
| - </t> |
56 |
| - </div> |
57 |
| - <!-- add empty cells because we have no colspan with css tables --> |
58 |
| - <t t-foreach="list(col.iter_subcols())[1:]" t-as="subcol"> |
59 |
| - <div class="mis_cell mis_collabel"></div> |
60 |
| - </t> |
61 |
| - </t> |
62 |
| - </div> |
63 |
| - <div class="mis_row"> |
64 |
| - <div class="mis_cell mis_collabel"></div> |
65 |
| - <t t-foreach="matrix.iter_subcols()" t-as="subcol"> |
66 |
| - <div class="mis_cell mis_collabel"> |
67 |
| - <t t-esc="subcol.label"/> |
68 |
| - <t t-if="subcol.description"> |
69 |
| - <br/> |
70 |
| - <t t-esc="subcol.description"/> |
71 |
| - </t> |
72 |
| - </div> |
73 |
| - </t> |
74 |
| - </div> |
75 |
| - </div> |
76 |
| - <div class="mis_tbody"> |
77 |
| - <t t-foreach="matrix.iter_rows()" t-as="row"> |
78 |
| - <div t-if="not ((row.style_props.hide_empty and row.is_empty()) or row.style_props.hide_always)" class="mis_row"> |
79 |
| - <div t-att-style="style_obj.to_css_style(row.style_props)" class="mis_cell mis_rowlabel"> |
80 |
| - <t t-esc="row.label"/> |
81 |
| - <t t-if="row.description"> |
82 |
| - <br/> |
83 |
| - <t t-esc="row.description"/> |
84 |
| - </t> |
85 |
| - </div> |
86 |
| - <t t-foreach="row.iter_cells()" t-as="cell"> |
87 |
| - <div t-att-style="cell and style_obj.to_css_style(cell.style_props) or ''" class="mis_cell mis_amount"> |
88 |
| - <t t-esc="cell and cell.val_rendered or ''"/> |
| 21 | + <t t-call="web.html_container"> |
| 22 | + <t t-foreach="docs" t-as="o"> |
| 23 | + <t t-call="web.internal_layout"> |
| 24 | + <t t-set="matrix" t-value="o._compute_matrix()" /> |
| 25 | + <t t-set="style_obj" t-value="o.env['mis.report.style']" /> |
| 26 | + <div class="page"> |
| 27 | + <h3> |
| 28 | + <span t-field="o.name" /> |
| 29 | + <span> - </span> |
| 30 | + <t t-foreach="o.query_company_ids" t-as="company"> |
| 31 | + <span t-field="company.name" /> |
| 32 | + <span |
| 33 | + t-if="company != o.query_company_ids[-1]" |
| 34 | + >, </span> |
| 35 | + </t> |
| 36 | + </h3> |
| 37 | + <p> |
| 38 | + <div class="mis_report_filers"> |
| 39 | + <t |
| 40 | + t-foreach="o.get_filter_descriptions_from_context()" |
| 41 | + t-as="filter_description" |
| 42 | + > |
| 43 | + <div> |
| 44 | + <span t-esc="filter_description" /> |
| 45 | + </div> |
| 46 | + </t> |
| 47 | + </div> |
| 48 | + </p> |
| 49 | + <div class="mis_table"> |
| 50 | + <div class="mis_thead"> |
| 51 | + <div class="mis_row"> |
| 52 | + <div class="mis_cell mis_collabel" /> |
| 53 | + <t t-foreach="matrix.iter_cols()" t-as="col"> |
| 54 | + <div class="mis_cell mis_collabel"> |
| 55 | + <t t-esc="col.label" /> |
| 56 | + <t t-if="col.description"> |
| 57 | + <br /> |
| 58 | + <t t-esc="col.description" /> |
| 59 | + </t> |
| 60 | + </div> |
| 61 | + <!-- add empty cells because we have no colspan with css tables --> |
| 62 | + <t |
| 63 | + t-foreach="list(col.iter_subcols())[1:]" |
| 64 | + t-as="subcol" |
| 65 | + > |
| 66 | + <div class="mis_cell mis_collabel" /> |
| 67 | + </t> |
| 68 | + </t> |
| 69 | + </div> |
| 70 | + <div class="mis_row"> |
| 71 | + <div class="mis_cell mis_collabel" /> |
| 72 | + <t t-foreach="matrix.iter_subcols()" t-as="subcol"> |
| 73 | + <div class="mis_cell mis_collabel"> |
| 74 | + <t t-esc="subcol.label" /> |
| 75 | + <t t-if="subcol.description"> |
| 76 | + <br /> |
| 77 | + <t t-esc="subcol.description" /> |
| 78 | + </t> |
| 79 | + </div> |
| 80 | + </t> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + <div class="mis_tbody"> |
| 84 | + <t t-foreach="matrix.iter_rows()" t-as="row"> |
| 85 | + <div |
| 86 | + t-if="not ((row.style_props.hide_empty and row.is_empty()) or row.style_props.hide_always)" |
| 87 | + class="mis_row" |
| 88 | + > |
| 89 | + <div |
| 90 | + t-att-style="style_obj.to_css_style(row.style_props)" |
| 91 | + class="mis_cell mis_rowlabel" |
| 92 | + > |
| 93 | + <t t-esc="row.label" /> |
| 94 | + <t t-if="row.description"> |
| 95 | + <br /> |
| 96 | + <t t-esc="row.description" /> |
| 97 | + </t> |
| 98 | + </div> |
| 99 | + <t t-foreach="row.iter_cells()" t-as="cell"> |
| 100 | + <div |
| 101 | + t-att-style="cell and style_obj.to_css_style(cell.style_props) or ''" |
| 102 | + class="mis_cell mis_amount" |
| 103 | + > |
| 104 | + <t |
| 105 | + t-esc="cell and cell.val_rendered or ''" |
| 106 | + /> |
| 107 | + </div> |
| 108 | + </t> |
| 109 | + </div> |
| 110 | + </t> |
| 111 | + </div> |
89 | 112 | </div>
|
90 |
| - </t> |
91 | 113 | </div>
|
92 |
| - </t> |
93 |
| - </div> |
94 |
| - </div> |
95 |
| - </div> |
96 |
| - </t> |
| 114 | + </t> |
| 115 | + </t> |
97 | 116 | </t>
|
98 |
| - </t> |
99 | 117 | </template>
|
100 |
| - |
101 | 118 | </odoo>
|
0 commit comments