* = website
Before this commit, the active class of the tabs snippet buttons
disappeared when leaving the edition of the buttons.
After this commit, it is no longer possible to enable link options for
the buttons of the tabs snippet and accordion snippet. Being able to
customize these buttons introduces too many bugs and is not really
necessary.
task-2656662
closesodoo/odoo#79190
X-original-commit: 7f33cdcd14ef753cc5bf823bfc1de0d2431e285a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Set the background color of mega menus to the first color combination
by default. This ensures that the mega menu is not transparent by
default (important for master where the dropdown will be transparent to
allow transparent mega menus) but mainly ensures that inner components
(links, buttons, titles, etc) use a visible color as otherwise they use
the *header* combination colors which may not work with the default
white background dropdown.
task-2623335
closesodoo/odoo#79094
X-original-commit: 967d21a8d0dd8c79be1fe0a2d2ec3a6edbb389ca
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Description of the issue/feature this PR addresses:
Currently, search engines index a SAAS-hosted website twice
(once for the actual domain, and once for the .odoo.com domain)
which is something that should be preventable.
Desired behavior after PR is merged:
If a domain name is configured, and the website is accessed
through a different domain than the configured one, the noindex
tag appears, preventing crawlers from indexing it..
task-2418904
closesodoo/odoo#78425
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before Odoo saas-14.4, one should call `_get_http_domain()` on website to get
its domain. Indeed, that method was in charge of cleaning that domain, as it
was done with commit [1].
Since Odoo saas-14.4, that cleaning is automatically performed on domain before
saving it into database, thanks to commit [2].
Thus, we can now remove the `_get_http_domain()` and use directly the domain as
it is considered clean.
Note that migrated databases coming from version older than Odoo saas-14.4
could still have an incorrect domain (trailing slash, no scheme..).
This will be handled during migration with [3].
[1]: https://github.com/odoo/odoo/commit/3ad775aab717b395a5d11527aeb3596af66afa99
[2]: https://github.com/odoo/odoo/commit/042c95b0219bb0aa13e73385e092fa76ff1a1b0a
[3]: https://github.com/odoo/upgrade/pull/2951closesodoo/odoo#78766
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, a user would be able to drop pretty much any
snippet inside the product_catalog (pricelist) snippet.
This was not ideal as the snippet wasn't designed to receive
any other snippets inside of it.
With this commit, the configuration of the snippet is closer
to snippets such as timeline, allowing lines to be moved around
without allowing snippets to be dropped inside it.
task-2655171
closesodoo/odoo#78185
X-original-commit: 086bef8ffaff29a12836a36baed6cfb0ffea7da0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: mass_mailing, website, website_sale
Before this commit, it was impossible to add `fa-fw` directly on a
`we-button` as it would make the icon half invisible, since the whole
`we-button` would have the font-awesome `.fa-fw` css rule applied on it;
width: ~1.28em.
Then, one would need to insert a `<i/>` tag inside the `we-button` for
it to work.
This commit improves that behavior by handling automatically such cases,
and will preserve the purpose of the `fa-fw` class which is to have a
fixed width for those icons.
Note that the util class introduced in [1] (o_we_button_icon renamed
here in o_we_icon_button) is still useful to handle the case of svg
images, they are not allowed to shrink, the same way the fa buttons are.
[1]: https://github.com/odoo/odoo/commit/e4233643b93b521454cc146c6a2ae876781fb9ba
Related to task-2172311
closesodoo/odoo#77980
X-original-commit: e8ab9d76b802e80bb386812e4c8566825cbc2c92
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
*: web_editor, website_sale_wishlist
The goal of this commit is to fix the issues with the header templates
and their related options. Such as:
- Alignment of inline language selector
- Alignment of CTA / Template content
- Add missing CTA in some templates
- Bugs with off-canvas hamburger menu
Unfortunately, it will require more work to make everything perfect.
task-2636546
closesodoo/odoo#77862
X-original-commit: 2a000e33c5a44ddf0a777b43d8266cc413d8e4e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
The goal of this commit is to fix some UI issues on magazine
template:
1- Responsive collapsing (navbar should not expand on
magazine template).
2- Center top header structure on mobile.
3- Missing CTA on magazine template.
task-2636546
X-original-commit: 094146856640c2765d238919a1f85288262f2ad0
Part-of: odoo/odoo#77862
This commit reviews the component design in order to match the
"Configurator" one.
As a result, 'color-4' and 'color-5' are hidden in the palette-chooser
while remaining visible/editable once the palette is active.
This commit will also reorder color fields in the sidebar and in the
colopicker in order to match both the palette-preview & CC-list colors
order.
Beside design consistency, another reason behind these changes goes back
to the initial stages of the color system introduced with v14.
At the very beginning the system was designed to handle 3 custom colors
+ "locked" black and white.
Being able to edit black and white sounded interesting at that time;
as a result 'color-4' and 'color-5' have been introduced in the
system.
Despite being a powerful tool for designers and pro-users, the edition
of these color has been proven to be tricky an potentially unsafe.
Together with new default palettes that standardize 'color-4' and
'color-5' to safe values, hiding these color from the list simplify
the palette selection process and aims, implicitly, to communicate to
"normal" users that these colors are "not part of the palette", while
somehow related.
task-2656337
closesodoo/odoo#77857
X-original-commit: 02aba326710523bf210644e9038198059db1672c
Related: odoo/design-themes#514
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
On the page 'Visitors' page of the website module (backend), the cards
can be miss-aligned on small screen size. To improve the responsiveness
of the cards, we will use the `col` and `col-*` classes of Bootstrap
with some specific breakpoints (e.g. `col-sm-*`, `col-lg-*`, etc). We
will also use flex display to reduce the number of custom css rules.
task-2524363
closesodoo/odoo#73355
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adds new classes and options to the accordion snippet in
order to add new styles and allow switching the side where the collapse
status icon floats to.
task-2457232
closesodoo/odoo#69543
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
Commit [1] copied a lot of website snippet options into mass mailing.
Some were moved to web_editor and xpathed to be used in both without
duplicating code. Sadly that is not without side effects and it was
therefore decided to duplicate them instead so they can live separate
lives in the future.
[1] https://github.com/odoo/odoo/commit/4f7cd33d0fd69ee5984d0968233ffc73d7751030
Part-of: odoo/odoo#77724
This commit is there to be reverted in master. It temporarily restores
templates previously removed so as not to break migrations.
- s_mail_block_banner
- s_mail_block_title_sub
- s_mail_block_paragraph
- s_mail_block_comparison_table
- s_mail_block_two_cols
- s_mail_block_three_cols
- s_mail_block_image_text
- s_mail_block_text_image
- s_mail_block_image
- s_mail_block_footer_separator
- s_mail_block_steps
- s_mail_block_discount2
task-2554899
X-original-commit: d49b1942d33a222ac9159e76f7931cb89a85016f
Part-of: odoo/odoo#77724
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.
Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.
In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.
Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.
// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
<button class="dropdown-item" type="button">Action</button>
<a class="dropdown-item" href="#">Another action</a>
</div>
// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
<li class="o_dropdown_item">
<span>Action</span>
</li>
<li class="o_dropdown_item">
<a href="#">Another action</a>
</li>
</ul>
// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
<span class="dropdown-item">Action</span>
<a class="dropdown-item" href="#">Another action</a>
</div>
// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)
closesodoo/odoo#77649
X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
The message 'Don't worry, you can switch later' and a close icon
redirecting to the website are displayed in the control panel of
the theme kanban view. When we reach this kanban view from the
website settings we want to hide this message and this icon.
task-2610896
closesodoo/odoo#77548
X-original-commit: 72ed96c6febf299dac9b352714c6d5ba05508446
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Customisations made by the themes for the Text-Block
snippet were also applied in the Tabs snippet.
And so, options like paddings and background-color
generated unexpected and potentially broken layouts.
closesodoo/odoo#77479
X-original-commit: 3e046fdc8edf630919ec7d6b753100100cb78f05
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When the current app doesn't provide menu-items (or the user doesn't
have the rights to access them), the mobile burger menu should fallback
to the user menu instead of an empty one (like on the App Switcher).
task-2345001
closesodoo/odoo#77322
X-original-commit: 90eecd990c7c97f5914252a9cad28eeb71859e0d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
The user was able to remove the mega menu snippet without removing
the corresponding link in the menu. To avoid this flow to happen
we removed the delete button for the mega menu snippet. We also
handle the case where the user remove the mega menu snippet element
by element. On last element removal we put back the original template.
task-2636545
closesodoo/odoo#77256
X-original-commit: 97810a9c40396bb27cb5779937734849d185cf1f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Allow the user to create forms whose fields can have a conditional
visibility, meaning that the field is only visible if another field in
the form meets certain conditions.
The previous hidden checkbox is replaced by a select with 3 options
(visible, hidden, visible only if).
task-2431285
closesodoo/odoo#77255
X-original-commit: 2dcbfecf3c10687a2cd3af36335d5be70c904fce
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Arthur Detroux (ard) <ard@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
*: website, website_payment, website_sale
Instead of having a "o_we_large_input" class, now to have large widget, we can
use the generic "o_we_large" class (a future update is needing that for a non-
input widget).
task-2431285
X-original-commit: a8446e5d0f0b10f99f8174c012a6a53e2134b77a
Part-of: odoo/odoo#77255
The possibility to animate colummns instead of main snippets was
recently added. It should however have targeted mains columns that the
user can manipulate and resize instead of structural columns used in
some snippets (form, team, ...).
X-original-commit: 3dc2255819b87fa1094bfe07dcd1e2365becd757
Part-of: odoo/odoo#77255
It is impossible to define the default order in which to display
products in the shop page. The order can be changed through the
"Sort By" dropdown, but it is reset every time the page is refreshed.
There is now an option in the website editor that allows setting a
default sorting method that is applied when displaying products.
It is overridden by the setting from the "Sort By" dropdown if
there is a different sorting method selected.
task-2616245
closesodoo/odoo#76512
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
After this commit, it is possible to animate text in website pages.
task-2545252
closesodoo/odoo#76610
X-original-commit: 187acb938f70a2130d25fa76079221339c742f1e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
-Instead of having animate options on whole section, make it available
on a column.
-Rename "Disable animation" into "No Animation".
task-2545252
X-original-commit: 9a4d4d1527c004f4157d6c039acdd99f8d7e8231
Part-of: odoo/odoo#76610
This commits adds to the existing conditional visibility option
introduced in [1], the option to display or hide blocs to a user,
depending on if he's logged in or not.
A select widget was added as an alternative to the many2one widgets that
were currently used, as we don't need to connect to the database to
display logged in/logged out option.
[1]: 1c442782f8
task-2618946
closesodoo/odoo#76609
X-original-commit: a42634f8cef57dce0a6a5a09408c3f5823fc647a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The languages displayed for the ConditionalVisibility option are now the
ones available for the website.
The select widget is hidden if there is only one.
task-2629245
closesodoo/odoo#76537
X-original-commit: 380edf50bd1d8d1f7b1a33fd4fa1ad70dbc12804
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
*: website_sale, website_sale_delivery
The old analytics snippet (isogram) is replaced by the newer gtags
snippet. Virtual page views and ecommerce transactions are now tracked
using gtags. The e-commerce data format is updated to correspond with
the new GA4 format.
task-2500769
closesodoo/odoo#72233
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
At the same time, review the whole "hamburger type" option to be more
clear for the user. Unfortunately, the whole "no-hamburger-in-mobile"
option is kinda going against the way our editor works right now so this
commit implements it with well-placed hacks... to improve somehow at
some point.
Part of https://github.com/odoo/odoo/pull/68149
task-2368576
closesodoo/odoo#68149
Related: odoo/design-themes#11
Related: odoo/upgrade#2294
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Unfortunatly needed while another "complex" bug fix is done: xpath
validation during module install seems to be done after each view
creation. With the upcoming header template refactoring, by mischance,
the configurator template validation will not work at install anymore
while it is perfectly valid (and the only way to define it) after
install:
Before future refactoring:
1) install view which adds nav inside X
2) install configurator view, primary view which removes the first nav
inside X
3) install view which adds another nav inside X... the nav the
configurator wants to remove !
-> Validation of (2) works thanks to (1) during install while (2) wants
to remove something that is not installed yet. But (2) is valid it
should simply not have been evaluated yet.
After future refactoring:
We remove step (1) -> (2) has to be done after (3) to pass validation
at install while the system is not bug fixed.
Part of https://github.com/odoo/odoo/pull/68149
task-2368576
Part-of: odoo/odoo#68149
(*: website_blog, website_event, website_forum, website_sale,
website_slides)
Before this commit the search bar was specific to products.
After this commit a generic search bar is available as a general feature
of website which can be configured to inspect specific models.
The snippet is used to replace the old search bar in blog, courses,
event, forum, page and shop.
The search results of these pages and the autocomplete of the search bar
run through the same search mechanism.
A new hybrid results page has also been created as a target of a search
on "Everything".
In each involved module, `website._search_get_details()` is implemented
to return search metadata for every model related to the `search_type`
parameter.
Search metadata for a single model is returned by `_search_get_detail()`
on that specific model.
The autocomplete runs through the additional
`website._search_render_results()` pre-rendering step that prepares the
data to fit in the autocomplete template.
task-2379555
https://github.com/odoo/odoo/pull/65871
Part-of: odoo/odoo#65871
The WebsiteAnimate option was triggering a resize on the window in its
start method, which would lead to a scroll on the wrapwrap and closing
the megamenu dropdown if it was open. Besides that, animations were not
working when selected on a section in a dropdown menu.
Now, an open dropdown that has animated content is considered as the
scrolling element so that its animations are rendered correctly and it
is not closed because of a scroll elsewhere.
The "Launch animation at first time/always" option is hidden for
dropdowns as bootstrap will launch it anytime a dropdown is open.
Part of https://github.com/odoo/odoo/pull/71143
task-2502208
closesodoo/odoo#71143
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This prevents dropping main snippets in the mega menus, but it is still
possible to move the elements inside it or drop inline snippets.
Part of https://github.com/odoo/odoo/pull/71143
task-2502208
Part-of: odoo/odoo#71143
*: web_editor
The masonry templates selection SnippetOption has been abstracted so
that mega menus content can also be replaced with template content.
Part of https://github.com/odoo/odoo/pull/71143
task-2502208
Part-of: odoo/odoo#71143
Commit [1] introduced a new "image" option instead of fixing the "img"
option which already existed. Also it created a <img> tag with a "fa-fw"
class which does not make much sense. Also, our system with data-img
actually creates a <svg> tag so that the color of the icon is the one
decided in our SCSS instead of the one hardcoded in the image and so
that there is an hover effect.
[1]: https://github.com/odoo/odoo/commit/02ccad3200187724d5f133842032981fb91f7465closesodoo/odoo#75743
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In master, in the 'Theme' tab of the website editor, the button to edit
color schemes has a light bulb icon, which doesn't clearly represent what
it does.
In this commit, we replace it with a palette SVG. Since we-select
elements do not have an image option implemented, we also add one
for future usage.
task-2618494
closesodoo/odoo#75730
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>