diff --git a/web_widget_section_and_note_text_scrollable/README.rst b/web_widget_section_and_note_text_scrollable/README.rst new file mode 100644 index 000000000000..3900099cf8f6 --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/README.rst @@ -0,0 +1,99 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +=========================================== +Web Widget Section and Note Text Scrollable +=========================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:f9efbf7585a380dc468a05a400e9daf5307f042decd5df671dbb1f738772fdd8 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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/19.0/web_widget_section_and_note_text_scrollable + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-19-0/web-19-0-web_widget_section_and_note_text_scrollable + :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=19.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module makes the Text fields of the Section and Note widget +scrollable when not being edited. + +Scrollable line description: |scroll_line_description| + +Scrollable note: |scroll_note| + +.. |scroll_line_description| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_widget_section_and_note_text_scrollable/static/description/scroll_line_description.gif +.. |scroll_note| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_widget_section_and_note_text_scrollable/static/description/scroll_note.gif + +**Table of contents** + +.. contents:: + :local: + +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 +------- + +* Camptocamp + +Contributors +------------ + +- `Camptocamp `__: + + - Iván Todorovich ivan.todorovich@camptocamp.com + - Maksym Yankin maksym.yankin@camptocamp.com + +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. + +.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px + :target: https://github.com/ivantodorovich + :alt: ivantodorovich + +Current `maintainer `__: + +|maintainer-ivantodorovich| + +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_widget_section_and_note_text_scrollable/__init__.py b/web_widget_section_and_note_text_scrollable/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/web_widget_section_and_note_text_scrollable/__manifest__.py b/web_widget_section_and_note_text_scrollable/__manifest__.py new file mode 100644 index 000000000000..194b448a9a48 --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2025 Camptocamp SA (https://www.camptocamp.com). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Web Widget Section and Note Text Scrollable", + "summary": "Make the text field of Section and Note widget scrollable", + "version": "19.0.1.0.0", + "author": "Camptocamp, Odoo Community Association (OCA)", + "maintainers": ["ivantodorovich"], + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "category": "Web", + "depends": ["web", "account"], + "assets": { + "web.assets_backend": [ + "web_widget_section_and_note_text_scrollable/static/src/**/*.scss", + ], + }, +} diff --git a/web_widget_section_and_note_text_scrollable/i18n/it.po b/web_widget_section_and_note_text_scrollable/i18n/it.po new file mode 100644 index 000000000000..8af45f7b8781 --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" diff --git a/web_widget_section_and_note_text_scrollable/i18n/web_widget_section_and_note_text_scrollable.pot b/web_widget_section_and_note_text_scrollable/i18n/web_widget_section_and_note_text_scrollable.pot new file mode 100644 index 000000000000..716a0702d88a --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/i18n/web_widget_section_and_note_text_scrollable.pot @@ -0,0 +1,13 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" diff --git a/web_widget_section_and_note_text_scrollable/pyproject.toml b/web_widget_section_and_note_text_scrollable/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_section_and_note_text_scrollable/readme/CONTRIBUTORS.md b/web_widget_section_and_note_text_scrollable/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..f8390a4d5d8d --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- [Camptocamp](https://www.camptocamp.com): + + > - Iván Todorovich + > - Maksym Yankin diff --git a/web_widget_section_and_note_text_scrollable/readme/DESCRIPTION.md b/web_widget_section_and_note_text_scrollable/readme/DESCRIPTION.md new file mode 100644 index 000000000000..0fc912aad3be --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module makes the Text fields of the Section and Note widget scrollable when not being edited. + +Scrollable line description: +![scroll_line_description](../static/description/scroll_line_description.gif) + +Scrollable note: +![scroll_note](../static/description/scroll_note.gif) diff --git a/web_widget_section_and_note_text_scrollable/static/description/icon.png b/web_widget_section_and_note_text_scrollable/static/description/icon.png new file mode 100644 index 000000000000..1dcc49c24f36 Binary files /dev/null and b/web_widget_section_and_note_text_scrollable/static/description/icon.png differ diff --git a/web_widget_section_and_note_text_scrollable/static/description/index.html b/web_widget_section_and_note_text_scrollable/static/description/index.html new file mode 100644 index 000000000000..d10ccaa6dd34 --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/static/description/index.html @@ -0,0 +1,441 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Web Widget Section and Note Text Scrollable

+ +

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

+

This module makes the Text fields of the Section and Note widget +scrollable when not being edited.

+

Scrollable line description: scroll_line_description

+

Scrollable note: scroll_note

+

Table of contents

+ +
+

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

+
    +
  • Camptocamp
  • +
+
+
+

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.

+

Current maintainer:

+

ivantodorovich

+

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_widget_section_and_note_text_scrollable/static/description/scroll_line_description.gif b/web_widget_section_and_note_text_scrollable/static/description/scroll_line_description.gif new file mode 100644 index 000000000000..3c1823ebdc6b Binary files /dev/null and b/web_widget_section_and_note_text_scrollable/static/description/scroll_line_description.gif differ diff --git a/web_widget_section_and_note_text_scrollable/static/description/scroll_note.gif b/web_widget_section_and_note_text_scrollable/static/description/scroll_note.gif new file mode 100644 index 000000000000..32cc7b6d0258 Binary files /dev/null and b/web_widget_section_and_note_text_scrollable/static/description/scroll_note.gif differ diff --git a/web_widget_section_and_note_text_scrollable/static/src/product_label_section_and_note_field_scrollable.scss b/web_widget_section_and_note_text_scrollable/static/src/product_label_section_and_note_field_scrollable.scss new file mode 100644 index 000000000000..21cf13d2494e --- /dev/null +++ b/web_widget_section_and_note_text_scrollable/static/src/product_label_section_and_note_field_scrollable.scss @@ -0,0 +1,30 @@ +/* +- Copyright 2025 Camptocamp SA (https://www.camptocamp.com). +- License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +-*/ + +/* 1) Override the inline heights coming from the widget */ +.o_field_product_label_section_and_note_field, +.o_field_product_label_section_and_note_cell, +.o_field_product_label_section_and_note_cell textarea { + height: auto !important; +} + +/* 2) Define the height of the whole cell */ +.o_field_product_label_section_and_note_cell { + height: 10em; + max-height: 10em; + display: flex; +} + +/* 3) Make textarea fill the cell and scroll */ +.o_field_product_label_section_and_note_cell { + textarea { + flex: 5 5 auto; + width: 100%; + height: 100% !important; + resize: none; + display: block; + overflow-y: auto; // internal scroll + } +}