From e105ef7e9cd3d812f386b38c31a3ced9496e7781 Mon Sep 17 00:00:00 2001 From: mreficent Date: Wed, 19 Jul 2017 17:10:28 +0200 Subject: [PATCH] [FIX] stock_cycle_count (usage cannot be 'view') --- stock_cycle_count/tests/test_stock_cycle_count.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock_cycle_count/tests/test_stock_cycle_count.py b/stock_cycle_count/tests/test_stock_cycle_count.py index 2062edad5..b1e9c1888 100644 --- a/stock_cycle_count/tests/test_stock_cycle_count.py +++ b/stock_cycle_count/tests/test_stock_cycle_count.py @@ -148,7 +148,7 @@ class TestStockCycleCount(common.TransactionCase): self.assertFalse( counts, 'Existing cycle counts before execute planner.') date_pre_existing_cc = datetime.today() + timedelta(days=30) - loc = locs[0] + loc = locs.filtered(lambda l: l.usage != 'view')[0] pre_existing_count = self.cycle_count_model.create({ 'name': 'To be cancelled when running cron job.', 'cycle_count_rule_id': self.rule_periodic.id,