Skip to content
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

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

Open
wants to merge 219 commits into
base: 18.0
Choose a base branch
from

Conversation

kobros-tech
Copy link

No description provided.

@kobros-tech
Copy link
Author

@lasley
@danieltorres7
@yajo
@zeroheure

I wonder why I see 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...

despite the tests succeed in a clean new database locally.
Screenshot from 2024-12-24 21-16-11

I searched for this field user_year_born in odoo CE but it is not there, and I don't know where it came from.

@kobros-tech
Copy link
Author

The issue is inside web_pivot_computed_measure module tests.
I introduced a PR of a fix to the tests #3038

@chaule97
Copy link

Hi, I opened another PR #3057, welcome you review it

@kobros-tech kobros-tech force-pushed the 18.0-mig-web_responsive branch 3 times, most recently from ac1f548 to daaafd6 Compare January 24, 2025 08:55
@kobros-tech
Copy link
Author

@chienandalu
@CarlosRoca13

I referred to you in another PR that is a dependency for this PR tests

@CarlosRoca13
Copy link
Contributor

Please, note this pr #3069

web_responsive/static/tests/test_patch.js Outdated Show resolved Hide resolved
web_responsive/static/tests/test_patch.js Outdated Show resolved Hide resolved
steps: () => [
stepUtils.showAppsMenuItem(),
{
trigger: '.o_navbar_apps_menu"]',
Copy link
Contributor

Choose a reason for hiding this comment

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

dear @CarlosRoca13 if this file is not correct, the test will fail and we will see red alarm by oca boat.

I don't believe if the syntax is wrong or the registry is not for tests, are you a developer?

we use pre-commit in OCA and this command is reviewing the syntax, as long as it is not raising errors here, then the syntax is correct too!

@kobros-tech The original purpose of this code is to patch the original function of Odoo, not to add a new test.
Therefore, this code is not executed when pre-commit is run or when tests are executed. It is used in other modules when you import showAppsMenuItem.

If you review the expression .o_navbar_apps_menu"], it is syntactically incorrect. It should be:

Suggested change
trigger: '.o_navbar_apps_menu"]',
trigger: '.o_navbar_apps_menu',

Note: The extension of this filename must be renamed to .esm.js.

Sorry if I wrote parentheses instead of brackets; I edited my comment.

Copy link
Author

Choose a reason for hiding this comment

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

@carlos-lopez-tecnativa

thanks for clarification :)

now for this file, I copied it from 17.0 to 18.0, maybe there was a change of it during migration in the original PR

please review and if there is any bug tell me.

eslint.config.cjs Outdated Show resolved Hide resolved
@kobros-tech kobros-tech force-pushed the 18.0-mig-web_responsive branch 3 times, most recently from 804cb3f to 786da5e Compare January 27, 2025 21:29
lasley and others added 15 commits January 28, 2025 01:31
* 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.
OCA-git-bot and others added 6 commits January 28, 2025 01:31
Add support to serve menu icon in image URL format rather than base64.

It can take advantanges from browser caching and Nginx proxy.

Signed-off-by: Fai <lamkafai1997@gmail.com>
In Odoo 17, the Class TourStepUtils was removed, and stepUtils is now an object instead of a class. When this module is installed, the tours stop working and throw the error:
Uncaught Error: Dependencies should be defined by an array: function (require) {.

This commit adapts the code to align with these changes, ensuring that tours work correctly.
@kobros-tech kobros-tech force-pushed the 18.0-mig-web_responsive branch 2 times, most recently from a83ca83 to bc83a0a Compare January 27, 2025 22:40
@kobros-tech kobros-tech force-pushed the 18.0-mig-web_responsive branch from bc83a0a to 4324b3a Compare January 27, 2025 22:58
@kobros-tech
Copy link
Author

Wow wow wow
finally all tests succeed :)
@pedrobaeza

@pedrobaeza
Copy link
Member

I see that #3057 doesn't require to do anything in the tests on web_pivot_computed_measure to have a green CI. Can you check and try to not modify anything else?

@pedrobaeza
Copy link
Member

Testing the module in runboat, I detect that all the part that neutralizes the automatic preview seems to be not working (and consequently, the own sided preview).

@kobros-tech
Copy link
Author

@lasley @danieltorres7 @yajo @zeroheure

I wonder why I see 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...

despite the tests succeed in a clean new database locally. Screenshot from 2024-12-24 21-16-11

I searched for this field user_year_born in odoo CE but it is not there, and I don't know where it came from.

@pedrobaeza

what is the value of this conversation if the old tests is not interfering the migration?

even the other migration that you mentioned does not include all tests, but removed some of them.

if you want to see the errors with the other PR ask the contributor to leave the tests as they are and you will see this same error.

Even you can try it locally and catch the error.

I seek to correct not to mock the correctness

@pedrobaeza
Copy link
Member

OK, just asking. I always try to touch the minimum the existing things. Please check my other comment that affects the functionality.

@kobros-tech
Copy link
Author

Testing the module in runboat, I detect that all the part that neutralizes the automatic preview seems to be not working (and consequently, the own sided preview).

we observed some errors in the UI we will fix, I don't know if they are the same but I am happy if you share them.

@pedrobaeza
Copy link
Member

I have already commented the problem. Is it not clear?

@kobros-tech
Copy link
Author

I have already commented the problem. Is it not clear?

I will check it and compare to the issues we found, give me some time.

thanks for reviewing and helping me to improve the migration.

@kobros-tech
Copy link
Author

OK, just asking. I always try to touch the minimum the existing things. Please check my other comment that affects the functionality.

nevermind, this seems complicated and worrying and shall see the value when all gaps get filled.

Thanks for inquiry.

@kobros-tech
Copy link
Author

I have already commented the problem. Is it not clear?

Can you provide me with screenshots or log messages, we are fixing an error with the urls of search results

@pilarvargas-tecnativa
Copy link
Contributor

pilarvargas-tecnativa commented Feb 3, 2025

Please include #3075

@kobros-tech
Copy link
Author

I will add merged commits to this PR, thanks
@kobros-tech

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
@Ngquang
Copy link

Ngquang commented Feb 6, 2025

</xpath>
<xpath expr="//t[@t-set-slot='toggler']" position="replace">
</xpath> -->
<!-- <xpath expr="//t[@t-set-slot='toggler']" position="replace">
Copy link
Contributor

Choose a reason for hiding this comment

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

This is no longer necessary?

Copy link
Author

Choose a reason for hiding this comment

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

yes, thanks

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.