Skip to content

Commit

Permalink
[IMP] stock_cycle_count: remove auto confirmation logic from the cron
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanSForgeFlow committed Sep 18, 2024
1 parent a82f01c commit 3235706
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
14 changes: 0 additions & 14 deletions stock_cycle_count/models/stock_warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,6 @@ def cron_cycle_count(self):
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
Expand Down
11 changes: 4 additions & 7 deletions stock_cycle_count/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

/*
:Author: David Goodger ([email protected])
: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.
Expand Down Expand Up @@ -275,7 +274,7 @@
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 }
Expand All @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

span.problematic, pre.problematic {
span.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -514,9 +513,7 @@ <h2><a class="toc-backref" href="#toc-entry-13">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
Expand Down
4 changes: 3 additions & 1 deletion stock_cycle_count/views/stock_cycle_count_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
decoration-muted="state == 'cancelled'"
decoration-info="state == 'draft'"
multi_edit="1"
default_order="date_deadline asc"
>
<field name="name" />
<field name="location_id" />
Expand Down Expand Up @@ -126,6 +127,7 @@
domain="[('state','=', 'cancelled')]"
help="Cycle Counts Cancelled"
/>
<separator />
<filter
name="assigned_to_user"
string="Assigned to me"
Expand Down Expand Up @@ -169,7 +171,7 @@
<field name="view_mode">tree,form</field>
<field
name="context"
>{'search_default_planned':1,'search_default_execution':1,'search_default_date_deadline':1}</field>
>{'search_default_planned':1,'search_default_execution':1}</field>
</record>

<menuitem
Expand Down

0 comments on commit 3235706

Please sign in to comment.