As procurement_jit has been optimized (by running multiple procurements at once), it does not make sense to still have a module that without it, does not generate Pick > Pack > Ship automatically, but only Ship. We can do it anyways. That way, the procurement_jit module can become clearer in its functionality to the user: when a sale order is confirmed, it will automatically reserve the picking from the stock location (in case of MTS) and people who don't want that functionality can still immediately have the Pick > Pack > Ship. Make sure also push_apply works with manually created pickings.
16 lines
520 B
YAML
16 lines
520 B
YAML
-
|
|
I create a procurement
|
|
-
|
|
!record {model: procurement.order, id: procurement_order0}:
|
|
company_id: base.main_company
|
|
name: Procurement Test
|
|
product_id: product.product_product_32
|
|
product_qty: 15.0
|
|
product_uom: product.product_uom_unit
|
|
-
|
|
I check that procurement order is in exception, as at first there isn't any suitable rule
|
|
-
|
|
!python {model: procurement.order}: |
|
|
proc_order = self.browse(cr, uid, ref('procurement_order0'), context=context)
|
|
assert proc_order.state == 'exception'
|