Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ addon | version | maintainers | summary
[web_copy_confirm](web_copy_confirm/) | 18.0.1.0.0 | | Show confirmation dialogue before copying records
[web_dark_mode](web_dark_mode/) | 18.0.1.0.0 | | Enabled Dark Mode for the Odoo Backend
[web_datetime_picker_default_time](web_datetime_picker_default_time/) | 18.0.1.0.0 | <a href='https://github.com/grindtildeath'><img src='https://github.com/grindtildeath.png' width='32' height='32' style='border-radius:50%;' alt='grindtildeath'/></a> | Allows to define a default time on datetime picker
[web_dialog_size](web_dialog_size/) | 18.0.1.0.3 | | A module that lets the user expand a dialog box to the full screen width.
[web_dialog_size](web_dialog_size/) | 18.0.1.0.4 | | A module that lets the user expand a dialog box to the full screen width.
[web_disable_export_group](web_disable_export_group/) | 18.0.1.0.0 | | Web Disable Export Group
[web_editor_class_selector](web_editor_class_selector/) | 18.0.1.0.0 | <a href='https://github.com/carlos-lopez-tecnativa'><img src='https://github.com/carlos-lopez-tecnativa.png' width='32' height='32' style='border-radius:50%;' alt='carlos-lopez-tecnativa'/></a> | Web editor class selector
[web_editor_disable_chatgpt](web_editor_disable_chatgpt/) | 18.0.1.0.0 | | Web Disable ChatGPT
Expand All @@ -46,6 +46,7 @@ addon | version | maintainers | summary
[web_loading_block_ui](web_loading_block_ui/) | 18.0.1.0.0 | | Block the screen with a centered loading overlay while requests are pending
[web_m2x_options](web_m2x_options/) | 18.0.1.0.3 | | web_m2x_options
[web_m2x_options_manager](web_m2x_options_manager/) | 18.0.1.0.0 | | Adds an interface to manage the "Create" and "Create and Edit" options for specific models and fields.
[web_navbar_light](web_navbar_light/) | 18.0.1.0.0 | <a href='https://github.com/smaddlsoft'><img src='https://github.com/smaddlsoft.png' width='32' height='32' style='border-radius:50%;' alt='smaddlsoft'/></a> | Light main navbar for the backend
[web_no_bubble](web_no_bubble/) | 18.0.1.0.0 | | Remove the bubbles from the web interface
[web_notify](web_notify/) | 18.0.1.1.2 | | Send notification messages to user
[web_notify_channel_message](web_notify_channel_message/) | 18.0.1.0.1 | | Send an instant notification to channel users when a new message is posted
Expand Down
3 changes: 2 additions & 1 deletion setup/_metapackage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "odoo-addons-oca-web"
version = "18.0.20261005.0"
version = "18.0.20261106.0"
dependencies = [
"odoo-addon-web_action_conditionable==18.0.*",
"odoo-addon-web_calendar_slot_duration==18.0.*",
Expand All @@ -26,6 +26,7 @@ dependencies = [
"odoo-addon-web_loading_block_ui==18.0.*",
"odoo-addon-web_m2x_options==18.0.*",
"odoo-addon-web_m2x_options_manager==18.0.*",
"odoo-addon-web_navbar_light==18.0.*",
"odoo-addon-web_no_bubble==18.0.*",
"odoo-addon-web_notify==18.0.*",
"odoo-addon-web_notify_channel_message==18.0.*",
Expand Down
3 changes: 2 additions & 1 deletion web_dialog_size/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Web Dialog Size
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a306b45986bf786b971c49a98fb0d1a7af7ca0317b0eee223c5bb7bf8505d836
!! source digest: sha256:fd309a2274537320f4d06b70ac859e35f028500ebc5f401ee18c200b12fe88c5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -96,6 +96,7 @@ Contributors
- Jairo Llopis
- Ernesto Tejeda
- Carlos Roca
- Sergio Teruel

- Sudhir Arya <sudhir@erpharbor.com>
- Pierre Pizzetta <pierre@devreaction.com>
Expand Down
2 changes: 1 addition & 1 deletion web_dialog_size/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"category": "web",
"version": "18.0.1.0.3",
"version": "18.0.1.0.4",
"license": "AGPL-3",
"depends": ["web"],
"installable": True,
Expand Down
1 change: 1 addition & 0 deletions web_dialog_size/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Jairo Llopis
- Ernesto Tejeda
- Carlos Roca
- Sergio Teruel
- Sudhir Arya \<<sudhir@erpharbor.com>\>
- Pierre Pizzetta \<<pierre@devreaction.com>\>
- Mantas Šniukas \<<mantas@vialaurea.lt>\>
5 changes: 3 additions & 2 deletions web_dialog_size/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Web Dialog Size</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -372,7 +372,7 @@ <h1>Web Dialog Size</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a306b45986bf786b971c49a98fb0d1a7af7ca0317b0eee223c5bb7bf8505d836
!! source digest: sha256:fd309a2274537320f4d06b70ac859e35f028500ebc5f401ee18c200b12fe88c5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/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>
<p>A module that lets the user expand/restore the dialog box size through a
Expand Down Expand Up @@ -448,6 +448,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
<li>Jairo Llopis</li>
<li>Ernesto Tejeda</li>
<li>Carlos Roca</li>
<li>Sergio Teruel</li>
</ul>
</li>
<li>Sudhir Arya &lt;<a class="reference external" href="mailto:sudhir&#64;erpharbor.com">sudhir&#64;erpharbor.com</a>&gt;</li>
Expand Down
48 changes: 36 additions & 12 deletions web_dialog_size/static/src/js/web_dialog_size.esm.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
import {Component, onMounted, onWillRender} from "@odoo/owl";
import {Component, onMounted, onWillRender, useState} from "@odoo/owl";
import {ActionDialog} from "@web/webclient/actions/action_dialog";
import {Dialog} from "@web/core/dialog/dialog";
import {SelectCreateDialog} from "@web/views/view_dialogs/select_create_dialog";
import {patch} from "@web/core/utils/patch";
import {useService} from "@web/core/utils/hooks";

function triggerWindowResize() {
requestAnimationFrame(() => {
window.dispatchEvent(new Event("resize"));
});
/**
* Resizing a list column by hand fixes the width of the table and its parent in
* pixels, so the list no longer follows the dialog width. Unset them to let the
* list fit its columns to the new dialog size.
*
* A window resize event would do it too, but it also closes every component
* listening to it, such as the analytic distribution widget, and with it the
* "Search More..." dialog it opened.
*
* @param {HTMLElement} el element inside the dialog
*/
function resetListColumnWidths(el) {
const dialog = el.closest(".modal-content");
if (!dialog) {
return;
}
for (const table of dialog.querySelectorAll(".o_list_table")) {
table.style.width = "";
table.parentElement.style.width = "";
}
}

export class ExpandButton extends Component {
setup() {
this.orm = useService("orm");
this.last_size = this.props.getsize();
// The props never change, so the dialog rendering does not render
// this button again: keep the size in its own state to switch icons
this.state = useState({size: this.last_size});
this.config = this.orm.call(
"ir.config_parameter",
"get_web_dialog_size_config"
Expand All @@ -25,7 +44,7 @@ export class ExpandButton extends Component {
this.config
.then(function (r) {
if (r.default_maximize) {
self.dialog_button_extend();
self.setSize("dialog_full_screen");
}
})
.catch(() => {
Expand All @@ -34,14 +53,19 @@ export class ExpandButton extends Component {
});
}

dialog_button_extend() {
this.props.setsize("dialog_full_screen");
triggerWindowResize();
setSize(size) {
this.props.setsize(size);
this.state.size = size;
}

dialog_button_extend(ev) {
resetListColumnWidths(ev.currentTarget);
this.setSize("dialog_full_screen");
}

dialog_button_restore() {
this.props.setsize(this.last_size);
triggerWindowResize();
dialog_button_restore(ev) {
resetListColumnWidths(ev.currentTarget);
this.setSize(this.last_size);
}
}

Expand Down
4 changes: 2 additions & 2 deletions web_dialog_size/static/src/xml/ExpandButton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<templates>
<t t-name="web_dialog_size.ExpandButton" owl="1">
<button
t-if="props.getsize() == 'dialog_full_screen'"
t-if="state.size == 'dialog_full_screen'"
type="button"
class="btn btn-secondary dialog_button_extend"
t-on-click="dialog_button_restore"
>
<i class="fa fa-window-restore" />
</button>
<button
t-if="props.getsize() != 'dialog_full_screen'"
t-if="state.size != 'dialog_full_screen'"
type="button"
class="btn btn-secondary dialog_button_restore"
t-on-click="dialog_button_extend"
Expand Down
99 changes: 99 additions & 0 deletions web_navbar_light/README.rst
Original file line number Diff line number Diff line change
@@ -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 Navbar Light
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6c6519e9878e098ebb7e8ed1306f65d0ed7a0952dde7343de1ae6dd420f4dc18
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/18.0/web_navbar_light
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_navbar_light
: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=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Replaces the solid purple main navbar of the backend with a light one,
separated from the page by a thin line. Menu entries use the regular
text colors and the brand color is kept for the name of the current app.

A strongly colored bar draws the eye away from the content on every
screen. A light navbar keeps the focus on the view below it, and is
closer to what most web applications use today.

Only the navbar variables of ``web`` are overridden, so the module is
easy to review, to combine with other modules and to uninstall.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

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.
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_navbar_light%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.

Credits
=======

Authors
-------

* Humanilog

Contributors
------------

- `Humanilog <https://humanilog.org>`__:

- Jan-Marten Veddeler <j.veddeler@humanilog.org>

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-smaddlsoft| image:: https://github.com/smaddlsoft.png?size=40px
:target: https://github.com/smaddlsoft
:alt: smaddlsoft

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-smaddlsoft|

This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_navbar_light>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file added web_navbar_light/__init__.py
Empty file.
26 changes: 26 additions & 0 deletions web_navbar_light/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2026 Humanilog (https://humanilog.org)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

{
"name": "Web Navbar Light",
"summary": "Light main navbar for the backend",
"version": "18.0.1.0.0",
"category": "Extra Tools",
"website": "https://github.com/OCA/web",
"author": "Humanilog, Odoo Community Association (OCA)",
"maintainers": ["smaddlsoft"],
"license": "LGPL-3",
"depends": ["web"],
"assets": {
"web._assets_primary_variables": [
(
"after",
"web/static/src/scss/primary_variables.scss",
"web_navbar_light/static/src/webclient/navbar/navbar.variables.scss",
),
],
"web.assets_backend": [
"web_navbar_light/static/src/webclient/navbar/navbar.scss",
],
},
}
14 changes: 14 additions & 0 deletions web_navbar_light/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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"
13 changes: 13 additions & 0 deletions web_navbar_light/i18n/web_navbar_light.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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"
3 changes: 3 additions & 0 deletions web_navbar_light/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions web_navbar_light/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Humanilog](https://humanilog.org):
- Jan-Marten Veddeler \<<j.veddeler@humanilog.org>\>
10 changes: 10 additions & 0 deletions web_navbar_light/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Replaces the solid purple main navbar of the backend with a light one,
separated from the page by a thin line. Menu entries use the regular text
colors and the brand color is kept for the name of the current app.

A strongly colored bar draws the eye away from the content on every screen.
A light navbar keeps the focus on the view below it, and is closer to what
most web applications use today.

Only the navbar variables of `web` are overridden, so the module is easy to
review, to combine with other modules and to uninstall.
Binary file added web_navbar_light/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading