From c526e31de1a686e313bc28797da835d232578d17 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Sat, 15 Nov 2014 21:26:56 +0100 Subject: [PATCH] [FIX] 'pos_backup_draft_orders' Test was failing because pos session wasn't available; --- .../tests/test_pos_backup_draft_orders.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pos_backup_draft_orders/tests/test_pos_backup_draft_orders.py b/pos_backup_draft_orders/tests/test_pos_backup_draft_orders.py index c6675eb3..2d335e57 100644 --- a/pos_backup_draft_orders/tests/test_pos_backup_draft_orders.py +++ b/pos_backup_draft_orders/tests/test_pos_backup_draft_orders.py @@ -34,7 +34,11 @@ class TestPosBackupDraftOrders(TransactionCase): self.po_obj = self.registry('pos.order') self.ps_obj = self.registry('pos.session') self.abs_obj = self.registry('account.bank.statement') - self.session_id = self.ps_obj.search(cr, uid, [])[0] + pc_id = self.imd_obj.get_object_reference( + cr, uid, 'point_of_sale', 'pos_config_main')[1] + self.session_id = self.ps_obj.create(cr, uid, { + 'config_id': pc_id, + }) self.evian_product_id = self.imd_obj.get_object_reference( cr, uid, 'point_of_sale', 'evian_2l')[1] self.cash_journal_id = self.imd_obj.get_object_reference(