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
@@ -150,20 +150,6 @@ class StockWarehouse(models.Model):
|
||||
try:
|
||||
whs = self.search([])
|
||||
whs.action_compute_cycle_count_rules()
|
||||
today = fields.Date.today()
|
||||
cycle_counts = self.env["stock.cycle.count"].search(
|
||||
[("date_deadline", "<=", today), ("state", "=", "draft")]
|
||||
)
|
||||
for cycle_count in cycle_counts:
|
||||
open_cycle_counts = self.env["stock.cycle.count"].search(
|
||||
[
|
||||
("location_id", "=", cycle_count.location_id.id),
|
||||
("state", "=", "open"),
|
||||
]
|
||||
)
|
||||
if open_cycle_counts:
|
||||
continue
|
||||
cycle_count.action_create_inventory_adjustment()
|
||||
except Exception as e:
|
||||
_logger.info("Error while running stock_cycle_count cron job: %s", str(e))
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user