[FIX] stock_cycle_count (usage cannot be 'view')

This commit is contained in:
mreficent
2017-07-19 17:10:28 +02:00
committed by Lois Rilo
parent 04d9eee0ca
commit e105ef7e9c

View File

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