[IMP] web_ir_actions_act_multi: pre-commit auto fixes

pull/3134/head
David 2025-03-27 11:37:51 +01:00
parent c493dfbc4e
commit b2a400d74f
11 changed files with 62 additions and 55 deletions

View File

@ -17,18 +17,19 @@ Web Actions Multi
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3 :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/16.0/web_ir_actions_act_multi :target: https://github.com/OCA/web/tree/18.0/web_ir_actions_act_multi
:alt: OCA/web :alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi :target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_ir_actions_act_multi
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
:alt: Try me on Runboat :alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
This module provides a way to trigger more than one action on ActionManager This module provides a way to trigger more than one action on
ActionManager
**Table of contents** **Table of contents**
@ -38,19 +39,20 @@ This module provides a way to trigger more than one action on ActionManager
Usage Usage
===== =====
To use this functionality you need to return following action with list of actions to execute: To use this functionality you need to return following action with list
of actions to execute:
.. code-block:: python .. code:: python
def foo(self): def foo(self):
self.ensure_one() self.ensure_one()
return { return {
'type': 'ir.actions.act_multi', 'type': 'ir.actions.act_multi',
'actions': [ 'actions': [
{'type': 'ir.actions.act_window_close'}, {'type': 'ir.actions.act_window_close'},
{'type': 'ir.actions.client', 'tag': 'reload'}, {'type': 'ir.actions.client', 'tag': 'reload'},
] ]
} }
Bug Tracker Bug Tracker
=========== ===========
@ -58,7 +60,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_act_multi%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_act_multi%0Aversion:%2018.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. Do not contact contributors directly about support or help with technical issues.
@ -66,25 +68,25 @@ Credits
======= =======
Authors Authors
~~~~~~~ -------
* Modoolar * Modoolar
* CorporateHub * CorporateHub
Contributors Contributors
~~~~~~~~~~~~ ------------
* Petar Najman <petar.najman@modoolar.com> - Petar Najman <petar.najman@modoolar.com>
* Mladen Meseldzija <mladen.meseldzija@modoolar.com> - Mladen Meseldzija <mladen.meseldzija@modoolar.com>
* `CorporateHub <https://corporatehub.eu/>`__ - `CorporateHub <https://corporatehub.eu/>`__
* Alexey Pelykh <alexey.pelykh@corphub.eu> - Alexey Pelykh <alexey.pelykh@corphub.eu>
* Manuel Calero - Tecnativa - Manuel Calero - Tecnativa
* Matias Peralta, Juan Rivero - Adhoc - Matias Peralta, Juan Rivero - Adhoc
Maintainers Maintainers
~~~~~~~~~~~ -----------
This module is maintained by the OCA. This module is maintained by the OCA.
@ -96,6 +98,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_ir_actions_act_multi>`_ project on GitHub. This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_ir_actions_act_multi>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -10,7 +10,7 @@ class IrModelData(models.Model):
# related to ir.actions.act_multi. # related to ir.actions.act_multi.
if "web_ir_actions_act_multi" in modules_to_remove: if "web_ir_actions_act_multi" in modules_to_remove:
self = self.with_context(uninstall_web_ir_actions_act_multi=True) self = self.with_context(uninstall_web_ir_actions_act_multi=True)
return super(IrModelData, self)._module_data_uninstall(modules_to_remove) return super()._module_data_uninstall(modules_to_remove)
class IrModel(models.Model): class IrModel(models.Model):

View File

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

View File

@ -0,0 +1,6 @@
- Petar Najman \<<petar.najman@modoolar.com>\>
- Mladen Meseldzija \<<mladen.meseldzija@modoolar.com>\>
- [CorporateHub](https://corporatehub.eu/)
- Alexey Pelykh \<<alexey.pelykh@corphub.eu>\>
- Manuel Calero - Tecnativa
- Matias Peralta, Juan Rivero - Adhoc

View File

@ -1,8 +0,0 @@
* Petar Najman <petar.najman@modoolar.com>
* Mladen Meseldzija <mladen.meseldzija@modoolar.com>
* `CorporateHub <https://corporatehub.eu/>`__
* Alexey Pelykh <alexey.pelykh@corphub.eu>
* Manuel Calero - Tecnativa
* Matias Peralta, Juan Rivero - Adhoc

View File

@ -0,0 +1,2 @@
This module provides a way to trigger more than one action on
ActionManager

View File

@ -1 +0,0 @@
This module provides a way to trigger more than one action on ActionManager

View File

@ -0,0 +1,14 @@
To use this functionality you need to return following action with list
of actions to execute:
``` python
def foo(self):
self.ensure_one()
return {
'type': 'ir.actions.act_multi',
'actions': [
{'type': 'ir.actions.act_window_close'},
{'type': 'ir.actions.client', 'tag': 'reload'},
]
}
```

View File

@ -1,13 +0,0 @@
To use this functionality you need to return following action with list of actions to execute:
.. code-block:: python
def foo(self):
self.ensure_one()
return {
'type': 'ir.actions.act_multi',
'actions': [
{'type': 'ir.actions.act_window_close'},
{'type': 'ir.actions.client', 'tag': 'reload'},
]
}

View File

@ -369,8 +369,9 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2748259f3e8355dce1c410234958cf54f9b9c3041d67d18d2f1bf126649da427 !! source digest: sha256:2748259f3e8355dce1c410234958cf54f9b9c3041d67d18d2f1bf126649da427
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/web/tree/16.0/web_ir_actions_act_multi"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi"><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/web&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/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/web/tree/18.0/web_ir_actions_act_multi"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_ir_actions_act_multi"><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/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module provides a way to trigger more than one action on ActionManager</p> <p>This module provides a way to trigger more than one action on
ActionManager</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents"> <div class="contents local topic" id="contents">
<ul class="simple"> <ul class="simple">
@ -386,7 +387,8 @@ ul.auto-toc {
</div> </div>
<div class="section" id="usage"> <div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1> <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>To use this functionality you need to return following action with list of actions to execute:</p> <p>To use this functionality you need to return following action with list
of actions to execute:</p>
<pre class="code python literal-block"> <pre class="code python literal-block">
<span class="k">def</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w"> <span class="k">def</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
</span> <span class="bp">self</span><span class="o">.</span><span class="n">ensure_one</span><span class="p">()</span><span class="w"> </span> <span class="bp">self</span><span class="o">.</span><span class="n">ensure_one</span><span class="p">()</span><span class="w">
@ -404,7 +406,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 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/web/issues/new?body=module:%20web_ir_actions_act_multi%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/web/issues/new?body=module:%20web_ir_actions_act_multi%0Aversion:%2018.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> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -438,7 +440,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_ir_actions_act_multi">OCA/web</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/18.0/web_ir_actions_act_multi">OCA/web</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> <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>
</div> </div>

View File

@ -4,7 +4,7 @@ import {registry} from "@web/core/registry";
/** /**
* Handle 'ir.actions.act_multi' action * Handle 'ir.actions.act_multi' action
* @param {object} action see _handleAction() parameters * @param {Object} action see _handleAction() parameters
* @returns {$.Promise} * @returns {$.Promise}
*/ */