mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_cycle_count: remove auto confirmation logic from the cron
This commit is contained in:
committed by
ArnauCForgeFlow
parent
167a1c42c8
commit
c61ba7a0d1
@@ -201,25 +201,6 @@ class TestStockCycleCount(common.TransactionCase):
|
||||
pre_existing_count.unlink()
|
||||
# Execute cron for first time
|
||||
wh.cron_cycle_count()
|
||||
# There are counts in state open(execution) and not in state draft
|
||||
open_counts = self.cycle_count_model.search(
|
||||
[("location_id", "in", locs.ids), ("state", "=", "open")]
|
||||
)
|
||||
self.assertTrue(open_counts, "Cycle counts in execution state")
|
||||
draft_counts = self.cycle_count_model.search(
|
||||
[("location_id", "in", locs.ids), ("state", "=", "draft")]
|
||||
)
|
||||
self.assertFalse(draft_counts, "No Cycle counts in draft state")
|
||||
# Execute the cron for second time
|
||||
wh.cron_cycle_count()
|
||||
# New cycle counts for same location created in draft state
|
||||
draft_counts = self.cycle_count_model.search(
|
||||
[("location_id", "in", locs.ids), ("state", "=", "draft")]
|
||||
)
|
||||
self.assertTrue(draft_counts, "No Cycle counts in draft state")
|
||||
# Inventory adjustment only started for cycle counts in open state
|
||||
self.assertTrue(open_counts.stock_adjustment_ids)
|
||||
self.assertFalse(draft_counts.stock_adjustment_ids)
|
||||
# Zero-confirmations:
|
||||
count = self.cycle_count_model.search(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user