[IMP] Adapt barcodes on picking report, warehouse should be passed from move picking type if not defined, prodlot in mrp_repair, picking types

This commit is contained in:
Josse Colpaert 2014-06-10 16:06:52 +02:00
parent 1c04f4d3d1
commit 8ea9bff314
4 changed files with 12 additions and 10 deletions

View File

@ -30,7 +30,7 @@
<h2>
<span t-if="o.state != 'draft'">Repair Order N°:</span>
<span t-if="o.state == 'draft'">Repair Quotation N°:</span>
<span t-if="o.state == 'draft'">Repair Quotation N°:</span>
<span t-field="o.name"/>
</h2>
@ -41,7 +41,9 @@
</div>
<div class="col-xs-3" groups="stock.group_production_lot">
<strong>Lot Number</strong>
<span t-field="o.prodlot_id.name"/>
<t t-if="o.lot_id">
<span t-field="o.lot_id.name"/>
</t>
</div>
<div t-if="o.guarantee_limit" class="col-xs-3">
<strong>Guarantee Limit:</strong>

View File

@ -50,7 +50,7 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_picking_rule">
<record model="ir.rule" id="stock_picking_type_rule">
<field name="name">Stock Picking Type multi-company</field>
<field name="model_id" search="[('model','=','stock.picking.type')]" model="ir.model"/>
<field name="global" eval="True"/>

View File

@ -1789,7 +1789,7 @@ class stock_move(osv.osv):
'move_dest_id': move.id,
'group_id': group_id,
'route_ids': [(4, x.id) for x in move.route_ids],
'warehouse_id': move.warehouse_id and move.warehouse_id.id or False,
'warehouse_id': move.warehouse_id.id or (move.picking_type_id and move.picking_type_id.warehouse_id.id or False),
'priority': move.priority,
}

View File

@ -6,16 +6,16 @@
<t t-foreach="docs" t-as="o">
<t t-call="report.external_layout">
<div class="page">
<div class="row"><div class="col-xs-12">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s' % ('Code128', o.name)" style="width:300px;height:50px;text-align:right;"/>
<div class="row"><div class="col-xs-4 pull-right">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>
</div></div>
<div t-if="o.picking_type_id.code=='incoming'">
<div t-if="o.picking_type_id.code=='incoming' and o.partner_id">
<span><strong>Supplier Address:</strong></span>
</div>
<div t-if="o.picking_type_id.code=='internal'">
<div t-if="o.picking_type_id.code=='internal' and o.partner_id">
<span><strong>Warehouse Address:</strong></span>
</div>
<div t-if="o.picking_type_id.code=='outgoing'">
<div t-if="o.picking_type_id.code=='outgoing' and o.partner_id">
<span><strong>Customer Address:</strong></span>
</div>
<div t-if="o.partner_id" name="partner_header">
@ -107,7 +107,7 @@
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', pack_operation.lot_id.name, 600, 100)" style="width:300px;height:50px"/>
</span>
<span t-if="pack_operation.product_id and not pack_operation.lot_id and pack_operation.product_id.ean13">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s' % ('EAN13', pack_operation.product_id.ean13)" style="width:300px;height:50px"/>
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', pack_operation.product_id.ean13, 600, 100)" style="width:300px;height:50px"/>
</span>
<span t-if="pack_operation.package_id and not pack_operation.product_id">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', pack_operation.package_id.name, 600, 100)" style="width:300px;height:50px"/>