[IMP] report_substitute: pre-commit auto fixes

This commit is contained in:
Franco Leyes
2023-12-15 09:46:48 -03:00
parent 7e10470c09
commit 2055777e25
13 changed files with 46 additions and 54 deletions

View File

@@ -17,21 +17,21 @@ Report Substitute
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/16.0/report_substitute
:target: https://github.com/OCA/reporting-engine/tree/17.0/report_substitute
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_substitute
:target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_substitute
: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/reporting-engine&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows you to create substitution rules for report actions.
A typical use case is to replace a standard report by alternative reports
when some conditions are met. For instance, it allows to configure alternate
reports for different companies.
A typical use case is to replace a standard report by alternative
reports when some conditions are met. For instance, it allows to
configure alternate reports for different companies.
**Table of contents**
@@ -43,16 +43,11 @@ Usage
To use this module, you need to:
#. Go to 'Actions' / 'Reports'
#. Select the desired report you want to 'Substitution Rules'
#. In the substitutions page add a new line
#. Select the substitution report action
#. Set a domain to specify when this substitution should happen
1. Go to 'Actions' / 'Reports'
2. Select the desired report you want to 'Substitution Rules'
3. In the substitutions page add a new line
4. Select the substitution report action
5. Set a domain to specify when this substitution should happen
When a user calls a report action, the system tries to find the first
substitution in with a domain that matches all records.
@@ -60,7 +55,8 @@ substitution in with a domain that matches all records.
Known issues / Roadmap
======================
- The document name result should take the name of the substitution report.
- The document name result should take the name of the substitution
report.
Bug Tracker
===========
@@ -68,7 +64,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/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/reporting-engine/issues/new?body=module:%20report_substitute%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_substitute%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.
@@ -76,17 +72,17 @@ Credits
=======
Authors
~~~~~~~
-------
* ACSONE SA/NV
Contributors
~~~~~~~~~~~~
------------
* Bejaoui Souheil <souheil.bejaoui@acsone.eu>
- Bejaoui Souheil <souheil.bejaoui@acsone.eu>
Maintainers
~~~~~~~~~~~
-----------
This module is maintained by the OCA.
@@ -106,6 +102,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-sbejaoui|
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/16.0/report_substitute>`_ project on GitHub.
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/report_substitute>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -6,7 +6,6 @@ from odoo.tools.safe_eval import safe_eval
class IrActionReport(models.Model):
_inherit = "ir.actions.report"
action_report_substitution_rule_ids = fields.One2many(

View File

@@ -6,7 +6,6 @@ from odoo.exceptions import ValidationError
class ActionsReportSubstitutionRule(models.Model):
_name = "ir.actions.report.substitution.rule"
_description = "Action Report Substitution Rule"
_order = "sequence ASC"

View File

@@ -5,7 +5,6 @@ from odoo import models
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
def message_post_with_template(self, template_id, **kwargs):

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1 @@
- Bejaoui Souheil \<<souheil.bejaoui@acsone.eu>\>

View File

@@ -1 +0,0 @@
* Bejaoui Souheil <souheil.bejaoui@acsone.eu>

View File

@@ -1,4 +1,4 @@
This module allows you to create substitution rules for report actions.
A typical use case is to replace a standard report by alternative reports
when some conditions are met. For instance, it allows to configure alternate
reports for different companies.
A typical use case is to replace a standard report by alternative
reports when some conditions are met. For instance, it allows to
configure alternate reports for different companies.

View File

@@ -1 +1,2 @@
- The document name result should take the name of the substitution report.
- The document name result should take the name of the substitution
report.

View File

@@ -0,0 +1,10 @@
To use this module, you need to:
1. Go to 'Actions' / 'Reports'
2. Select the desired report you want to 'Substitution Rules'
3. In the substitutions page add a new line
4. Select the substitution report action
5. Set a domain to specify when this substitution should happen
When a user calls a report action, the system tries to find the first
substitution in with a domain that matches all records.

View File

@@ -1,15 +0,0 @@
To use this module, you need to:
#. Go to 'Actions' / 'Reports'
#. Select the desired report you want to 'Substitution Rules'
#. In the substitutions page add a new line
#. Select the substitution report action
#. Set a domain to specify when this substitution should happen
When a user calls a report action, the system tries to find the first
substitution in with a domain that matches all records.

View File

@@ -369,11 +369,11 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a65b073e96252a792bc139ca89648ed4ac6c9b09560f8c46add57f9a50a856f7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/16.0/report_substitute"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_substitute"><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/reporting-engine&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/17.0/report_substitute"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_substitute"><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/reporting-engine&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 allows you to create substitution rules for report actions.
A typical use case is to replace a standard report by alternative reports
when some conditions are met. For instance, it allows to configure alternate
reports for different companies.</p>
A typical use case is to replace a standard report by alternative
reports when some conditions are met. For instance, it allows to
configure alternate reports for different companies.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
@@ -404,7 +404,8 @@ substitution in with a domain that matches all records.</p>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>The document name result should take the name of the substitution report.</li>
<li>The document name result should take the name of the substitution
report.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
@@ -412,7 +413,7 @@ substitution in with a domain that matches all records.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/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/reporting-engine/issues/new?body=module:%20report_substitute%0Aversion:%2016.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/reporting-engine/issues/new?body=module:%20report_substitute%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">
@@ -438,7 +439,7 @@ mission is to support the collaborative development of Odoo features and
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/sbejaoui"><img alt="sbejaoui" src="https://github.com/sbejaoui.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/16.0/report_substitute">OCA/reporting-engine</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/17.0/report_substitute">OCA/reporting-engine</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>

View File

@@ -5,7 +5,6 @@ from odoo import api, models
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"
@api.onchange("template_id")