mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] allow to create report.paperformat.label without creating each time report.paperformat item [FIX] Remove useless data that are specific Label: Agipa 114016 [REF] simplify UI, removing custom entry for ir.actions.server [ADD] migration script to migrate name field [IMP] Add label_background_color to allow to easily define background-color for label. (That can be usefull to debug label positions) [DOC] update screenshots to new V16 versions [IMP] Set body and html margin to 0 to to able to be predictive when designing a label sheet [IMP] replace style by class in the label template, reducing the size of the html code generated. [IMP] replace label_template by label_template_view_id on the ir.actions.server model, removing useless xml and python code. (provide migration scripts) [REF] Split wizard file into wizard and wizard line file, following OCA guidelines
61 lines
2.3 KiB
XML
61 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
|
|
<template id="report_label_template">
|
|
|
|
<t t-call="web.report_layout">
|
|
<style type="text/css">
|
|
html, body {
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
.label_style {
|
|
height: <t t-esc="label_format['label_height']" />mm;
|
|
width: <t t-esc="label_format['label_width']" />mm;
|
|
padding-top: <t t-esc="label_format['label_padding_top']" />mm;
|
|
padding-right: <t t-esc="label_format['label_padding_right']" />mm;
|
|
padding-bottom: <t t-esc="label_format['label_padding_bottom']" />mm;
|
|
padding-left: <t t-esc="label_format['label_padding_left']" />mm;
|
|
margin-top: <t t-esc="label_format['label_margin_top']" />mm;
|
|
margin-right: <t t-esc="label_format['label_margin_right']" />mm;
|
|
margin-bottom: <t t-esc="label_format['label_margin_bottom']" />mm;
|
|
margin-left: <t t-esc="label_format['label_margin_left']" />mm;
|
|
background-color: <t t-esc="label_format['label_background_color']" />;
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
float: left;
|
|
position: relative;
|
|
page-break-inside: avoid;
|
|
box-sizing: border-box;
|
|
}
|
|
</style>
|
|
|
|
<!-- Offset: Skip the first [offset] labels -->
|
|
<t t-foreach="range(0, offset)" t-as="i">
|
|
<div class="label_style" />
|
|
</t>
|
|
<t t-foreach="lines" t-as="line">
|
|
<t t-foreach="range(0, line['quantity'])" t-as="i">
|
|
<div class="label_style">
|
|
<t t-call="{{label_template}}">
|
|
<t
|
|
t-set="record"
|
|
t-value="docs.env[res_model].browse(line['res_id'])"
|
|
/>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
<record id="report_label" model="ir.actions.report">
|
|
<field name="name">Label Report</field>
|
|
<field name="model">report.label.wizard</field>
|
|
<field name="report_type">qweb-pdf</field>
|
|
<field name="report_name">report_label.report_label_template</field>
|
|
<field name="report_file">report_label.report_label_template</field>
|
|
</record>
|
|
|
|
</odoo>
|