When using drag&drop for adding elements to a product's page through
the website edit mode, users sometimes find the feature confusing to
use. Two examples of said confusion can be seen here:
- https://dashboard.userbrain.net/shared/qwl65bqlk6jg?t=404
- https://dashboard.userbrain.net/shared/k796mnj95pow?t=258
The suggestion for improvement was to reduce height and opacity for
the top and bottom droppable zones (available on all products), and
make any element not explicitly dropped in those zones go to the
zone below the product, available only on the product's own page.
This behaviour is extended to be more generic and is applied when
a dropzone has the class oe_structure_not_nearest, which excludes
it from the nearest search, unless the element is dropped explicitly
in a zone that has the class oe_structure_not_nearest.
task-2581641
closesodoo/odoo#73580
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*: http_routing
When rewriting the webclient, a new environment was created, as well as
a new type of service and a new mechanism to start those services. This
environment and the services that go with it were not made available in
the frontend however.
This commit adapts the setup code for the frontend's root widget (and
the website specific equivalent, WebsiteRoot) so that the new
environment exists, and some of the calls to the legacy services are
redirected to the new services. The point is to allow removing some
legacy services whose code is currently only needed by the frontent
because of the lack of availability of this new env and services
Part of #72675
With the introduction of the new webclient, we introduced a new way to
create and interact with registry using categories. This alleviates the
need to explicitly export and import registries.
This commit converts the public root widget's custom registry to use the
new registry to avoid code duplication and having multiple diverging
implementations
Part of #72675
With [1], not all overlays are displayed anymore but we rather show the
parent one in some cases. The timeline cards were considered as one of
those cases while it should not, as it prevents to use the overlay
buttons allowing to switch the cards order.
[1]: https://github.com/odoo/odoo/commit/9bbe5be3fb0d995374a369851df3641979d8e553
Discovered while working on task-2431484
closesodoo/odoo#73515
X-original-commit: 26708e168c717ae7e3a29c7705c80679b8e45f7d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor
The goal of this commit is make the whole we-collapse elements
clickable for theme color palettes.
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
In this commit, the following changes have been made:
- Add the "Add Year" option to be able to add new item in timeline.
- Add option to change line color.
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
The goal of this commit is to add the "Add Product" option
for "Pricelist" to be able to add new products in current section.
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
The goal of this commit is to add the "Add Item" option
for 'table of content' to be able to add new items.
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
In this commit, the following changes have been made:
- Set the "Add Item" button to add new blocks in 'Accordion' snippet.
- Make the scroll animation optional on block reordering and disable it
for 'Accordion' blocks.
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
The goal of this commit is to fill the Tabs snippet with content
(text snippet template in each tab).
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
*: web_editor
The goal of this commit is to add the "MultipleItems" option
to be able to add new elements in snippets with a list of items.
In this commit, the option is used for "Media List" & "Tabs".
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
In this commit, the following changes have been made:
- Add "Add Slide" button for carousel snippet.
- Add tooltips and update style for slide-related buttons.
Part of https://github.com/odoo/odoo/pull/68061
task-2431484
Purpose
=======
This snippets was originally in the "Website Mail Channel" module,
but it has been removed.
The snippet allow the user to subscribe to a specific mailing list.
If the current user has no access to the mailing list (because of ACL
rule) the widget will be invisible for him.
Links
=====
Task-2510267
See odoo/pull/71599
See odoo/enterprise/pull/19296
See odoo/upgrade/pull/2600
`_render('<h1> quick & flupke </h1>') `=>` '<h1> quick & flupke </h1>'`
what cannot be parsed in xml after.
Before this commit, if you try to install a page that contains a '&' via
the configurator, you had a traceback:
xmlParseEntityRef: no name, line 1, column 13
closesodoo/odoo#73509
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The first element is now selected once the snippet is visible at the
bottom of screen.
task-2431484
closesodoo/odoo#73499
X-original-commit: e2cfaf8e58c3f267503fc7ec81d78f728e75b506
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.
We removed redirect_with_hash that was only for retro compatibility
local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.
Default code for redirect is 303 now instead of 302.
Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.
All werkeug.utils.redirect has been replaced by request.redirect.
Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.
Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.
Migrate your code:
http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect
Courtesy of odony for help and review ;)
closesodoo/odoo#72599
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* google_recaptcha, mail, partner_autocomplete, point_of_sale, website
Now, to read session information, the module "@web/session" must be
imported. Not that, there is also the user service with all the user
information.
closesodoo/odoo#73201
Related: odoo/enterprise#19434
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit 308 redirections could be configured with a malformed
route which made the routing fail.
After this commit 308 redirections validation makes sure all parameters
of URL from appear in URL to and no other parameter appears.
task-2451780
closesodoo/odoo#73457
X-original-commit: a0e9384f1e674a140b9ddb3424fed5a43155dd01
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Rename field website_type_preselection to website_config_preselection since feature
preselection is not only based on website type anymore but also on website purpose.
task-2518565
closesodoo/odoo#73377
Related: odoo/enterprise#19498
Related: odoo/upgrade#2625
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Show "scroll down button" only when height is 100%.
- Make the "scroll down button" a child of that "height" option.
task-2471323
closesodoo/odoo#68825
Related: odoo/design-themes#18
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Curretnly, the link responsible for sharing the page on whatsapp
(from social share snippet) is not working correctly. There are
two main problems:
- it works only for the devices where WhatsApp is already
installed
- only the page title is being shared, not the page URL
This commit fixes both the issues by changing the sharing URL for
WhatsApp. The URL is now changed to 'https://wa.me/....' instead
of using 'whatsapp://' protocol (see the official link[1] for more
information). With this URL, if the WhatsApp is not installed on the
device, it will provide user with the options to either download it
or use WhatsApp Web, and if WhatsApp is installed, it will open the
app. Also with the URL, we pass both page title and page URL within
'text' URL parameter, and the secure link will be automatically
parsed and converted to hyperlink by the platform.
[1] - https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/
TaskID-2557077
closesodoo/odoo#73360
X-original-commit: 348e10cdd09cd77972b57fe47626609b200996af
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to have more detailed information given back when calling new_page.
Now each new record adds its entry in returned result:
* view_id: new ir.ui.view created. As there is always a view (based on a
template) it is now always set, and not only when creating a page;
* page_id: set if ispage is true, ID of website.page created;
* menu_id: set if add_menu is true, ID of website.menu created;
Previously only view_id was returned when creating a page which can be a
limitation notably in website_event.
Task-2577079
PR odoo/odoo#72411
Carousels (carousel and quotes_carousel snippets) in pages created by the
configurator are not added through a drag'n'drop. onBuilt and _assignUniqueId
are thefore not called. We set the unique id directly in the xml to make
the carousel slides also work when these snippets are added by the configurator.
task-2518565
closesodoo/odoo#73256
X-original-commit: 36387994d0a3038c87a754d4c27a6d34b30137e3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
We are now using the sessionstorage to make the data the user enters when
he completes the configurator persistant during the whole session. Which
means that these data are not lost anymore on page refresh.
task-2518565
closesodoo/odoo#73101
X-original-commit: 74cc69f3908a3b1b5bfc76bb362690f72e514b00
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Finally we don't want to change the position of this button (PR #72138).
This commit moves it back to its initial place.
closesodoo/odoo#73103
X-original-commit: 60657db80248714a9b3b7269b70e8c8b25cdce11
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Follow-up of [1]
Before this commit the map snippet had life-cycle and naming issues.
Also avoid partially reusing the color picker intended for background
images for the color filter overlay.
The height adjustment has also been removed, the standard top and
bottom padding can be adjusted to achieve a similar result.
[1]: https://github.com/odoo/odoo/pull/66766#pullrequestreview-685976812
Related to task-2464422
closesodoo/odoo#73180
X-original-commit: 8b9225ffd133332630097f29db9522abace7ba09
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
If user selects 'schedule appointments' as main objective in the configurator
and if the website_calendar module is installed then the Call To Action of
snippets s_banner, s_cover and s_call_to_action is changed to 'Schedule an
appointment' and redirect user to '/calendar' on click.
task-2518565
closesodoo/odoo#71162
Related: odoo/enterprise#18690
Related: odoo/design-themes#5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
New features to show suggested links as an autocomplete when creating a menu
was introduced with 9b9829416b.
But it was missing a sudo, so non-admin editor could not read module records.
task-2583737
closesodoo/odoo#73035
X-original-commit: d8206db3da541ba3f0c3e9cb63eab802e3ff096b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Before this commit, if a parent menu had child menus and all of those were not
visible (eg linked to an unpublished page), that parent menu would still be
shown.
While it is more a choice than an error, it might makes more sense to not show
it as most of the time, that parent menu has no sense itself, it just served as
a way to group submenus. Its URL can't be clicked (as it opens a dropdown)
despite the fact it is required, and is actually most of the time a random URL
typed by the user as it has no real purpose.
The parent menu is just used as a dropdown entry and shouldn't be displayed if
there is nothing in the dropdown, instead of converting it to a regular menu.
Historically, it was decided to do it that way to fulfill this usecase:
- /dogs
- /german-sheperds
- /beagles
If you were to unpublished your beagles and german sheperds pages, the menu
would auto convert to a regular menu pointing to your dogs page.
This use case now seems less prefered than the behavior to hide that menu.
task-2583737
closesodoo/odoo#73020
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Before to search if a redirect exists, we try to match a page via serve_page.
But this one redirect without the trailing /. So if none page is found, we
look for redirection, but we need to search with and without this trialing /.
opw-2527063
closesodoo/odoo#72847
X-original-commit: df6f92f1c290276fed8d0643315cc0973f3729e5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Creating a website through the configurator activated the configurator tour.
This tour was active for every websites even the ones not created using the
configurator. Theme tours were overridden by the configurator tour when they
should have been the active tour for website not created using the configurator.
Now the configurator tour is an asset specific to each website. This asset is
deactivated by default and activated for a website only if it is created using
the configurator.
- Some actions of the website tour were also visible when we were not in edit
mode. extra_trigger has been added on these actions to ensure they are visible
only in edit mode.
task-2518565
closesodoo/odoo#72827
X-original-commit: 5799410ec257fc7f756722579d3d0141b0ce7de4
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When a snippet is displayed inside another snippet, some options that
were not useful in that case are removed from the editor:
- ContainerWidth
- minHeight
- ScrollButton
- Background
Part of https://github.com/odoo/odoo/pull/72180
task-2566338
closesodoo/odoo#72180
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
On events, or in every part of the website that was built without
sections, the scroll button of a dropped snippet was not effective.
This was because we were targeting the next section, which was not there
in the previous case. Yet, we want it to scroll to the next element,
even if it is not a section.
task-2566338
closesodoo/odoo#72733
X-original-commit: 439381aa98c3b1e03513edb45cda284f4627d2a8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- The selection of cards corresponding to already installed modules
is disabled. A disabled style has been applied to these cards and an
info icon added. On hover on this icon the user is informed that the
module is already installed on its DB.
- Modules that were preselected based on website type can now be
unselected by the user.
- Correct typo in description of feature_module_career.
task-2518565
closesodoo/odoo#72688
X-original-commit: ab364b06dbb20cce90c7caa8ca15d034e2dcb25e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
Warn the user in case of unfilled or invalid google map API key.
task-2427575
closesodoo/odoo#72580
X-original-commit: f338d52e110bd6fa557169d370976ee35f5b56a5
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Introduced with 7fb016f9966b
[0] access could crash, recordset could be empty after `filtered`.
Step to reproduce:
- Add admin group to website top level menu (Website > Debug > Menu)
- Try to access frontend as non admin
opw-2573763
task-2574346
closesodoo/odoo#72535
X-original-commit: 759d920d799d332220d86467d83aeb9334b61ce2
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Prior to this commit, Bootstrap dropdowns, jQueryUI dropdowns and Odoo
dropdowns where styled independently leading to visual inconsistencies
and code repetition.
This commit will customize and improve the Bootstrap design using as
much as possible predefined variables. Then it will simply '@extend'
owl/jQueryUI classes in order to visually match the bootstrap ones.
Since dropdown classes are used in the top-menu (and its design is
partially shared with frontend apps), this commit provides the necessary
adaptations for this component as well.
This commit adapts the community codebase to the rewriting of the
/web application in owl.
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
To prepare the rewriting of the webclient in owl, we move all
current js files of web in a legacy/ folder. This folder will
eventually be removed, as soon as each file it contains will be
converted to owl and moved to the proper place in the new file
structure.
- New and multiples pictures
- Empty URL instead of odoo.com by default
task-2471323
closesodoo/odoo#70528
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The link preview is a bit messy inside a mega menu.
Hiding it during typing clears the UI.
task-2566651
closesodoo/odoo#72009
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When changing the color of the header with the custom colorpicker and
saving the changes, the autohideMenu widget was destroyed before
finishing the rendering.
The commit fixes the destroy method of this widget, testing if the
variables are defined before using them.
task-2519545
closesodoo/odoo#72193
X-original-commit: c003c8d0620c6eda8f8b482d7519ca00a3007d03
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>