[IMP] stock_picking_batch: usability changes in the batch picking report

Improve batch picking demo data.

The first page shows the summary of all the pickings. next page onwards we can see the picking information in the report.

task-1889404

Closes #29209
This commit is contained in:
Prakash Prajapati
2019-07-31 08:04:38 +00:00
committed by William Henrotin
parent eccabdab42
commit 56f5bb2e20
2 changed files with 62 additions and 11 deletions
@@ -9,6 +9,45 @@
<field name="state">in_progress</field>
</record>
<!-- Resource: stock.inventory -->
<record id="stock_inventory_1" model="stock.inventory">
<field name="name">Starting Inventory</field>
</record>
<!-- Resource: stock.inventory.line -->
<record id="stock_inventory_line_0" model="stock.inventory.line">
<field name="product_id" ref="product.consu_delivery_01"/>
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_picking_batch.stock_inventory_1"/>
<field name="product_qty">10.0</field>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_inventory_line_1" model="stock.inventory.line">
<field name="product_id" ref="product.consu_delivery_02"/>
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_picking_batch.stock_inventory_1"/>
<field name="product_qty">10.0</field>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<record id="stock_inventory_line_3" model="stock.inventory.line">
<field name="product_id" ref="product.consu_delivery_03"/>
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_picking_batch.stock_inventory_1"/>
<field name="product_qty">20.0</field>
<field name="location_id" ref="stock.stock_location_stock"/>
</record>
<!-- Inventory start -->
<function model="stock.inventory" name="_action_start">
<function eval="[[('state','=','draft'),('id', '=', ref('stock_inventory_1'))]]" model="stock.inventory" name="search"/>
</function>
<!-- Inventory validate -->
<function model="stock.inventory" name="action_validate">
<function eval="[[('state','=','confirm'),('id', '=', ref('stock_inventory_1'))]]" model="stock.inventory" name="search"/>
</function>
<!-- Add picking -->
<record id="Picking_A" model="stock.picking">
<field name="move_type">one</field>
@@ -46,7 +85,7 @@
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="product_uom_qty">10</field>
<field name="product_uom" ref="uom.product_uom_unit" />
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_id" ref="product.consu_delivery_01"/>
</record>
<record id="stock_move2" model="stock.move">
<field name="name">A second stock move</field>
@@ -54,9 +93,9 @@
<field name="picking_id" ref="Picking_A"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="product_uom_qty">5</field>
<field name="product_uom_qty">10</field>
<field name="product_uom" ref="uom.product_uom_unit" />
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_id" ref="product.consu_delivery_02"/>
</record>
<record id="stock_move3" model="stock.move">
<field name="name">A third stock move</field>
@@ -66,7 +105,7 @@
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="product_uom_qty">10</field>
<field name="product_uom" ref="uom.product_uom_unit" />
<field name="product_id" ref="product.product_order_01"/>
<field name="product_id" ref="product.consu_delivery_03"/>
</record>
<record id="stock_move4" model="stock.move">
<field name="name">A fourth stock move</field>
@@ -74,8 +113,24 @@
<field name="picking_id" ref="Picking_C"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_output"/>
<field name="product_uom_qty">10</field>
<field name="product_uom" ref="uom.product_uom_unit" />
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_id" ref="product.consu_delivery_03"/>
</record>
<!-- Confirm Pickings -->
<function model="stock.picking" name="action_confirm">
<value eval="[
ref('stock_picking_batch.Picking_A'),
ref('stock_picking_batch.Picking_B'),
ref('stock_picking_batch.Picking_C')]"/>
</function>
<!-- Check Availability Pickings -->
<function model="stock.picking" name="action_assign">
<value eval="[
ref('stock_picking_batch.Picking_A'),
ref('stock_picking_batch.Picking_B'),
ref('stock_picking_batch.Picking_C')]"/>
</function>
</odoo>
@@ -22,7 +22,6 @@
<th>Picking Reference</th>
<th>Barcode</th>
<th>Status</th>
<th>Commitment Date</th>
<th>Scheduled Date</th>
</tr>
</thead>
@@ -32,14 +31,11 @@
<span t-field="pick.name"/>
</td>
<td>
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', pick.name, 300, 50)" alt="Barcode"/>
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;quiet=%s' % ('Code128', pick.name, 200, 50, 0)" alt="Barcode"/>
</td>
<td>
<span t-field="pick.state"/>
</td>
<td>
<span t-field="pick.date"/>
</td>
<td >
<span t-field="pick.scheduled_date"/>
</td>
@@ -61,7 +57,7 @@
<tr>
<th>Product</th>
<th>Quantity</th>
<th width="27%">Destination</th>
<th width="27%">To</th>
<th width="23%">Picking</th>
<th t-if="has_serial_number" width="15%">
<strong>Lot/Serial Number</strong>