diff --git a/stock_cycle_count/models/stock_warehouse.py b/stock_cycle_count/models/stock_warehouse.py
index 8585dfc1c..469ed0ec7 100644
--- a/stock_cycle_count/models/stock_warehouse.py
+++ b/stock_cycle_count/models/stock_warehouse.py
@@ -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
diff --git a/stock_cycle_count/static/description/index.html b/stock_cycle_count/static/description/index.html
index 3d59554a2..62c20ad9b 100644
--- a/stock_cycle_count/static/description/index.html
+++ b/stock_cycle_count/static/description/index.html
@@ -8,11 +8,10 @@
/*
:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
+:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
-Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
@@ -275,7 +274,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
-pre.code .ln { color: gray; } /* line numbers */
+pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +300,7 @@ span.option {
span.pre {
white-space: pre }
-span.problematic, pre.problematic {
+span.problematic {
color: red }
span.section-subtitle {
@@ -514,9 +513,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
This module is maintained by the OCA.
-
-
-
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
diff --git a/stock_cycle_count/tests/test_stock_cycle_count.py b/stock_cycle_count/tests/test_stock_cycle_count.py
index b671ae31a..5b5eb9e8d 100644
--- a/stock_cycle_count/tests/test_stock_cycle_count.py
+++ b/stock_cycle_count/tests/test_stock_cycle_count.py
@@ -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(
[
diff --git a/stock_cycle_count/views/stock_cycle_count_view.xml b/stock_cycle_count/views/stock_cycle_count_view.xml
index 5eacdd102..09b7ff117 100644
--- a/stock_cycle_count/views/stock_cycle_count_view.xml
+++ b/stock_cycle_count/views/stock_cycle_count_view.xml
@@ -11,6 +11,7 @@
decoration-muted="state == 'cancelled'"
decoration-info="state == 'draft'"
multi_edit="1"
+ default_order="date_deadline asc"
>
@@ -126,6 +127,7 @@
domain="[('state','=', 'cancelled')]"
help="Cycle Counts Cancelled"
/>
+
tree,form
{'search_default_planned':1,'search_default_execution':1,'search_default_date_deadline':1}
+ >{'search_default_planned':1,'search_default_execution':1}