[IMP] stock: Stock picking report improvement
Only one picking report that shows the operations. Warning message when no operations. Change title.
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<div class="col-xs-3" name="company_address">
|
||||
<div t-field="company.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}'
|
||||
style="border-bottom: 1px solid black;"/>
|
||||
|
||||
@@ -69,7 +69,6 @@ Dashboard / Reports for Warehouse Management will include:
|
||||
'views/report_package_barcode.xml',
|
||||
'views/report_lot_barcode.xml',
|
||||
'views/report_location_barcode.xml',
|
||||
'views/report_stockpicking.xml',
|
||||
'views/report_stockpicking_operations.xml',
|
||||
'views/report_stockinventory.xml',
|
||||
'report/report_stock_forecast.xml',
|
||||
|
||||
@@ -891,11 +891,6 @@ class stock_picking(models.Model):
|
||||
context = dict(context or {}, active_ids=ids)
|
||||
return self.pool.get("report").get_action(cr, uid, ids, 'stock.report_picking', context=context)
|
||||
|
||||
def do_print_picking_operations(self, cr, uid, ids, context=None):
|
||||
'''This function prints the picking list with the pack operations and should be used in the bar code interface'''
|
||||
context = dict(context or {}, active_ids=ids)
|
||||
return self.pool.get("report").get_action(cr, uid, ids, 'stock.report_picking_operations', context=context)
|
||||
|
||||
def launch_packops(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'launch_pack_operations': True}, context=context)
|
||||
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report
|
||||
string="Picking"
|
||||
id="action_report_picking"
|
||||
model="stock.picking"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_picking"
|
||||
file="stock.report_picking"
|
||||
/>
|
||||
<report
|
||||
string="Picking Operations"
|
||||
id="action_report_picking_operations"
|
||||
id="action_report_picking"
|
||||
model="stock.picking"
|
||||
report_type="qweb-pdf"
|
||||
name="stock.report_picking_operations"
|
||||
name="stock.report_picking"
|
||||
file="stock.report_picking_operations"
|
||||
/>
|
||||
<report
|
||||
|
||||
@@ -694,7 +694,7 @@
|
||||
<button name="action_assign" states="confirmed,waiting" string="Reserve" type="object" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="rereserve_pick" states="partially_available" string="Recheck Reservation" type="object" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="force_assign" states="confirmed,waiting,partially_available" string="Force Availability" type="object" groups="base.group_user"/>
|
||||
<button name="do_print_picking_operations" string="Print Picking List" groups="stock.group_stock_user" type="object" attrs="{'invisible': ['|', ('picking_type_code', '=', 'outgoing'), ('state', 'not in', ('assigned', 'partially_available'))]}"/>
|
||||
<button name="do_print_picking" string="Print Picking List" groups="stock.group_stock_user" type="object" attrs="{'invisible': [('state', 'not in', ('assigned', 'partially_available'))]}"/>
|
||||
<button name="%(act_stock_return_picking)d" string="Reverse Transfer" states="done" type="action" groups="base.group_user"/>
|
||||
<button name="action_cancel" states="assigned,confirmed,partially_available,draft,waiting" string="Cancel Transfer" groups="base.group_user" type="object"/>
|
||||
<button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': [('quant_reserved_exist', '=', False)]}"/>
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_picking">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<div class="row"><div class="col-xs-4 pull-right">
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>
|
||||
</div></div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<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' and o.partner_id">
|
||||
<span><strong>Warehouse Address:</strong></span>
|
||||
</div>
|
||||
<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">
|
||||
<div t-field="o.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>
|
||||
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-5 col-xs-offset-1">
|
||||
<div t-if="o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
|
||||
<span><strong>Delivery Address:</strong></span>
|
||||
<div t-field="o.move_lines[0].partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>
|
||||
</div>
|
||||
<div t-if="o.picking_type_id.code != 'internal' and (not o.move_lines or not o.move_lines[0].partner_id) and o.picking_type_id.warehouse_id.partner_id">
|
||||
<span><strong>Warehouse Address:</strong></span>
|
||||
<div t-field="o.picking_type_id.warehouse_id.partner_id"
|
||||
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
<span t-field="o.picking_type_id"/>:
|
||||
<span t-field="o.name"/>
|
||||
</h2>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Order (Origin)</strong></th>
|
||||
<th><strong>State</strong></th>
|
||||
<th><strong>Commitment Date</strong></th>
|
||||
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="o.origin"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="o.state"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="o.date"/>
|
||||
</td>
|
||||
<td name="td_sched_date">
|
||||
<span t-field="o.min_date"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th class="text-right"><strong>Quantity</strong></th>
|
||||
<t t-if="o.picking_type_id.code != 'incoming'"><th><strong>Source</strong></th></t>
|
||||
<th><strong>Barcode</strong></th>
|
||||
<t t-if="o.picking_type_id.code != 'outgoing'"><th><strong>Destination</strong></th></t>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="o.move_lines" t-as="move">
|
||||
<t t-if="(o.state != 'partially_available') or (move.reserved_availability > 0)">
|
||||
<td><span t-field="move.product_id"/></td>
|
||||
<td class="text-right">
|
||||
<t t-if="o.state == 'partially_available'">
|
||||
<span t-field="move.reserved_availability"/> <span t-field="move.product_id.uom_id" groups="product.group_uom"/>
|
||||
</t>
|
||||
<t t-if="o.state != 'partially_available'">
|
||||
<span t-field="move.product_uom_qty"/> <span t-field="move.product_uom" groups="product.group_uom"/>
|
||||
</t>
|
||||
</td>
|
||||
<t t-if="o.picking_type_id.code != 'incoming'"><td><span t-field="move.location_id"/></td></t>
|
||||
<td>
|
||||
<span t-if="move.product_id and move.product_id.barcode">
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Barcode', move.product_id.barcode, 600, 100)" style="width:300px;height:50px"/>
|
||||
</span>
|
||||
</td>
|
||||
<t t-if="o.picking_type_id.code != 'outgoing'"><td><span t-field="move.location_dest_id"/></td></t>
|
||||
</t>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,14 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_picking_operations">
|
||||
<template id="external_layout_barcode_right" inherit_id="report.external_layout" primary="True">
|
||||
<xpath expr="//t[@t-call='report.external_layout_header']" position="attributes">
|
||||
<attribute name="t-call">stock.external_layout_header_barcode_right</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="external_layout_header_barcode_right" inherit_id="report.external_layout_header" primary="True">
|
||||
<xpath expr="//div[@name='company_address']" position="after">
|
||||
<div class="col-xs-4 pull-right" name="right_box">
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="report_picking">
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="report.external_layout">
|
||||
<t t-call="stock.external_layout_barcode_right">
|
||||
<div class="page">
|
||||
<div class="row"><div class="col-xs-4 pull-right">
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>
|
||||
</div></div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div t-if="o.picking_type_id.code=='incoming' and o.partner_id">
|
||||
@@ -39,10 +49,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
<span t-field="o.picking_type_id"/>:
|
||||
<span t-field="o.name"/>
|
||||
</h2>
|
||||
<br/><br/>
|
||||
<div t-field="o.picking_type_id"/>
|
||||
<h1 t-field="o.name" class="mt0"/>
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -71,7 +80,7 @@
|
||||
</table>
|
||||
<br/>
|
||||
<br/>
|
||||
<table class="table table-condensed">
|
||||
<table class="table table-condensed" t-if="o.pack_operation_ids">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
@@ -111,6 +120,10 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p t-if="not o.pack_operation_ids">
|
||||
You do not have any products reserved for this picking. Please click the 'Reserve' button
|
||||
to check if products are available.
|
||||
</p>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user