<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="print_product_label_template_add_view_form" model="ir.ui.view">
        <field name="name">print.product.label.template.add.view.form</field>
        <field name="model">print.product.label.template.add</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <group>
                        <field name="type_id" widget="selection_badge"/>
                    </group>
                    <group>
                        <separator string="Label" colspan="2"/>
                        <group>
                            <label for="width"/>
                            <div class="o_row"><field name="width" string="Width"/><span class="text-muted"> mm</span></div>
                        </group>
                        <group>
                            <label for="height"/>
                            <div class="o_row"><field name="height" string="Height"/><span class="text-muted"> mm</span></div>
                        </group>
                        <separator string="Layout" colspan="2"/>
                        <group>
                            <field name="cols" title="Cols"/>
                        </group>
                        <group>
                            <field name="rows" title="Rows"/>
                        </group>
                        <separator string="Page" colspan="2"/>
                        <group>
                            <field name="paper_format" widget="radio" options="{'horizontal': true}"/>
                            <field name="page_width"
                                   string="Page Width"
                                   invisible="paper_format != 'custom' or cols == 1 and rows == 1"/>
                        </group>
                        <group>
                            <field name="orientation" widget="radio" options="{'horizontal': true}"/>
                            <field name="page_height"
                                   string="Page Height"
                                   invisible="paper_format != 'custom' or cols == 1 and rows == 1"/>
                        </group>
                    </group>
                </sheet>
                <footer>
                    <button name="action_create"
                            string="Create Template"
                            type="object"
                            icon="fa-plus"
                            class="btn-primary"/>
                    <button special="cancel" class="oe_link" string="Close"/>
                </footer>
            </form>
        </field>
    </record>

</odoo>
