[IMP] stock, stock_zebra: add label on picking type
This commit adds the posibility to print labels containing the barcode of a picking type. There are two available formats : pdf or zpl
This commit is contained in:
@@ -164,5 +164,30 @@
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
<template id="report_picking_type_label">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div class="page">
|
||||
<div class="oe_structure"/>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<table class="table table-condensed" style="border-bottom: 0px solid white !important;width: 3in;">
|
||||
<tr>
|
||||
<th style="text-align: left;">
|
||||
<span t-field="o.name"/>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center; vertical-align: middle;" class="col-5">
|
||||
<img t-if="o.barcode" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.barcode, 600, 150)" style="width:100%;height:20%;"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -60,6 +60,15 @@
|
||||
file="stock.report_lot_label"
|
||||
print_report_name="'Lot-Serial - %s' % object.name"
|
||||
/>
|
||||
<report
|
||||
string="Operation type (PDF)"
|
||||
id="action_report_picking_type_label"
|
||||
model="stock.picking.type"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_picking_type_label"
|
||||
file="stock.report_picking_type_label"
|
||||
print_report_name="'Operation-type - %s' % object.name"
|
||||
/>
|
||||
<report
|
||||
id="action_report_stock_rule"
|
||||
model="product.template"
|
||||
|
||||
@@ -35,5 +35,21 @@
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="label_picking_type_view">
|
||||
<t t-foreach="docs" t-as="operation">
|
||||
<t t-translation="off">
|
||||
^XA
|
||||
^FO100,50
|
||||
^A0N,44,33^FD<t t-esc="operation.name"/>^FS
|
||||
<t t-if="operation.barcode">
|
||||
^FO100,100
|
||||
^BCN,100,Y,N,N
|
||||
^FD<t t-esc="operation.barcode"/>^FS
|
||||
</t>
|
||||
^XZ
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -57,5 +57,12 @@
|
||||
file="stock_zebra.label_product_packaging_view"
|
||||
report_type="qweb-text"
|
||||
/>
|
||||
<report id="label_picking_type"
|
||||
model="stock.picking.type"
|
||||
string="Operation type (ZPL)"
|
||||
name="stock_zebra.label_picking_type_view"
|
||||
file="stock_zebra.label_picking_type_view"
|
||||
report_type="qweb-text"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user