[FIX] stock_dropshipping: use route with 2 steps for crossdock test
This commit is contained in:
parent
d65dec9eef
commit
5b6dcbb3a8
|
@ -1,5 +1,15 @@
|
||||||
-
|
-
|
||||||
Create new product without any routes
|
Create a supplier.
|
||||||
|
-
|
||||||
|
!record {model: res.partner, id: supplier_crossdock}:
|
||||||
|
name: Crossdocking supplier
|
||||||
|
-
|
||||||
|
Use the warehouse created in cancellation_propagated.yml.
|
||||||
|
-
|
||||||
|
!python {model: stock.warehouse, id: wh_pps}: |
|
||||||
|
assert self.crossdock_route_id.active, 'Crossdock route is not active'
|
||||||
|
-
|
||||||
|
Create new product without any routes.
|
||||||
-
|
-
|
||||||
!record {model: product.product, id: cross_shop_product}:
|
!record {model: product.product, id: cross_shop_product}:
|
||||||
name: PCE
|
name: PCE
|
||||||
|
@ -9,7 +19,7 @@
|
||||||
standard_price: 70.0
|
standard_price: 70.0
|
||||||
seller_ids:
|
seller_ids:
|
||||||
- delay: 1
|
- delay: 1
|
||||||
name: base.res_partner_2
|
name: supplier_crossdock
|
||||||
min_qty: 2.0
|
min_qty: 2.0
|
||||||
qty: 5.0
|
qty: 5.0
|
||||||
type: product
|
type: product
|
||||||
|
@ -20,23 +30,29 @@
|
||||||
-
|
-
|
||||||
!record {model: sale.order, id: sale_order_crossdock_shpng}:
|
!record {model: sale.order, id: sale_order_crossdock_shpng}:
|
||||||
partner_id: base.res_partner_4
|
partner_id: base.res_partner_4
|
||||||
|
warehouse_id: wh_pps
|
||||||
note: Create Sales order
|
note: Create Sales order
|
||||||
order_line:
|
order_line:
|
||||||
- product_id: cross_shop_product
|
- product_id: cross_shop_product
|
||||||
product_uom_qty: 100.00
|
product_uom_qty: 100.00
|
||||||
-
|
-
|
||||||
!python {model: sale.order.line}: |
|
!python {model: sale.order.line}: |
|
||||||
route_warehouse0_crossdock = self.pool.get('stock.warehouse').browse(cr, uid, ref('stock.warehouse0')).crossdock_route_id.id
|
route_wh_pps_crossdock = self.pool.get('stock.warehouse').browse(cr, uid, ref('stock_dropshipping.wh_pps')).crossdock_route_id.id
|
||||||
order = self.pool.get('sale.order').browse(cr, uid, ref('sale_order_crossdock_shpng'))
|
order = self.pool.get('sale.order').browse(cr, uid, ref('sale_order_crossdock_shpng'))
|
||||||
line_ids = [x.id for x in order.order_line]
|
line_ids = [x.id for x in order.order_line]
|
||||||
self.write(cr, uid, line_ids, {'route_id': route_warehouse0_crossdock})
|
self.write(cr, uid, line_ids, {'route_id': route_wh_pps_crossdock})
|
||||||
-
|
-
|
||||||
Confirm sales order
|
Confirm sales order.
|
||||||
-
|
-
|
||||||
!workflow {model: sale.order, action: order_confirm, ref: sale_order_crossdock_shpng}
|
!workflow {model: sale.order, action: order_confirm, ref: sale_order_crossdock_shpng}
|
||||||
-
|
-
|
||||||
Check a quotation was created to a certain supplier and confirm so it becomes a confirmed purchase order
|
Run the scheduler.
|
||||||
|
-
|
||||||
|
!python {model: procurement.order}: |
|
||||||
|
self.run_scheduler(cr, uid)
|
||||||
|
-
|
||||||
|
Check a quotation was created for the created supplier and confirm it.
|
||||||
-
|
-
|
||||||
!python {model: purchase.order}: |
|
!python {model: purchase.order}: |
|
||||||
po_id = self.search(cr, uid, [('partner_id', '=', ref('base.res_partner_2'))])
|
po_id = self.search(cr, uid, [('partner_id', '=', ref('supplier_crossdock')), ('state','=','draft')])
|
||||||
self.wkf_confirm_order(cr, uid, po_id)
|
self.wkf_confirm_order(cr, uid, po_id)
|
||||||
|
|
Loading…
Reference in New Issue