Skip to content

[18.0][MIG] web_responsive: Migration to 18.0#3057

Closed
chaule97 wants to merge 216 commits intoOCA:18.0from
chaule97:18.0-mig-web_responsive
Closed

[18.0][MIG] web_responsive: Migration to 18.0#3057
chaule97 wants to merge 216 commits intoOCA:18.0from
chaule97:18.0-mig-web_responsive

Conversation

@chaule97
Copy link

@chaule97 chaule97 commented Jan 14, 2025

  • The features this module brings compared to native:

    • New navigation with the fullscreen app menu
    • Quick menu search inside the app menu
    • Sticky header & footer in list view
    • Sticky statusbar in form view
    • Bigger checkboxes in list view
    • Followers and send button is displayed on mobile. Avatar is hidden.
    • Big inputs on form in edit mode
    • Keyboard shortcuts for easier navigation, using `Alt + Shift + [NUM]`
    • Autofocus on search menu box when opening the app menu
    • When the chatter is on the side part, the document viewer fills that part for side-by-side reading instead of full screen
    • When the user chooses to send a public message the color of the composer is different from the one when the message is an internal log.
  • any changes in v18:
    -Control panel buttons use icons to save space. function is removed
    image

because odoo 18 changed template
image

lasley and others added 30 commits January 10, 2025 15:53
* Add Tecnativa as author
* Remove untestable JS method
* Rename to web_responsive
* Bump version
* Change all openerp to odoo
* Fix qunit suite injection
* Remove jQuery require
* Change to new selectors:
  * `oe_leftbar` to `o_sub_menu`
  * `oe_logo` to `o_sub_menu_logo`
  * `oe_footer` to `o_sub_menu_footer`
  * `oe_secondary_menus_container` to `o_sub_menu_content`
* Add style to hide oe_footer instead of remove to not break `support_branding`
* Add note in ReadMe explaining override of `support_branding`
* Set top margin of app drawer title to 0 to fit v10 proportions
* Fix notification badge positioning
* Add o_web_client class to body to fix overlaps
* Scroll control panel with page
* Change navbar z-index to not be overlapped by buttons
* Raise z-index on header to raise over buttons
* Handle layered notifications via z-index
* Remove `#` from navigation links HREF to prevent history littering
* Rebalance z-indexes to fix overlay issue while still providing notification support
* Bold titles for apps in the app-drawer
* Remove z-index from Control Panel buttons, so it doesn't overlap the menu.
* Better responsive menus
  * Move systray icons/menus out of the menu and up to the top bar.
  * Increase avatar size and visibility.

* Other minor menu behavior fixes.
* Changes to fit odoo variables
* And a little margin adjust on navbar-right
* Top menu always thick
* Removed overflow:hidden!important from main.less
* Local patch: prevent body overflow auto
* Stop using `style=` on `<body>`
* Fix jquery drawer in anticipation of:
   blivesta/drawer#36
On screens with less than 768px content is limited to 2 columns.

On mobile field labels have their own line.

Fix elements width for XS screens
Make image editing controls always available, instead of depending
on resolution or hover.
Small makeup to make it look good in XS screens.
* [IMP] drawer-toggle

* [IMP] Hitbox of close drawer-toggle

* [IMP] Removed outline on menu item

* [IMP] Logo positionings

* [FIX] Try me on runbot button

* [REM] Reversed outline change
* Change accesskey for `edit` in form view back to `e` to fix OCA#587
Before this patch, there was an incompatibility between this addon and l10n_es_toponyms, caused by the lack of wrapping of the special address field that was being added.

Now layout works as expected in that case. In any other case, it seems sensible to wrap inputs so no more weird overflows happen and less chances of needing horizontal scrolling happen.
* FIX hasclass

* FIX views

* [FIX] web_responsive: Syntax error in xpath
* Update to iScoll bleeding edge to fix OCA#741
* Add a call to the window resize method during init to fix OCA#773
@chaule97 chaule97 force-pushed the 18.0-mig-web_responsive branch 4 times, most recently from b390c4c to a6c6a73 Compare January 15, 2025 02:49
Copy link
Member

@HviorForgeFlow HviorForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional review.

