|
2 | 2 | <odoo>
|
3 | 3 |
|
4 | 4 | <template id="report_label_template">
|
5 |
| - <t t-call="web.basic_layout"> |
6 |
| - <t t-set="full_width" t-value="True" /> |
7 |
| - <t t-set="label_style"> |
8 |
| - height: <t t-esc="label_format['label_height']" />mm; |
9 |
| - width: <t t-esc="label_format['label_width']" />mm; |
10 |
| - padding-top: <t t-esc="label_format['label_padding_top']" />mm; |
11 |
| - padding-right: <t t-esc="label_format['label_padding_right']" />mm; |
12 |
| - padding-bottom: <t t-esc="label_format['label_padding_bottom']" />mm; |
13 |
| - padding-left: <t t-esc="label_format['label_padding_left']" />mm; |
14 |
| - margin-top: <t t-esc="label_format['label_margin_top']" />mm; |
15 |
| - margin-right: <t t-esc="label_format['label_margin_right']" />mm; |
16 |
| - margin-bottom: <t t-esc="label_format['label_margin_bottom']" />mm; |
17 |
| - margin-left: <t t-esc="label_format['label_margin_left']" />mm; |
18 |
| - display: inline-block; |
19 |
| - overflow: hidden; |
20 |
| - float: left; |
21 |
| - position: relative; |
22 |
| - page-break-inside: avoid; |
23 |
| - box-sizing: border-box; |
24 |
| - </t> |
| 5 | + |
| 6 | + <t t-call="web.report_layout"> |
| 7 | + <style type="text/css"> |
| 8 | +html, body { |
| 9 | + margin: 0px; |
| 10 | + padding: 0px; |
| 11 | +} |
| 12 | +.label_style { |
| 13 | + height: <t t-esc="label_format['label_height']" />mm; |
| 14 | + width: <t t-esc="label_format['label_width']" />mm; |
| 15 | + padding-top: <t t-esc="label_format['label_padding_top']" />mm; |
| 16 | + padding-right: <t t-esc="label_format['label_padding_right']" />mm; |
| 17 | + padding-bottom: <t t-esc="label_format['label_padding_bottom']" />mm; |
| 18 | + padding-left: <t t-esc="label_format['label_padding_left']" />mm; |
| 19 | + margin-top: <t t-esc="label_format['label_margin_top']" />mm; |
| 20 | + margin-right: <t t-esc="label_format['label_margin_right']" />mm; |
| 21 | + margin-bottom: <t t-esc="label_format['label_margin_bottom']" />mm; |
| 22 | + margin-left: <t t-esc="label_format['label_margin_left']" />mm; |
| 23 | + background-color: <t t-esc="label_format['label_background_color']" />; |
| 24 | + display: inline-block; |
| 25 | + overflow: hidden; |
| 26 | + float: left; |
| 27 | + position: relative; |
| 28 | + page-break-inside: avoid; |
| 29 | + box-sizing: border-box; |
| 30 | +} |
| 31 | + </style> |
| 32 | + |
25 | 33 | <!-- Offset: Skip the first [offset] labels -->
|
26 | 34 | <t t-foreach="range(0, offset)" t-as="i">
|
27 |
| - <div t-att-style="label_style" /> |
| 35 | + <div class="label_style" /> |
28 | 36 | </t>
|
29 | 37 | <t t-foreach="lines" t-as="line">
|
30 | 38 | <t t-foreach="range(0, line['quantity'])" t-as="i">
|
31 |
| - <div t-att-style="label_style"> |
| 39 | + <div class="label_style"> |
32 | 40 | <t t-call="{{label_template}}">
|
33 | 41 | <t
|
34 | 42 | t-set="record"
|
|
0 commit comments