mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
use context when creating the wizard
Because the context is used in the default methods now.
This commit is contained in:
@@ -41,18 +41,14 @@
|
||||
order_id: sale_reserve_02
|
||||
-
|
||||
And I create a stock reserve for this line
|
||||
-
|
||||
!record {model: sale.stock.reserve, id: wizard_reserve_02_01}:
|
||||
note: Reservation for the sales order line
|
||||
-
|
||||
I call the wizard to reserve the products of the sales order
|
||||
-
|
||||
!python {model: sale.stock.reserve}: |
|
||||
active_id = ref('sale_line_reserve_02_01')
|
||||
context['active_id'] = active_id
|
||||
context['active_ids'] = [active_id]
|
||||
context['active_model'] = 'sale.order.line'
|
||||
self.button_reserve(cr, uid, [ref('wizard_reserve_02_01')], context=context)
|
||||
wizard_id = self.create(cr, uid, {}, context=context)
|
||||
self.button_reserve(cr, uid, [wizard_id], context=context)
|
||||
-
|
||||
I check Virtual stock of yogurt after update reservation
|
||||
-
|
||||
@@ -83,18 +79,14 @@
|
||||
product_uom: product.product_uom_unit
|
||||
-
|
||||
And I try to create a stock reserve for this MTO line
|
||||
-
|
||||
!record {model: sale.stock.reserve, id: wizard_reserve_02_02}:
|
||||
note: Reservation for the sales order line
|
||||
-
|
||||
I call the wizard to reserve the products of the sales order
|
||||
-
|
||||
!python {model: sale.stock.reserve}: |
|
||||
active_id = ref('sale_line_reserve_02_02')
|
||||
context['active_id'] = active_id
|
||||
context['active_ids'] = [active_id]
|
||||
context['active_model'] = 'sale.order.line'
|
||||
self.button_reserve(cr, uid, [ref('wizard_reserve_02_02')], context=context)
|
||||
wizard_id = self.create(cr, uid, {}, context=context)
|
||||
self.button_reserve(cr, uid, [wizard_id], context=context)
|
||||
-
|
||||
I should not have a stock reservation for a MTO line
|
||||
-
|
||||
|
||||
@@ -35,16 +35,14 @@
|
||||
product_uom_qty: 4
|
||||
-
|
||||
I call the wizard to reserve the products of the sales order
|
||||
-
|
||||
!record {model: sale.stock.reserve, id: wizard_reserve_01}:
|
||||
note: Reservation for the sales order
|
||||
-
|
||||
!python {model: sale.stock.reserve}: |
|
||||
active_id = ref('sale_reserve_01')
|
||||
context['active_id'] = active_id
|
||||
context['active_ids'] = [active_id]
|
||||
context['active_model'] = 'sale.order'
|
||||
self.button_reserve(cr, uid, [ref('wizard_reserve_01')], context=context)
|
||||
wizard_id = self.create(cr, uid, {}, context=context)
|
||||
self.button_reserve(cr, uid, [wizard_id], context=context)
|
||||
-
|
||||
I check Virtual stock of Gelato after update reservation
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user