Skip to content
Permalink
Browse files

[FIX] stock_picking_batch: Fixed 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.

TaskID: 1889404

closes #29209
  • Loading branch information...
ppr-odoo committed Feb 20, 2019
1 parent ccbf8ef commit 2a752969f3434e94100c2cb3db290191cf2c755d
Showing with 57 additions and 5 deletions.
  1. +57 −5 addons/stock_picking_batch/data/stock_picking_batch_demo.xml
@@ -9,6 +9,42 @@
<field name="state">in_progress</field>
</record>

<!-- Resource: stock.inventory -->
<record id="stock_inventory_1" model="stock.inventory">
<field name="name">Starting Inventory</field>
<field name="filter">none</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 Validate -->
<function model="stock.inventory" name="action_validate">
<value eval="[ref('stock_picking_batch.stock_inventory_1')]"/>
</function>

<!-- Add picking -->
<record id="Picking_A" model="stock.picking">
<field name="move_type">one</field>
@@ -46,17 +82,17 @@
<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>
<field name="picking_type_id" ref="stock.picking_type_internal"/>
<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,16 +102,32 @@
<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>
<field name="picking_type_id" ref="stock.picking_type_internal"/>
<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>

0 comments on commit 2a75296

Please sign in to comment.
You can’t perform that action at this time.