citizen_zpl_printer/views/res_config_settings_views.xml
2026-01-26 11:26:45 +07:00

74 lines
4.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.citizen.zpl</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="stock.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//block[@name='barcode_setting_container']" position="after">
<block title="Citizen ZPL Printer" id="citizen_zpl_printer_settings">
<setting help="Configure the ZPL Printer IP Address and Port">
<field name="zpl_printer_ip" placeholder="e.g. 192.168.1.100"/>
<field name="zpl_printer_port"/>
</setting>
<setting help="Configure Label Dimensions (in dots). 203 DPI: 1mm ~ 8 dots.">
<label for="zpl_label_width" string="Label Size"/>
<div class="text-muted">
Width: <field name="zpl_label_width" class="oe_inline"/> dots
Height: <field name="zpl_label_height" class="oe_inline"/> dots
</div>
</setting>
<setting help="Configure Label Margins (in dots)">
<label for="zpl_margin_left" string="Margins"/>
<div class="text-muted">
Left: <field name="zpl_margin_left" class="oe_inline"/> dots
Top: <field name="zpl_margin_top" class="oe_inline"/> dots
</div>
</setting>
<setting help="Configure Content Sizing (in dots)">
<label for="zpl_font_size" string="Content Size"/>
<div class="text-muted">
Font Size: <field name="zpl_font_size" class="oe_inline"/>
Barcode Height: <field name="zpl_barcode_height" class="oe_inline"/>
Module Width: <field name="zpl_barcode_width" class="oe_inline"/>
</div>
</setting>
<setting help="Configure Image Printing">
<label for="zpl_print_logo" string="Image Settings"/>
<div class="content-group">
<div class="row mt16">
<label for="zpl_print_logo" class="col-lg-3 o_light_label"/>
<field name="zpl_print_logo"/>
</div>
<div class="row mt16">
<label for="zpl_custom_image" class="col-lg-3 o_light_label"/>
<field name="zpl_custom_image" filename="zpl_custom_image_filename"/>
<field name="zpl_custom_image_filename" invisible="1"/>
</div>
</div>
</setting>
<setting string="Configuration Help">
<div class="alert alert-info" role="alert">
<h4 class="alert-heading">Configuration Guide (203 DPI)</h4>
<hr/>
<strong>1. Label Size &amp; Margins (Dots vs CM/MM)</strong><br/>
<ul>
<li><strong>Formula:</strong> <code>1 mm ≈ 8 dots</code> (e.g., 60mm = 480 dots)</li>
<li><strong>Left/Top Margin:</strong> Defines whitespace. <code>8 dots ≈ 1mm</code>.</li>
</ul>
<strong>2. Content Size (Font &amp; Barcode)</strong><br/>
<ul>
<li><strong>Font Size:</strong> Height of text. <code>30 dots ≈ 3.75mm</code>.</li>
<li><strong>Barcode Height:</strong> Height of bars. <code>100 dots ≈ 12.5mm</code>.</li>
<li><strong>Module Width:</strong> Density. <code>2</code> is standard, <code>3+</code> is wider/easier to scan.</li>
</ul>
</div>
</setting>
</block>
</xpath>
</field>
</record>
</odoo>