Click on an entry that has been found from a search in the menu link is broken. It uses old way action_id=123 but keeps the /odoo/action-321 old (for instance http://localhost:8069/odoo/action-123?action_id=321&menu_id=456). I guess that the href should be build with the new reference.

@chaule97 chaule97 force-pushed the 18.0-mig-web_responsive branch from a6c6a73 to 1906d56 Compare January 20, 2025 03:02
@chaule97
Copy link
Author

Functional review.

Click on an entry that has been found from a search in the menu link is broken. It uses old way action_id=123 but keeps the /odoo/action-321 old (for instance http://localhost:8069/odoo/action-123?action_id=321&menu_id=456). I guess that the href should be build with the new reference.

Thanks, I have fixed it

Copy link
Contributor

@kobros-tech kobros-tech left a comment

Choose a reason for hiding this comment

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

there is a test file and you removed it too, here is the content:

`* Copyright 2021 ITerra - Sergey Shebanin

  • License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
    odoo.define("web_responsive.test_patch", function (require) {
    "use strict";

    const utils = require("web_tour.TourStepUtils");

    /* Make base odoo JS tests working */
    utils.include({
    showAppsMenuItem() {
    return {
    edition: "community",
    trigger: ".o_navbar_apps_menu",
    auto: true,
    position: "bottom",
    };
    },
    });
    });`

web_responsive/static/tests/test_patch.js

could you explain, please?

from odoo.tests import HttpCase


class TestIrHttp(HttpCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to remove this tag:
@tagged("-at_install", "post_install")

Copy link
Author

Choose a reason for hiding this comment

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

because of this error:
File "/opt/odoo/odoo/sql_db.py", line 572, in execute return self._cursor.execute(*args, **kwargs) File "/opt/odoo/odoo/sql_db.py", line 354, in execute res = self._obj.execute(query, params) psycopg2.errors.UndefinedColumn: column res_users.user_year_born does not exist LINE 1: ...apps_menu_theme", "res_users"."is_redirect_home", "res_users... in module web_pivot_computed_measure

So, I think testcase in web_responsive should be runned first

@SplashS
Copy link
Contributor

SplashS commented Jan 23, 2025

web_responsive/static/tests/test_patch.js

This file was necessary for testing engine in general.
Odoo testing framework in part of browser integration tests (post_install) make clicks.
And it also wants to click on the main menu.
But web_responsive module changes the main menu and the way to click it programmatically.
This file allowed post_install tests to work.

@pedrobaeza
Copy link
Member

There's already #3037 doing the migration.

@chaule97 chaule97 marked this pull request as ready for review February 4, 2025 03:08
@chaule97
Copy link
Author

chaule97 commented Feb 4, 2025

web_responsive/static/tests/test_patch.js

This file was necessary for testing engine in general. Odoo testing framework in part of browser integration tests (post_install) make clicks. And it also wants to click on the main menu. But web_responsive module changes the main menu and the way to click it programmatically. This file allowed post_install tests to work.

I don't think so. in module web_pivot_computed_measure, it has click o_navbar_apps_menu step, but github ci test still passes. I think we don't need it anymore because of this css

@chaule97
Copy link
Author

chaule97 commented Feb 5, 2025

There's already #3037 doing the migration.

Hi @pedrobaeza , compare to #3037:

because odoo 18 changed template
image

  • I deleted web_responsive/static/tests/test_patch.js because it is not necessary anymore

@pilarvargas-tecnativa
Copy link
Contributor

Hello! I think the correct way to proceed is to make the appropriate corrections in the existing PR and if they are not attended by the author then open a new PR from the existing one. For the time being, the older PR is still being taken care of and has priority over this one. Please, can you provide your revisions?

@chaule97
Copy link
Author

chaule97 commented Feb 6, 2025

Hello! I think the correct way to proceed is to make the appropriate corrections in the existing PR and if they are not attended by the author then open a new PR from the existing one. For the time being, the older PR is still being taken care of and has priority over this one. Please, can you provide your revisions?

It's my task, but I still encourage him to research my updates.

pilarvargas-tecnativa and others added 3 commits February 6, 2025 14:58
Removed the optimisation of hiding the week number at a certain size
for consistency with the responsive design of Odoo enterprise. It is a
non-functional optimisation as it hides useful information that hardly
takes up any space. It also causes incompatibilities in the design with
extensions that do not take into account these specific changes.

TT54811
@chaule97 chaule97 force-pushed the 18.0-mig-web_responsive branch from 1906d56 to 53a4d53 Compare February 6, 2025 07:58
@kobros-tech
Copy link
Contributor

@chaule97
@pedrobaeza
@pilarvargas-tecnativa

I like that @chaule97 isolated this module from the error appearing because of other module.
I will compare both, if this one is already includes necessary updates without any issue, I don't mind to merge.

Give me a few to review and come back...

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

This migration is losing 2 features that are required for me:

  • The non mandatory preview of the main attachment and the preview bar sided with possibility of maximizing the preview.

  • The previous menu search, because the old one was more flexible typing any part of the menu path. Look here:

    imagen

    If I type an extra p, no menu entry is found, where it should:

    imagen

@kobros-tech
Copy link
Contributor

kobros-tech commented Mar 27, 2025

web_responsive/static/tests/test_patch.js

This file was necessary for testing engine in general. Odoo testing framework in part of browser integration tests (post_install) make clicks. And it also wants to click on the main menu. But web_responsive module changes the main menu and the way to click it programmatically. This file allowed post_install tests to work.

No need to remove the file, I agree with you!
Instead of fixing the cause of issue he escaped by removing the test case, could have better at least delete the model and its related fields as they are only for test cases and no longer needed in the test database.

In fact I preferred a better solution to test already existing models like res.partner
There is a PR of the fix of the test case #3038 I asked @pedrobaeza to talk with people and get it merged or even delete the demo model after fishing the test there, I don't prefer this solution!

Now this module does not need any change in its test cases, I did not change!
For @chaule97 he made entire change, he could have pulled my branch and add only necessary changes

Now I will review the changes, and welcome to have previews there but once I finish with his commit.

Only what I need now is this #3038 to be merged.

@kobros-tech
Copy link
Contributor

among all my review, you have good js to format but we are a community!

I write, then you, then someone else. Writing on top of previous is valuable in issue solving.

I hade to inherit with replacement as the thing was taking size even if I hide it. I whish if I can take some you your changes but you didn't help me to choose the most important changes.

There is a syntax to assign classes the modern way, I like it but it still not solving an issue except for nice looking.

@chaule97
Copy link
Author

chaule97 commented Apr 12, 2025

among all my review, you have good js to format but we are a community!

I write, then you, then someone else. Writing on top of previous is valuable in issue solving.

I hade to inherit with replacement as the thing was taking size even if I hide it. I whish if I can take some you your changes but you didn't help me to choose the most important changes.

There is a syntax to assign classes the modern way, I like it but it still not solving an issue except for nice looking.

Sorry, I am so busy. I will review your PR tomorrow

@pedrobaeza
Copy link
Member

According to comments, closing this one for adopting finally #3037

@pedrobaeza pedrobaeza closed this Apr 21, 2025
@chaule97 chaule97 deleted the 18.0-mig-web_responsive branch November 24, 2025 09:14
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.