[FIX] sale: added stock.picking as active model in two tests.

- this is needed if we want to use osv as a replacement for osv_memory because osv checks more carefully the selection fields.

bzr revid: vmt@openerp.com-20110718145648-20lb8jo5s6pkw78m
This commit is contained in:
Vo Minh Thu 2011-07-18 16:56:48 +02:00
parent e56e526393
commit 99676d3681
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@
sale_id = sale_obj.browse(cr, uid, ref("sale_order_so6"))
ids = [x.id for x in sale_id.picking_ids]
wiz_id = self.create(cr, uid, {'invoice_date': time.strftime('%Y-%m-%d'), 'journal_id': ref('account.sales_journal')},
{'active_ids': ids})
{'active_ids': ids, 'active_model': 'stock.picking'})
self.create_invoice(cr, uid, [wiz_id], {"active_ids": ids, "active_id": ids[0]})
-
I verify whether the invoice has been generated for SO

View File

@ -67,7 +67,7 @@
sale_id=sale_obj.browse(cr, uid, ref("sale_order_so7"))
ids = [x.id for x in sale_id.picking_ids]
wiz_id = self.create(cr, uid, {'invoice_date': time.strftime('%Y-%m-%d'), 'journal_id': ref('account.sales_journal')},
{'active_ids': ids})
{'active_ids': ids, 'active_model': 'stock.picking'})
self.create_invoice(cr, uid, [wiz_id], {"active_ids": ids, "active_id": ids[0]})
-
I check that an invoice has been created.