Skip to content

Commit eb15d5c

Browse files
committed
[MIG] web_ir_actions_close_wizard_refresh_view: Migration to 18.0
1 parent 44d97ad commit eb15d5c

File tree

10 files changed

+75
-29
lines changed

10 files changed

+75
-29
lines changed

web_ir_actions_close_wizard_refresh_view/README.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ Close Wizard Refresh View
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
20-
:target: https://github.com/OCA/web/tree/16.0/web_ir_actions_close_wizard_refresh_view
20+
:target: https://github.com/OCA/web/tree/18.0/web_ir_actions_close_wizard_refresh_view
2121
:alt: OCA/web
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_close_wizard_refresh_view
23+
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_ir_actions_close_wizard_refresh_view
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
Let reload the data in a view, while closing a wizard, without reloading the page.
31+
Let reload the data in a view, while closing a wizard, without reloading
32+
the page.
3233

3334
**Table of contents**
3435

@@ -38,42 +39,43 @@ Let reload the data in a view, while closing a wizard, without reloading the pag
3839
Usage
3940
=====
4041

41-
Return an action literal with the following type: 'ir.actions.close_wizard_refresh_view'.
42+
Return an action literal with the following type:
43+
'ir.actions.close_wizard_refresh_view'.
4244

4345
For example:
4446

4547
::
4648

47-
def method_called_by_wizard(self):
49+
def method_called_by_wizard(self):
4850

49-
..
50-
..
51+
..
52+
..
5153

52-
return {
53-
'type': 'ir.actions.close_wizard_refresh_view'
54-
}
54+
return {
55+
'type': 'ir.actions.close_wizard_refresh_view'
56+
}
5557

5658
Bug Tracker
5759
===========
5860

5961
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
6062
In case of trouble, please check there if your issue has already been reported.
6163
If you spotted it first, help us to smash it by providing a detailed and welcomed
62-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_close_wizard_refresh_view%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
64+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_close_wizard_refresh_view%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6365

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

6668
Credits
6769
=======
6870

6971
Authors
70-
~~~~~~~
72+
-------
7173

7274
* LevelPrime srl
7375
* Nova Code
7476

7577
Maintainers
76-
~~~~~~~~~~~
78+
-----------
7779

7880
This module is maintained by the OCA.
7981

@@ -85,6 +87,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
8587
mission is to support the collaborative development of Odoo features and
8688
promote its widespread use.
8789

88-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_ir_actions_close_wizard_refresh_view>`_ project on GitHub.
90+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_ir_actions_close_wizard_refresh_view>`_ project on GitHub.
8991

9092
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

web_ir_actions_close_wizard_refresh_view/__manifest__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Close Wizard Refresh View",
77
"summary": """Allow to refresh view data without reload the page.""",
8-
"version": "16.0.1.0.0",
8+
"version": "18.0.1.0.0",
99
"development_status": "Beta",
1010
"author": "LevelPrime srl, Nova Code, Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/web",
@@ -15,8 +15,11 @@
1515
"data": ["security/ir.model.access.csv"],
1616
"assets": {
1717
"web.assets_backend": [
18-
"web_ir_actions_close_wizard_refresh_view/static/src/js/*.js"
19-
]
18+
"web_ir_actions_close_wizard_refresh_view/static/src/js/*.js",
19+
],
20+
"web.assets_unit_tests": [
21+
"web_ir_actions_close_wizard_refresh_view/static/tests/**/*",
22+
],
2023
},
2124
"application": False,
2225
"installable": True,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"

web_ir_actions_close_wizard_refresh_view/readme/DESCRIPTION.rst renamed to web_ir_actions_close_wizard_refresh_view/readme/DESCRIPTION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Let reload the data in a view, while closing a wizard, without reloading the page.
1+
Let reload the data in a view, while closing a wizard, without reloading
2+
the page.

web_ir_actions_close_wizard_refresh_view/readme/USAGE.rst renamed to web_ir_actions_close_wizard_refresh_view/readme/USAGE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
Return an action literal with the following type: 'ir.actions.close_wizard_refresh_view'.
1+
Return an action literal with the following type:
2+
'ir.actions.close_wizard_refresh_view'.
23

34
For example:
45

