Skip to content

Commit 0e6299f

Browse files
[MIG] web_dialog_size: Migration to 19.0
1 parent 8450737 commit 0e6299f

File tree

6 files changed

+48
-23
lines changed

6 files changed

+48
-23
lines changed

web_dialog_size/README.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
15
===============
26
Web Dialog Size
37
===============
@@ -13,17 +17,17 @@ Web Dialog Size
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
20-
:target: https://github.com/OCA/web/tree/18.0/web_dialog_size
24+
:target: https://github.com/OCA/web/tree/19.0/web_dialog_size
2125
:alt: OCA/web
2226
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_dialog_size
27+
:target: https://translation.odoo-community.org/projects/web-19-0/web-19-0-web_dialog_size
2428
:alt: Translate me on Weblate
2529
.. |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=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=19.0
2731
:alt: Try me on Runboat
2832

2933
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -60,7 +64,7 @@ Bug Tracker
6064
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
6165
In case of trouble, please check there if your issue has already been reported.
6266
If you spotted it first, help us to smash it by providing a detailed and welcomed
63-
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_dialog_size%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
67+
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_dialog_size%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6468

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

@@ -96,6 +100,9 @@ Contributors
96100
- Sudhir Arya <[email protected]>
97101
- Pierre Pizzetta <[email protected]>
98102
- Mantas Šniukas <[email protected]>
103+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
104+
105+
- Bhavesh Heliconia
99106

100107
Maintainers
101108
-----------
@@ -110,6 +117,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
110117
mission is to support the collaborative development of Odoo features and
111118
promote its widespread use.
112119

113-
This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_dialog_size>`_ project on GitHub.
120+
This module is part of the `OCA/web <https://github.com/OCA/web/tree/19.0/web_dialog_size>`_ project on GitHub.
114121

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

web_dialog_size/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"Odoo Community Association (OCA)",
1616
"website": "https://github.com/OCA/web",
1717
"category": "web",
18-
"version": "18.0.1.0.0",
18+
"version": "19.0.1.0.0",
1919
"license": "AGPL-3",
2020
"depends": ["web"],
2121
"installable": True,

web_dialog_size/models/ir_config_parameter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright 2018 Tecnativa - Jairo Llopis
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33

4-
from odoo.models import Model, api
4+
from odoo import api, models
55
from odoo.tools.safe_eval import const_eval
66

77

8-
class IrConfigParameter(Model):
8+
class IrConfigParameter(models.Model):
99
_inherit = "ir.config_parameter"
1010

1111
@api.model

web_dialog_size/readme/CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
- Sudhir Arya \<<[email protected]>\>
1414
- Pierre Pizzetta \<<[email protected]>\>
1515
- Mantas Šniukas \<<[email protected]>\>
16+
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
17+
- Bhavesh Heliconia

web_dialog_size/static/description/index.html

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>Web Dialog Size</title>
6+
<title>README.rst</title>
77
<style type="text/css">
88

