Skip to content

Commit

Permalink
[IMP] sale_validity_auto_cancel: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fd-oerp committed Jun 24, 2024
1 parent 7136d47 commit fb9e0a6
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 30 deletions.
33 changes: 19 additions & 14 deletions sale_validity_auto_cancel/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,22 @@ Sale Validity Auto-Cancel
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/14.0/sale_validity_auto_cancel
:target: https://github.com/OCA/sale-workflow/tree/17.0/sale_validity_auto_cancel
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_validity_auto_cancel
:target: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_validity_auto_cancel
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=14.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds a scheduled action that automatically cancels quotations after their expiration date.
This module adds a scheduled action that automatically cancels
quotations after their expiration date.

A company setting can be modified to decide how many days after the expiration date the quotations are automatically cancelled.
A company setting can be modified to decide how many days after the
expiration date the quotations are automatically cancelled.

**Table of contents**

Expand All @@ -40,13 +42,16 @@ A company setting can be modified to decide how many days after the expiration d
Configuration
=============

Go to the menu *Sale > Configuration > Settings*, in the section *Quotations & Sales*, set the *Auto-cancel expired quotations after* in days.
Go to the menu *Sale > Configuration > Settings*, in the section
*Quotations & Sales*, set the *Auto-cancel expired quotations after* in
days.

Usage
=====

By default, the scheduled action *Cancel Expired Quotations* is not enabled in order to
first configure the setting parameter for the number of days.
By default, the scheduled action *Cancel Expired Quotations* is not
enabled in order to first configure the setting parameter for the number
of days.

Once enabled, the scheduled action will run automatically once a day.

Expand All @@ -56,25 +61,25 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_validity_auto_cancel%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_validity_auto_cancel%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~
-------

* ForgeFlow

Contributors
~~~~~~~~~~~~
------------

* Jordi Masvidal <[email protected]>
- Jordi Masvidal <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -94,6 +99,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-JordiMForgeFlow|

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/14.0/sale_validity_auto_cancel>`_ project on GitHub.
This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/17.0/sale_validity_auto_cancel>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion sale_validity_auto_cancel/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ def cron_sale_validity_auto_cancel(self):
try:
order.with_context(company_id=company.id)._action_cancel()
except Exception as e:
_logger.error("Failed to auto-cancel %s: %s" % (order.name, str(e)))
_logger.error("Failed to auto-cancel %s: %s", (order.name, str(e)))
3 changes: 3 additions & 0 deletions sale_validity_auto_cancel/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions sale_validity_auto_cancel/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Go to the menu *Sale \> Configuration \> Settings*, in the section
*Quotations & Sales*, set the *Auto-cancel expired quotations after* in
days.
1 change: 0 additions & 1 deletion sale_validity_auto_cancel/readme/CONFIGURE.rst

This file was deleted.

1 change: 1 addition & 0 deletions sale_validity_auto_cancel/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Jordi Masvidal \<<[email protected]>\>
1 change: 0 additions & 1 deletion sale_validity_auto_cancel/readme/CONTRIBUTORS.rst

This file was deleted.

5 changes: 5 additions & 0 deletions sale_validity_auto_cancel/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This module adds a scheduled action that automatically cancels
quotations after their expiration date.

A company setting can be modified to decide how many days after the
expiration date the quotations are automatically cancelled.
3 changes: 0 additions & 3 deletions sale_validity_auto_cancel/readme/DESCRIPTION.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
By default, the scheduled action *Cancel Expired Quotations* is not enabled in order to
first configure the setting parameter for the number of days.
By default, the scheduled action *Cancel Expired Quotations* is not
enabled in order to first configure the setting parameter for the number
of days.

Once enabled, the scheduled action will run automatically once a day.
21 changes: 13 additions & 8 deletions sale_validity_auto_cancel/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,11 @@ <h1 class="title">Sale Validity Auto-Cancel</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:7910bb4739717e98aa441c71911f7e6336e6b3a13e85dd7724bfcf69cc175b3f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/14.0/sale_validity_auto_cancel"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_validity_auto_cancel"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a scheduled action that automatically cancels quotations after their expiration date.</p>
<p>A company setting can be modified to decide how many days after the expiration date the quotations are automatically cancelled.</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/17.0/sale_validity_auto_cancel"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_validity_auto_cancel"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a scheduled action that automatically cancels
quotations after their expiration date.</p>
<p>A company setting can be modified to decide how many days after the
expiration date the quotations are automatically cancelled.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -387,20 +389,23 @@ <h1 class="title">Sale Validity Auto-Cancel</h1>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>Go to the menu <em>Sale &gt; Configuration &gt; Settings</em>, in the section <em>Quotations &amp; Sales</em>, set the <em>Auto-cancel expired quotations after</em> in days.</p>
<p>Go to the menu <em>Sale &gt; Configuration &gt; Settings</em>, in the section
<em>Quotations &amp; Sales</em>, set the <em>Auto-cancel expired quotations after</em> in
days.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>By default, the scheduled action <em>Cancel Expired Quotations</em> is not enabled in order to
first configure the setting parameter for the number of days.</p>
<p>By default, the scheduled action <em>Cancel Expired Quotations</em> is not
enabled in order to first configure the setting parameter for the number
of days.</p>
<p>Once enabled, the scheduled action will run automatically once a day.</p>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sale-workflow/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_validity_auto_cancel%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_validity_auto_cancel%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -426,7 +431,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/JordiMForgeFlow"><img alt="JordiMForgeFlow" src="https://github.com/JordiMForgeFlow.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/14.0/sale_validity_auto_cancel">OCA/sale-workflow</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/sale-workflow/tree/17.0/sale_validity_auto_cancel">OCA/sale-workflow</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down

0 comments on commit fb9e0a6

Please sign in to comment.