diff --git a/setup/web_form_view_resizable/odoo/addons/web_form_view_resizable b/setup/web_form_view_resizable/odoo/addons/web_form_view_resizable new file mode 120000 index 00000000000..c21dc2e07dc --- /dev/null +++ b/setup/web_form_view_resizable/odoo/addons/web_form_view_resizable @@ -0,0 +1 @@ +../../../../web_form_view_resizable \ No newline at end of file diff --git a/setup/web_form_view_resizable/setup.py b/setup/web_form_view_resizable/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/web_form_view_resizable/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_form_view_resizable/README.rst b/web_form_view_resizable/README.rst new file mode 100644 index 00000000000..d18d4d15249 --- /dev/null +++ b/web_form_view_resizable/README.rst @@ -0,0 +1,85 @@ +======================= +Web Form View Resizable +======================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:0c6d736e05cb3e82b26dc52503b1a3154e44439a1b33012f2f72d80c5bc1af09 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/16.0/web_form_view_resizable + :alt: OCA/web +.. |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_form_view_resizable + :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/web&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows users to resize the form view, enhancing usability by +providing additional space for better display. It's especially practical +when more room is needed to view attachments in the chatter or to expand +the form view for improved readability. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +1. Open any form view. +2. Click and drag the edges of the form view to resize it. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* ACSONE SA/NV + +Contributors +------------ + +- Souheil Bejaoui souheil.bejaoui@acsone.eu + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_form_view_resizable/__init__.py b/web_form_view_resizable/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/web_form_view_resizable/__manifest__.py b/web_form_view_resizable/__manifest__.py new file mode 100644 index 00000000000..c8ba4b0f455 --- /dev/null +++ b/web_form_view_resizable/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Web Form View Resizable", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "depends": ["web"], + "assets": { + "web.assets_backend": [ + "web_form_view_resizable/static/src/js/form_view_resizable.esm.js" + ] + }, +} diff --git a/web_form_view_resizable/readme/CONTRIBUTORS.md b/web_form_view_resizable/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..dbdd727b4a4 --- /dev/null +++ b/web_form_view_resizable/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Souheil Bejaoui diff --git a/web_form_view_resizable/readme/DESCRIPTION.md b/web_form_view_resizable/readme/DESCRIPTION.md new file mode 100644 index 00000000000..761a9a11eeb --- /dev/null +++ b/web_form_view_resizable/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module allows users to resize the form view, enhancing usability by providing +additional space for better display. It's especially practical when more room is needed +to view attachments in the chatter or to expand the form view for improved readability. diff --git a/web_form_view_resizable/readme/USAGE.md b/web_form_view_resizable/readme/USAGE.md new file mode 100644 index 00000000000..b16c1670c2a --- /dev/null +++ b/web_form_view_resizable/readme/USAGE.md @@ -0,0 +1,2 @@ +1. Open any form view. +2. Click and drag the edges of the form view to resize it. diff --git a/web_form_view_resizable/static/description/icon.png b/web_form_view_resizable/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/web_form_view_resizable/static/description/icon.png differ diff --git a/web_form_view_resizable/static/description/index.html b/web_form_view_resizable/static/description/index.html new file mode 100644 index 00000000000..49d93b21749 --- /dev/null +++ b/web_form_view_resizable/static/description/index.html @@ -0,0 +1,431 @@ + + + + + +Web Form View Resizable + + + +
+

Web Form View Resizable

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

This module allows users to resize the form view, enhancing usability by +providing additional space for better display. It’s especially practical +when more room is needed to view attachments in the chatter or to expand +the form view for improved readability.

+

Table of contents

+ +
+

Usage

+
    +
  1. Open any form view.
  2. +
  3. Click and drag the edges of the form view to resize it.
  4. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/web project on GitHub.

+

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

+
+
+
+ + diff --git a/web_form_view_resizable/static/src/js/form_view_resizable.esm.js b/web_form_view_resizable/static/src/js/form_view_resizable.esm.js new file mode 100644 index 00000000000..e6e320c858e --- /dev/null +++ b/web_form_view_resizable/static/src/js/form_view_resizable.esm.js @@ -0,0 +1,17 @@ +/** @odoo-module **/ +import {FormRenderer} from "@web/views/form/form_renderer"; +import {patch} from "@web/core/utils/patch"; +import {onMounted} from "@odoo/owl"; +patch(FormRenderer.prototype, "web_form_view_resizable", { + setup() { + this._super(...arguments); + onMounted(() => this._mounted()); + }, + _mounted() { + $("div.o_form_view_container").resizable({ + handles: "e", + minWidth: 400, + maxWidth: 1200, + }); + }, +});