[FIX] *: selectors in tours
[FIX][TMP] account: CogMenu selector in tours
[FIX][TMP] web*: Breadcrumb targetting in tours
Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).
add classname on last breadcrumb item
[FIX][TMP] project: View buttons selector in tours (moved away from CP)
[FIX][TMP] project: Kanban selectors in tours (quick create)
[FIX][TMP] *: SearchBar selectors in tours (toggle menu)
[FIX][TMP] *: ButtonBox selector in tours
[WIP][IMP] web: add toggleSearchBarMenu in search helpers
adapt and unskip 3 list tests
adapt and unskip calendar tests
unskip web_tour test that actually pass
post rebase fix
allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later
post rebase fixes
fix
Part-of: odoo/odoo#116641
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.
task-2818586
Part-of: odoo/odoo#116641
*: hr_holidays, stock, sale, product, web, sale, purchase, stock,
website, survey
Adapt some custom control panels (mainly for custom reports) to the
milk controlpanel.
hr_holidays:
Move the buttons to create a new time off or a new allocation to the
"create button" slot and transform it into a dropdown (creating
allocation requests is clearly a secondary action, not a primary one)
stock:
3 lines does not fit, must be on 2 lines
Part-of: odoo/odoo#116641
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
ButtonBox in formView)
- navigation (pager, switch view...)
Add new search bar menu, this is a merge of the following components
into one big component display in column:
* comparison_menu
* favorite_menu
* filter_menu
* group_by_menu
Also adapt navigation hook.
Part-of: odoo/odoo#116641
Depending on Milk, this commit adds some missing borders.
Also adapts default `border-radius` to apply milk design.
task-2818586
Part-of: odoo/odoo#116641
*: website
Old 'website_hr_recruitment' templates looked outdated, so they have
been improved in terms of usability and design, by applying the
following changes:
- Old images used in `/jobs` and `/jobs/detail/` have been replaced by
new ones, taken from the Odoo official profile in social media.
- A `Connect with us` section has been added to the right column of
`/jobs`, including a separator, links and social media icons.
- Job entries in `/jobs` now show the city of the office, its country
and its department, as shown in the filters.
- In `/jobs/*`, old header with a breadcrumb has been replaced by
the topbar seen above, including a link to previous page in the
navigation flow.
- Design in `/jobs/detail/` has been improved, including a redesign of
the `Our Product` block or the image gallery at the end of the page.
- Header in `jobs/apply/*` has been improved and includes a column with
the address of the job position.
- In `jobs/apply/*`, the design of the form group has been revamped and
also has been added a right column including a snippet with the contact
information of the recruiter tracking the job application process.
- Overall design has been improved in the `/job-thank-you` view,
including the recruiter snippet seen above.
- Job description is now editable and not truncated. Additionally, a
default job description has also been added.
- Every new job entry has now a default short description, editable.
- If there is either no available job or not any valid job after the job
search, the `No jobs available` view has also been improved.
- Illustrations with dynamic colors have been included in
`/jobs/detail` (`Our Product` block) and `/job-thank-you`.
- `boolean_toggle` widget used in `website_hr_recruitment`'s
backend, in its job entry kanban has been improved.
- Syntax has been adapted to BS5.
- Tests have also been updated to the changes in the templates.
task-2406626
Part-of: odoo/odoo#67913
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
New data will be introduced that involve the "product" word... while
this is a word a fuzzy test is based on. This commit adapts the test so
that its results are based on words that are less likely to appear in
default data.
task-2406626
Part-of: odoo/odoo#67913
Co-authored-by: Benoit Socias <bso@odoo.com>
W3C validation does not like async="1", there is not supposed to have
any value for this boolean attribute. "async" as value should be
accepted as a value is needed in this XML definition.
closesodoo/odoo#120311
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Website default templates contain phone number links using the `tel:`
syntax as "href". That syntax is not allowed to contain spaces (even
if it works, W3C validator does not like it).
This commit focuses on fixing the default values in default templates.
Extra work should be done to prevent user entered numbers to be used as
`tel:` without removing the spaces (either via backend fields or via
the website builder).
Part-of: odoo/odoo#120311
*: website, website_blog, website_event
This commit adds the TikTok social network to the other social networks
stored in DB. Thus, users of the Website application will be able to
reference their TikTok page on their websites. This commit also updates
the different templates and the social media block to integrate this new
social network.
task-3235451
Part-of: odoo/odoo#116837
Since [1] when the fuzzy search was introduced on website pages, the
filtering on most specific pages only happens at the end of the search
operation. Because of this, the search happens on pages that would be
excluded anyway, the limit might be wrongly applied and the count might
be wrong.
This commit makes the page search begin by keeping only the most
specific pages, then performing the actual search within those pages.
Steps to reproduce:
- Install `website` only and drop a search snippet.
- Search "ax".
=> No results found, but the "All results" link is displayed.
[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986
task-3203794
closesodoo/odoo#120950
X-original-commit: 9725a14be22ad0f20bb6591054b60d91663ca88f
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Before this commit an ir_assets generated automaticaly by the web editor
will generate an url ending with ...custom.addon.bundle_name.ext
After this commit the url will start with /_custom/addon.bundle_name/...
This will make it easier to spot at immediately if it is a custom asset
and thus it is useless to apply the glob. Actually, it will fail on the
/_custom when trying to glob, making it faster.
This is mainly useful to clarify and debug but in a case with mainly
customised ir_asset for one bundle, it may have an impact on speed.
An upgrade script was created for this change.
closesodoo/odoo#120699
Related: odoo/upgrade#4636
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Steps:
- Go to website/shop (with price range widget enabled)
- Change the language to Arabic
Issue: the numbers on the price range widget are overflowing
Cause:
The element leftCounter's right style property is always set to 0px.
So when changing the direction it's always on the right as his position
is absolute.
Solution:
Built-in handle by Bootstrap with end-0
Fixes#108557
opw-3221051
closesodoo/odoo#120568
X-original-commit: 4e05d93dce31f9a829961bded855a6cb7e8de7f3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit avoid to invalidate the cache on creation of 301/302 that
have no impact on the routing_map as only 308 and 404 alter the routing
map:
- 404: remove entry from routing map
- 301/302: served as fallback later if path not found in routing map
- 308: add "alias" (`redirect_to`) in routing map
closesodoo/odoo#120500
X-original-commit: 1430644908d7d9a3119a1315389f5bf11888356a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
*: test_website, website_blog, website_crm, website_hr_recruitment,
website_mass_mailing, website_sale, website_sale_wishlist,
website_slides
This commit creates a new util which clicks on edit and waits for the
edit mode to be started. This way, we make sure that the edit mode is
enabled before testing the next step of the test. This avoids race
conditions during tests.
This commit replaces all the uses of the old util with the new one, it
also removes the steps that are waiting for the edit mode to start.
Finally, from [this other commit], we can start a tour in edit mode. For
these tests (which have `edition: true`), it is useless to check if the
edit mode has started at the beginning of the test because this check is
already done by default. This commit removes unnecessary / duplicated
steps.
[this other commit]: https://github.com/odoo/odoo/commit/99b50d18e220aedf14de806f4bf1b2d35c32de35#diff-c7720501ec33f5f92c907d8bb41de50edd832a4564317073e801a6915796a6bdR278
task-3203820
closesodoo/odoo#120481
X-original-commit: https://github.com/odoo/odoo/commit/9fd5d25f59578abc9c608578a7d2e2953880b582
Related: odoo/design-themes#656
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
== Issue ==
A business code error was detected by the internal team on our
production. The cache and assets where invalidated !WAY! too often for
the past months.
It was hard to figure but finally the error was tracked down to be
located in the assets retrieval stack of our code when a database is
accessed through multiple different domains.
In our production use case, whenever one was accessing `odoo.com/web`
after someone accessed `accounts.odoo.com/web`, the assets would be
invalidated and recomputed, again and again, whenever someone accessed
the backend on a domain after someone else did with another domain.
Obviously, on our production, this could be occuring multiple time per
minute.
Technically, this is because the "assets retrieval stack" had a mismatch
in multiple endpoint when trying to find if a current website was
involved (serving for the frontend).
Some business method were using `env.context.get('website_id')` while
others were using `env['website'].get_current_website(fallback=False)`.
From there, when the code was called without a `website_id` in the
context, `get_current_website()` would still return a `website_id` when
called from `http://odoo.com` as there is a website having its domain
set to it. `get_current_website()` is then finding it and returning it.
But it would not when the user is on `http://accounts.odoo.com`.
Since we have a custom scss override (done through our website builder,
basically an ir.asset linked to a "url type" attachment:
`/website/static/src/scss/options/colors/user_color_palette.scss`) for
our website to define the website colors which is shadowing the scss
file from disk.
So, depending of the host/domain, either the real file disk for this URL
or the ir.asset linked to our website for this URL would be fetched to
generate the bundle hash (which is basically the last modification date
of the files/attachments).
Obviously, the file on disk and the ir.assets have a different last
modification date.
The system would then consider the assets as outdated and would
regenerate it.
You can see it in the logs where the attachment id of the assets URL
would get higher and higher everytime you access the DB through another
domain.
Using `get_current_website(fallback=False)`:
- `_get_related_assets()` https://github.com/odoo/odoo/blame/30d3b97b5ece379d9ddcbceda9d12c03dc7f4a48/addons/website/models/ir_asset.py#L14
- `filter_duplicate()` https://github.com/odoo/odoo/blame/30d3b97b5ece379d9ddcbceda9d12c03dc7f4a48/addons/website/models/ir_asset.py#L41
- ..
Using `get_current_website()`:
- `_get_custom_attachment()` https://github.com/odoo/odoo/blame/30d3b97b5ece379d9ddcbceda9d12c03dc7f4a48/addons/website/models/assets.py#L162
- ..
Using `context.get('website_id')`:
- `_get_asset_url_values()` https://github.com/odoo/odoo/blame/30d3b97b5ece379d9ddcbceda9d12c03dc7f4a48/addons/website/models/ir_qweb.py#L23
- ..
== Fix ==
A fix could have been to aligned those to use the same way of retrieving
the website but it would be too fragile (definitely some other places
where the same bug is involved but not yet found).
What is done in this commit is something we wanted to do for a long time
(see [1]) but was based purely on guess and feeling rather than concrete
bug / use case, but now that we found a real use case, we will do it:
- It doesn't seems to make sense to consider the request host/domain
when we are in the backend
- Same for the forced session, those should only impact the frontend
calls.
But this seems to have too much impact in stable to be changed, as it
would require to check every caller to also check for the session if
it makes sense. This will be done in master as not really needed to
prevent the critical bug fixed here.
- When something wants to alter the backend with a website, it should
explicitely be passed in the context, which is still considered
regardless if it's a backend/frontend call.
- If something needs to consider the forced website in session in the
backend, it should explicitely check it, not relying on
`get_current_website()`.
== Step to reproduce ==
- Start a db with website installed
- Enter the website builder in edit mode and change the "Theme Colors"'s
first "Color Presets"'s background color (it is white by default).
- Set the website domain to `http://127.0.0.1:8069/`
- Go to `http://127.0.0.1:8069/web` and login
- Go to `http://127.0.0.2:8069/web` and login
- Now start refreshing those 2 pages one after each other.
Everytime you will refresh the page, it will take a very long time
(~5-10 seconds) before loading the page, and monitoring the logs will
show something about invalidating the cache and huge query count.
== Benchmark ==
For the explained "multiple domain access" case, the backend /web will
now be loaded in less than 10ms and with ~10 SQL Queries when website is
installed, while it was taking ~4 seconds and ~200 Sql Queries before
the fix.
Before the fix:
```
odoo.modules.registry: At least one model cache has been invalidated, signaling through the database
GET host1.com/web HTTP/1.1 200 - 222 0.135 3.840 <-- 222 Queries, ~4s
odoo.modules.registry: At least one model cache has been invalidated, signaling through the database
GET host2.com/web HTTP/1.1 200 - 181 0.101 3.692 <-- 181 Queries, ~4s
odoo.modules.registry: At least one model cache has been invalidated, signaling through the database
GET host1.com/web HTTP/1.1 200 - 215 0.121 3.704 <-- 215 Queries, ~4s
odoo.modules.registry: At least one model cache has been invalidated, signaling through the database
GET host2.com/web HTTP/1.1 200 - 181 0.100 3.616 <-- 181 Queries, ~4s
```
After the fix:
```
odoo.modules.registry: At least one model cache has been invalidated, signaling through the database
GET host1.com/web HTTP/1.1 200 - 101 0.043 0.353 <-- 101 Queries, ~0.3s
GET host2.com/web HTTP/1.1 200 - 11 0.004 0.007 <-- 11 Queries, ~10ms
GET host1.com/web HTTP/1.1 200 - 11 0.003 0.005 <-- 11 Queries, ~10ms
GET host2.com/web HTTP/1.1 200 - 11 0.003 0.008 <-- 11 Queries, ~10ms
```
[1]: https://github.com/odoo/odoo/pull/94161#discussion_r904780031 (Also other PR/task but couldn't find those.)
closesodoo/odoo#120364
X-original-commit: 28dd35eb3c681b630f0b3c109a7d8209f9fa42d8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Steps to reproduce:
- Go to a website page > Add a 'Form' block > Add a new 'Selection'
field.
- Go to the page (in 'edit_translations' mode) > The selection field
options are not translatable.
The goal of this commit is to make the select options translatable
by adding an intermediate `.o_translation_select` element.
This element will handle option's text translations from the linked
`<select/>`. The final values are copied to the original element
right before save.
opw-3233360
closesodoo/odoo#120363
X-original-commit: 5ff53d7f289ec531f8369a47d02bd58252bb98a5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Current link in settings leads to 404 error page,
changing the path to the right one
opw-3279614
closesodoo/odoo#120356
X-original-commit: beffb2fcab99439c9bf9b398e500e2437e38f9f9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
With the BS5 upgrade script of 16.0, countdowns' data-display may have
been converted to data-bs-display by mistake. This will fix the DOM at
page load for good measures, maybe even allowing to remove this code in
a few years as hopefully all current countdowns will have been removed
or edited (or when a proper upgrade script in a future version of Odoo
will be made, if necessary).
opw-3240041
opw-3240532
opw-3258751
opw-3272731
closesodoo/odoo#119767
X-original-commit: ce506f32e3471eea1785312d4140417eba0ce355
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Commit [1] made sure that to be considered active, the current page URL
should have the same query strings as the ones defined in the menu URL
(if any).
But it was not fully accurate as extra query strings on the page URL
would make the menu not active even if the menu URL query strings would
be found in the visited page URL.
With this commit, when trying to determine if a website.menu is active,
we only take into account the subset of menu's query arguments.
For ex, a menu with an url of `/my-page?country=BE` should be
considered active if the request url is:
`/my-page?country=BE&utm_source=marketing-campaign&utm_medium=email`
[1]: https://github.com/odoo/odoo/commit/065ca15closesodoo/odoo#120188
X-original-commit: bc1f2c092122e171950348c3e32438e8b862f231
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
This commit gives a small refresh to the web_editor UI. To do so we
remove the borders from the buttons and inputs. We also increase the
border radius to 4px instead of 2px. The nested menus such as in Themes
tab now have the same background color than the rest of the UI.
The box shadows on the `we-title`, `we-customize-block-options` and the
checkbox switch have been removed.
All the buttons and select components are now taking the full available
width. The inputs fields remain unchanged except their font which is now
set to sans-serif.
Finally a `<div>` have been added to the replace media snippet to make
it consistent with the other buttons having an icon. Maybe in the future
we'll need a better way to define those.
task-3265187
closesodoo/odoo#119697
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit:
The scheduled action will repeatedly time out if the number of visitors
to remove is too high. In the case of the client, he has ~ 4 millions
inactive visitors to remove. This might happen after a bot spam attack.
After this commit:
The visitors are removed by batch of 1000, reducing the number of old
visitors with time
opw-3256349
closesodoo/odoo#119757
X-original-commit: b69917ec0e508f8354d831525c5c48ee79b5967a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Steps to reproduce the issue:
- Open a website page in edit mode.
- Drag and drop several snippets onto the page.
- Add a 'Fade In Right' animation to an element on the page.
- Exit edit mode.
- Change the website language to Arabic to display the scrollbar on the
left.
- Test the animation.
- Bug: the scrolling (using the mouse wheel) becomes stuck or very slow
during the animation.
The issue only occurs with Chrome or Edge browsers and seems to be a
browser display issue. It happens only when animated elements overflow
to the left.
This commit fixes the problem by adding an 'overflow: hidden' to the
main element during RTL page animations. This is not the best solution
because the animated elements become non-visible outside the main
element, creating a difference, for example, with the 'Framed' page
layout.
opw-3260399
closesodoo/odoo#119766
X-original-commit: 69184ea84c78de33d47f1e952530cceb568c937b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
a new context `prefetch_langs=True` allows ORM to prefetch all translations of
translated fields while fetching.
For example
The activated languages are 'fr_FR' and 'nl_NL'
In the database the value is '{"en_US": "English", "fr_FR": "French"}'::jsonb
after fetch with `prefetch_langs=True` the raw cache value will become
{'en_US': 'English', 'fr_FR': 'French', 'nl_NL': 'English'}
closesodoo/odoo#116947
Signed-off-by: Raphael Collet <rco@odoo.com>
There was an issue before this commit where some flags (basically all
the ones which are not tribands) would appear "broken".
This is the case for the China one where the symbol on the flag would be
squashed.
Using `object-fit` css property will keep the original flag ratio.
task-2929438
closesodoo/odoo#119683
X-original-commit: 5d6559218926a4c2f055bd55f113c7bfc83cd5b8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Since we've changed Bootstrap version from 4 to 5 the way to create a
popover has changed.
So we adapt it to the new way to declare popovers in the website form
closesodoo/odoo#119680
X-original-commit: 0cff1dc2967cafeb8964ed0802c309d3bb7f7525
Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit removes the module "web.dom_ready" and
adapts the modules that imported it.
This module was used to wait for the content to be
loaded to manipulate the dom after that.
The goal is to remove async modules and simplify the
module loader in the future.
task id: 3265979
closesodoo/odoo#119158
Related: odoo/enterprise#40051
Signed-off-by: Géry Debongnie <ged@odoo.com>
Steps to reproduce the bug:
- Open an empty page (e.g. the home page) in Website edit mode.
- The "DRAG BUILDING BLOCKS HERE" message is missing in the '#wrap'.
Since the commit [1], we have made modifications to the
'%o-editor-messages' mixin, which is used on the '#wrap' element, to
hide the editor message if the element is not the only child. However,
another commit [2] was added afterwards, which introduced a new div
called '#o_shared_blocks' next to the '#wrap' element. As a result, the
'#wrap' element is no longer the only child, and the message is never
displayed again.
To fix this, we took the rule out of the mixin to only use it where we
need to (for '.oe_drop_zone').
[1]: https://github.com/odoo/odoo/commit/6ee778fdbcd92dbefd08c8551ea654d352ad0dc0
[2]: https://github.com/odoo/odoo/commit/6007264afb83dcfed1693d72179cb156ff2254b6
task-3270409
closesodoo/odoo#119621
X-original-commit: d4b7a9e877804cd6bbdc0d15b1ab1c03561a4a86
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit:
The AceField component used the ace library to provide the user a code
editing field
After this commit:
The AceField component is now using the CodeEditor component and the usage
of the ace editor lib is now abstracted behind the component.
closesodoo/odoo#117782
Related: odoo/enterprise#39365
Signed-off-by: Géry Debongnie <ged@odoo.com>
The goal of this commit is to fix the race condition introduced by
[this commit]. Here were the problematic steps:
- Open the mega menu.
- When then mega menu is opened, scroll up.
- Open the mega menu after scroll.
Before this commit, what could happened was that the mega menu did not
have enough time to be closed after the scroll. Clicking on it would
then actually close it rather than open it as wanted. This commit adds
a step to ensure that the mega menu is closed before open it.
[this commit]: https://github.com/odoo/odoo/commit/9b1de9e28697edbb6e1fa88665294f983f60e37f
runbot-20660
closesodoo/odoo#119438
X-original-commit: abd0038de73a057eb9c34dc8d316b67d96fac409
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This module allows to add secret key to add the turnstile captcha on
each snippet website_form.
Cloudflare Turnstile
--------------------
A friendly, free CAPTCHA replacement
Turnstile delivers frustration-free, CAPTCHA-free web experiences to
website visitors.
Turnstile stops abuse and confirms visitors are real without the data
privacy concerns or awful UX that CAPTCHAs thrust on users.
closesodoo/odoo#119246
X-original-commit: 4aca39a533e9d41f5f452f36a1ffc001f586b4f4
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Many templates use the company logo that is set by default on
database creation. As that logo is clearly a placeholder and the user
isn't necesserely prompted to update it. It's possible for a user to
inadvertently start sending emails with "your logo" placeholders
plastered all over.
This removes the default logo of the company and removes it from
templates conditionally.
The logo isn't simply replaced with a transparent PNG as the templates
set a fixed height for the logo, which would look weird.
task-3067315
Part-of: odoo/odoo#106307
In the table of content snippet, both its generated entries and its
content wrapper can be dropped outside of it.
This cannot be allowed because the entries are generated from the
wrapped content that belongs to the same table of content snippet.
If any of them is missing, the feature is broken.
This commit prevents this by hiding the drag handle from the generated
table of content and from the content wrapper.
Note that they can still be moved using the arrows.
task-2752391
closesodoo/odoo#107510
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
Before this commit the "This page" menu sub-section of the website's
menu is displayed as a clickable entry when it is empty.
After this commit any website custom menu sub-section title entry is
hidden if none of its children is displayed.
Steps to reproduce:
- Install website only
- Log in as a restricted editor
- Go to website
- Open the "Site" menu
=> "This page" appears as a clickable entry instead of being hidden.
task-3149639
closesodoo/odoo#119125
X-original-commit: 4625f717bdccd8eea851f74a87a102436627106b
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Since [this commit], a horizontal scrollbar appears on mega menus. This
is because Bootstrap position the dropdown automatically and the mega
menus are a bit shifted on the right (due to a `translate3d` added by
dynamic position of popper). This commit fixes the problem by removing
dynamic positioning for mega menus.
Steps to reproduce:
- Have a system setting that enlarges the texts size or zoom the page
- Have a mega menu
- Open the mega menu
=> There is a horizontal scrollbar.
[this commit]: https://github.com/odoo/odoo/commit/8689241f86e2d4ddb4e4510951f92b80e115b914
task-3133137
closesodoo/odoo#118842
Signed-off-by: loco-odoo <loco@odoo.com>
Since the upgrade to Bootstrap 5 and especially since this [BS5 commit],
there is a gap between the mega menu and the navbar when the user opens
a mega menu. This commit removes that gap.
Steps to reproduce the bug fixed by this commit:
- Have a mega menu on your website.
- Drop a block of a dark color at the top of the page (it helps to see
the problem).
=> When you open the mega menu, you can see a small piece of the block
of dark color between the navbar and the mega menu.
Technical explanation:
This [BS5 commit] introduces a new css rule that adds a
`margin-top: 0.125rem;` on the `.dropdown-menu[data-bs-popper]`. However
when [mega menus were introduced], another css rule prevents having a
gap between the nav and the mega menu (`margin-top: 0;` on
`.o_mega_menu`). This commit makes sure that it will be a `margin-top`
of 0 by making the property more important.
[BS5 commit]: https://github.com/odoo/odoo/commit/c48f57ea2538ad51e00ac27d58f8e191781444f3
[mega menus were introduced]: https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7
task-3133137
opw-3226013
X-original-commit: b41c76bd7583756ad059f77f0d3c1151720b0b0b
Part-of: odoo/odoo#118842
This commit allows to reopen submenus and mega menus if one of them was
opened when scrolling on a page of a website.
Steps to reproduce the bug fixed by this commit.
- Have a submenu or a mega menu in the navbar
- Open a dropdown of the navbar
- Scroll down
=> It is no longer possible to open the dropdown.
This commit fixes this issue and adds a test for this flow.
task-3133137
opw-3226013
X-original-commit: 9b1de9e28697edbb6e1fa88665294f983f60e37f
Part-of: odoo/odoo#118842
When a mega menu "Sub Menus" are configured as "On Hover", it becomes
very difficult to edit its content.
This commit changes the behavior of the "On Hover" while the page is
being edited:
- it disables the hide on exit (`mouseleave`)
- it prevents the show on hover if another dropdown is already opened
- it hides the menu when the page is clicked outside of the opened menu
This commit also disables the preview of the "Show Sign In" option
which is not previewed anyway, so that it does not deselect the mega
menu when hovering the options.
task-2825376
closesodoo/odoo#119002
X-original-commit: ccb78f7af2a4413836a969ff8009dc3df6c2df33
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>