51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
-
|
|
I setup product and locations
|
|
-
|
|
!record {model: stock.location, id: dest_chained_location}:
|
|
name: DestChainedLocation
|
|
usage: internal
|
|
-
|
|
!record {model: stock.location, id: source_chained_location}:
|
|
name: Source Chained Location
|
|
chained_auto_packing: auto
|
|
chained_location_type: fixed
|
|
usage: internal
|
|
chained_location_id: dest_chained_location
|
|
-
|
|
I create a picking to location_convenience_shop, which is chained with location_refrigerator
|
|
-
|
|
!record {model: stock.picking, id: shipment_with_delivery}:
|
|
type: internal
|
|
carrier_id: delivery.delivery_carrier
|
|
volume: 42
|
|
carrier_tracking_ref: FDX123
|
|
number_of_packages: 7
|
|
-
|
|
I add a move in the picking
|
|
-
|
|
!record {model: stock.move, id: icecream_move}:
|
|
picking_id: shipment_with_delivery
|
|
product_id: product_product_delivery
|
|
product_uom: product.product_uom_kgm
|
|
product_qty: 130.0
|
|
location_id: stock.stock_location_suppliers
|
|
location_dest_id: source_chained_location
|
|
-
|
|
I confirm the picking
|
|
-
|
|
!workflow {model: stock.picking, action: button_confirm, ref: shipment_with_delivery}
|
|
-
|
|
I check that the delivery fields have been propagated to the chained picking
|
|
-
|
|
!python {model: stock.move}: |
|
|
original_move = self.browse(cr, uid, ref('icecream_move'), context=context)
|
|
original_picking = original_move.picking_id
|
|
chained_move = original_move.move_dest_id
|
|
chained_picking = chained_move.picking_id
|
|
assert chained_picking.carrier_tracking_ref == original_picking.carrier_tracking_ref, 'no propagation of carrier_tracking_ref'
|
|
assert chained_picking.carrier_id == original_picking.carrier_id, 'no propagation of carrier_id'
|
|
assert chained_picking.volume == original_picking.volume, 'no propagation of volume'
|
|
assert chained_picking.weight == original_picking.weight, 'no propagation of weight'
|
|
assert chained_picking.weight_net == original_picking.weight_net, 'no propagation of weight'
|
|
|