99
/*
@@ -360,16 +360,21 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document" id="web-dialog-size">
364-
<h1 class="title">Web Dialog Size</h1>
363+
<div class="document">
365364

365+
366+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368+
</a>
369+
<div class="section" id="web-dialog-size">
370+
<h1>Web Dialog Size</h1>
366371
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372
!! This file is generated by oca-gen-addon-readme !!
368373
!! changes will be overwritten. !!
369374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370375
!! source digest: sha256:6e8cbde132eca54a0b756ffe2922edfe7b701ea5400063603cba71aa0e4de87d
371376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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_dialog_size"><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_dialog_size"><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>
377+
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/19.0/web_dialog_size"><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-19-0/web-19-0-web_dialog_size"><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=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373378
<p>A module that lets the user expand/restore the dialog box size through a
374379
button in the upper right corner (imitating most windows managers). It
375380
also adds draggable support to the dialogs.</p>
@@ -388,7 +393,7 @@ <h1 class="title">Web Dialog Size</h1>
388393
</ul>
389394
</div>
390395
<div class="section" id="configuration">
391-
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
396+
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
392397
<p>By default, the module respects the caller’s <tt class="docutils literal">dialog_size</tt> option. If
393398
you want to set dialog boxes maximized by default, you need to:</p>
394399
<ol class="arabic">
@@ -403,23 +408,23 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
403408
</ol>
404409
</div>
405410
<div class="section" id="known-issues-roadmap">
406-
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
411+
<h2><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h2>
407412
<ul class="simple">
408413
<li>Allow setting default dialog size per user.</li>
409414
</ul>
410415
</div>
411416
<div class="section" id="bug-tracker">
412-
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
417+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
413418
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
414419
In case of trouble, please check there if your issue has already been reported.
415420
If you spotted it first, help us to smash it by providing a detailed and welcomed
416-
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_dialog_size%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
421+
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_dialog_size%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
417422
<p>Do not contact contributors directly about support or help with technical issues.</p>
418423
</div>
419424
<div class="section" id="credits">
420-
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
425+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
421426
<div class="section" id="authors">
422-
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
427+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
423428
<ul class="simple">
424429
<li>ACSONE SA/NV</li>
425430
<li>Therp BV</li>
@@ -429,7 +434,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
429434
</ul>
430435
</div>
431436
<div class="section" id="contributors">
432-
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
437+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
433438
<ul class="simple">
434439
<li>Anthony Muschang &lt;<a class="reference external" href="mailto:anthony.muschang&#64;acsone.eu">anthony.muschang&#64;acsone.eu</a>&gt;</li>
435440
<li>Stéphane Bidoul &lt;<a class="reference external" href="mailto:stephane.bidoul&#64;acsone.eu">stephane.bidoul&#64;acsone.eu</a>&gt;</li>
@@ -448,21 +453,26 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
448453
<li>Sudhir Arya &lt;<a class="reference external" href="mailto:sudhir&#64;erpharbor.com">sudhir&#64;erpharbor.com</a>&gt;</li>
449454
<li>Pierre Pizzetta &lt;<a class="reference external" href="mailto:pierre&#64;devreaction.com">pierre&#64;devreaction.com</a>&gt;</li>
450455
<li>Mantas Šniukas &lt;<a class="reference external" href="mailto:mantas&#64;vialaurea.lt">mantas&#64;vialaurea.lt</a>&gt;</li>
456+
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
457+
<li>Bhavesh Heliconia</li>
458+
</ul>
459+
</li>
451460
</ul>
452461
</div>
453462
<div class="section" id="maintainers">
454-
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
463+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
455464
<p>This module is maintained by the OCA.</p>
456465
<a class="reference external image-reference" href="https://odoo-community.org">
457466
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
458467
</a>
459468
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
460469
mission is to support the collaborative development of Odoo features and
461470
promote its widespread use.</p>
462-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/18.0/web_dialog_size">OCA/web</a> project on GitHub.</p>
471+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/19.0/web_dialog_size">OCA/web</a> project on GitHub.</p>
463472
<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>
464473
</div>
465474
</div>
466475
</div>
476+
</div>
467477
</body>
468478
</html>

web_dialog_size/static/src/js/web_dialog_size.esm.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, onMounted} from "@odoo/owl";
1+
import {Component, onMounted, onWillRender} from "@odoo/owl";
22
import {ActionDialog} from "@web/webclient/actions/action_dialog";
33
import {Dialog} from "@web/core/dialog/dialog";
44
import {SelectCreateDialog} from "@web/views/view_dialogs/select_create_dialog";
@@ -42,9 +42,15 @@ patch(Dialog.prototype, {
4242
super.setup();
4343
this.setSize = this.setSize.bind(this);
4444
this.getSize = this.getSize.bind(this);
45+
onWillRender(() => {
46+
if (this._forcedSize && this.props.size !== this._forcedSize) {
47+
this.props.size = this._forcedSize;
48+
}
49+
});
4550
},
4651

4752
setSize(size) {
53+
this._forcedSize = size;
4854
this.props.size = size;
4955
this.render();
5056
},

0 commit comments

Comments
 (0)