5-
::
6-
76
def method_called_by_wizard(self):
87

98
..

web_ir_actions_close_wizard_refresh_view/static/description/index.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ <h1 class="title">Close Wizard Refresh View</h1>
368368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369369
!! source digest: sha256:7ca61bc7e8d05841bb10e91eee61bed960bba09303d8a1bd3cabbacc3efdc030
370370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<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/web/tree/16.0/web_ir_actions_close_wizard_refresh_view"><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_close_wizard_refresh_view"><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>
372-
<p>Let reload the data in a view, while closing a wizard, without reloading the page.</p>
371+
<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/web/tree/18.0/web_ir_actions_close_wizard_refresh_view"><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_close_wizard_refresh_view"><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>
372+
<p>Let reload the data in a view, while closing a wizard, without reloading
373+
the page.</p>
373374
<p><strong>Table of contents</strong></p>
374375
<div class="contents local topic" id="contents">
375376
<ul class="simple">
@@ -384,7 +385,8 @@ <h1 class="title">Close Wizard Refresh View</h1>
384385
</div>
385386
<div class="section" id="usage">
386387
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
387-
<p>Return an action literal with the following type: ‘ir.actions.close_wizard_refresh_view’.</p>
388+
<p>Return an action literal with the following type:
389+
‘ir.actions.close_wizard_refresh_view’.</p>
388390
<p>For example:</p>
389391
<pre class="literal-block">
390392
def method_called_by_wizard(self):
@@ -402,7 +404,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
402404
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
403405
In case of trouble, please check there if your issue has already been reported.
404406
If you spotted it first, help us to smash it by providing a detailed and welcomed
405-
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_close_wizard_refresh_view%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
407+
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_ir_actions_close_wizard_refresh_view%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
406408
<p>Do not contact contributors directly about support or help with technical issues.</p>
407409
</div>
408410
<div class="section" id="credits">
@@ -421,7 +423,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
421423
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
422424
mission is to support the collaborative development of Odoo features and
423425
promote its widespread use.</p>
424-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_ir_actions_close_wizard_refresh_view">OCA/web</a> project on GitHub.</p>
426+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/18.0/web_ir_actions_close_wizard_refresh_view">OCA/web</a> project on GitHub.</p>
425427
<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>
426428
</div>
427429
</div>

web_ir_actions_close_wizard_refresh_view/static/src/js/web_ir_actions_close_wizard_refresh_view.esm.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/** @odoo-module **/
2-
31
import {registry} from "@web/core/registry";
42

53
async function executeCloseAndRefreshView({env, action}) {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {describe, expect, test} from "@odoo/hoot";
2+
import {mountWithCleanup} from "@web/../tests/web_test_helpers";
3+
import {WebClient} from "@web/webclient/webclient";
4+
import {registry} from "@web/core/registry";
5+
6+
describe("web_ir_actions_close_wizard_refresh_view", () => {
7+
test("action handler is registered", async () => {
8+
await mountWithCleanup(WebClient);
9+
const handlers = registry.category("action_handlers");
10+
expect(handlers.contains("ir.actions.close_wizard_refresh_view")).toBe(true);
11+
});
12+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import test_close_wizard_refresh_view
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2025 TRIVAX INNOVA SL
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
3+
4+
from odoo.tests.common import TransactionCase
5+
6+
7+
class TestCloseWizardRefreshView(TransactionCase):
8+
def test_action_model_exists(self):
9+
"""Test that the action model is properly registered."""
10+
self.assertIn(
11+
"ir.actions.close_wizard_refresh_view", self.env.registry
12+
)
13+
14+
def test_action_type(self):
15+
"""Test that the action type defaults correctly."""
16+
action = self.env["ir.actions.close_wizard_refresh_view"].create({})
17+
self.assertEqual(action.type, "ir.actions.close_wizard_refresh_view")
18+
19+
def test_action_inherits_act_window_close(self):
20+
"""Test that the action inherits from act_window_close."""
21+
Model = self.env["ir.actions.close_wizard_refresh_view"]
22+
self.assertIn(
23+
"ir.actions.act_window_close",
24+
Model._inherit if isinstance(Model._inherit, list) else [Model._inherit],
25+
)

0 commit comments

Comments
 (0)