Skip to content

[ADD] New module web_merge_notebook_tab #2703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

legalsylvain
Copy link
Contributor

@legalsylvain legalsylvain commented Dec 26, 2023

Description

This module extend the Odoo Community Edition web module to improve display of Form views that contains notebooks.

Odoo is very modular, that is great, but for some Forms, Odoo designs the view with a lot of tabs in a notebook,
one per functional topic.

If many modules are installed, it generates a lot of tabs. Consequently:

  • it force users to click a lot of time in all the tabs, to configure all the data.
  • it is not possible for a user to see quickly, if an item is correctly configured.

It is specially problematic for product or partner form views.

This module allows to 'merge' many tabs into a single tab, to avoid such UX troubles.

Demo exemple with the form view of the res.groups model:

Without the module

without_module

With the module

with_module

Configure

  • Go to "Settings > Technical > User Interface > Merge Notebook tab Settings"

  • Create a new setting:

    • Select the view you want to change
    • Set the description of the tab, that will be displayed to the user. (string parameter)
    • Set the name of the tab, that will be used technically. (name parameter)
    • set the names of the tabs you want to merge, as a python list.

setting

@legalsylvain legalsylvain added this to the 16.0 milestone Dec 26, 2023
@legalsylvain legalsylvain force-pushed the 16.0-ADD-web_merge_notebook_tab branch 8 times, most recently from a81aebe to a1c2393 Compare December 26, 2023 22:35
@legalsylvain legalsylvain force-pushed the 16.0-ADD-web_merge_notebook_tab branch from a1c2393 to 88418e9 Compare December 26, 2023 22:47
@legalsylvain legalsylvain marked this pull request as ready for review December 26, 2023 22:47
Copy link

@fah-mili fah-mili left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works exactly as described. LGTM

Copy link
Contributor

@quentinDupont quentinDupont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on runboat with several views, work as described 👌

Idea : add sequence parameter when we configure a merge notebook

@legalsylvain
Copy link
Contributor Author

Idea : add sequence parameter when we configure a merge notebook

could you elaborate ?

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@quentinDupont
Copy link
Contributor

Idea : add sequence parameter when we configure a merge notebook

could you elaborate ?

When I tested the module, I merge three notebooks and the notebook arrive on last position. I thought to myself: how cool would it be to be able to choose the position of this new tab? :)
Butt in fact, the order of the tabs are not managed with sequences, so...

@legalsylvain
Copy link
Contributor Author

legalsylvain commented Jan 5, 2024

I thought to myself: how cool would it be to be able to choose the position of this new tab? :)

I get it ! Thanks.
Indeed. For the time being, it "append" the new tab in notebook, as the last element, using https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.append.

if we add some field in the setting, like tab_name_append_after = fied.char() , we could replace the call of append by a call of https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.insert to insert the new tab after the defined tab.

I'll give it a try in the next day. if it's not easy, i'll add a text in the roadmap section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants