[ADD] stock: add new report for package that only show package barcode
This commit is contained in:
parent
d421f9a365
commit
6e201cdcdb
|
@ -3620,7 +3620,7 @@ class stock_package(osv.osv):
|
||||||
|
|
||||||
def action_print(self, cr, uid, ids, context=None):
|
def action_print(self, cr, uid, ids, context=None):
|
||||||
context = dict(context or {}, active_ids=ids)
|
context = dict(context or {}, active_ids=ids)
|
||||||
return self.pool.get("report").get_action(cr, uid, ids, 'stock.report_package_barcode', context=context)
|
return self.pool.get("report").get_action(cr, uid, ids, 'stock.report_package_barcode_small', context=context)
|
||||||
|
|
||||||
|
|
||||||
def unpack(self, cr, uid, ids, context=None):
|
def unpack(self, cr, uid, ids, context=None):
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
file="stock.report_inventory"
|
file="stock.report_inventory"
|
||||||
/>
|
/>
|
||||||
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Stock Level Forecast"/>
|
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Stock Level Forecast"/>
|
||||||
<report id="action_report_quant_package_barcode" model="stock.quant.package" report_type="qweb-pdf" name="stock.report_package_barcode" string="Package BarCode" file="stock.report_package_barcode"/>
|
<report id="action_report_quant_package_barcode" model="stock.quant.package" report_type="qweb-pdf" name="stock.report_package_barcode" string="Package BarCode with Contents" file="stock.report_package_barcode"/>
|
||||||
|
<report id="action_report_quant_package_barcode_small" model="stock.quant.package" report_type="qweb-pdf" name="stock.report_package_barcode_small" string="Package BarCode" file="stock.report_package_barcode"/>
|
||||||
<report id="action_report_location_barcode" model="stock.location" report_type="qweb-pdf" name="stock.report_location_barcode" string="Location BarCode" file="stock.report_location_barcode"/>
|
<report id="action_report_location_barcode" model="stock.location" report_type="qweb-pdf" name="stock.report_location_barcode" string="Location BarCode" file="stock.report_location_barcode"/>
|
||||||
<report id="action_report_lot_barcode" model="stock.production.lot" report_type="qweb-pdf" name="stock.report_lot_barcode" string="Lot BarCode" file="stock.report_lot_barcode"/>
|
<report id="action_report_lot_barcode" model="stock.production.lot" report_type="qweb-pdf" name="stock.report_lot_barcode" string="Lot BarCode" file="stock.report_lot_barcode"/>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -38,10 +38,29 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 mt32">
|
<div class="col-xs-12 mt32 text-center">
|
||||||
<table class="table table-condensed" style="border-bottom: 3px solid black !important;"><thead><th> </th></thead></table>
|
<table class="table table-condensed" style="border-bottom: 3px solid black !important;"><thead><th> </th></thead></table>
|
||||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px"/>
|
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px"/>
|
||||||
<p class="text-center" t-field="o.name"></p>
|
<p t-field="o.name"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="report_package_barcode_small">
|
||||||
|
<t t-call="report.html_container">
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t>
|
||||||
|
<div class="page">
|
||||||
|
<div class="oe_structure"/>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12 mt32 text-center">
|
||||||
|
<table class="table table-condensed" style="border-bottom: 3px solid black !important;"><thead><th> </th></thead></table>
|
||||||
|
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px"/>
|
||||||
|
<p t-field="o.name"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue