use context when creating the wizard

Because the context is used in the default methods now.
This commit is contained in:
Leonardo Pistone
2015-03-17 17:57:34 +01:00
parent fc34c3b24f
commit 30848b25ab
2 changed files with 6 additions and 16 deletions

View File

@@ -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
-

View File

@@ -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
-