The page manager shows an advanced structure if the user has multi website
enabled. It will show specific pages as a child of its generic one.
It is useful to directly understand and figure which pages are 'overiden'.
But it doesn't really makes sense for an end user, which doesn't know there is
actually generic and/or specific pages.
It makes more sense to show that behavior only in debug and not in multi
websites, even more since pages are overiden even in mono website.
closesodoo/odoo#68902
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Convert `custom_code_*` to `Html` with no sanitization, such that qweb
considers them markup-safe.
`base_popup_options` value comes from a rendered XML body so should
already be safe
raw -> out in the extended website info template, not sure why this
was even raw
Also mark robots_txt as an unsanitized Html field, that's
not *actually* true but it is true enough for our purposes, especially
since the field gets edited through a text-mode wizard.
One was always there, the other was apparently added due to a double
escaping issue.
Seems unnecessary either way:
- Additional_title should always be set via markup, meaning it's
marked as safe (if necessary).
- The other one is less clear but neither website.name nor
company.name should contain markup so...
Trying to repro the issue reported at 1725212, still seems to work
fine.
* QWeb bodies should be markup-safe so `0` should always be
markup-safe.
* `head` is qweb-rendered so the same.
* The `json` pseudo-module in qweb templates is `json.scriptsafe`,
which should be markup-safe.
Strings in python expression in 't-att-placeholder' are not translated
automatically.
opw-2467404
closesodoo/odoo#69559
X-original-commit: 8f8d55ee4e773884ab35e11bfd0573d7997f3ad3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The following two points are necessary adaptations for
the correct functioning of the configurator with the
module deployed on iap-services.
- The routes of the api_website module deployed on
iap-services.odoo.com use model converters to retrieve
the industry selected by the user. The configurator
has been updated accordingly. We now use industry id
instead of industry name. Using id instead of name make
record retrieval faster and model converters handle
exception if the record doesn't exist.
- 'homepage' is now added to the requested pages by
the client. Previously, this page was added by the iap
module to the requested pages.
The following two points are changes to the configurator
route handling:
- multilang=False has been added to the route rendering
the configurator in order to avoid having the lang in
the url.
- If no step is specified in the url, the implicit step
is 1. Therefore /website/configurator/1 has been changed
to /website/configurator.
closesodoo/odoo#69370
X-original-commit: b6efa4caf6514484c254869cb2f1965d207e7c65
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
If the user type his website URL as suggested by the helper, and he redirects
his `http` to `https` (nginx, cloudflare..), then his canonical url won't ever
be reachable.
Most critical issue will be that we won't display the `alternate/hreflang` tag,
which basically tells the search engines what and where is our translated
content.
opw-2486918
closesodoo/odoo#69093
X-original-commit: 15bf30b7b5312a943772ece20303e215b1ed6f6c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Without this commit, a database with only one website would not see the domain
field in the res settings.
But the domain field is useful to set even if there is only one website.
For instance, if no domain is specified, the web.base.url ICP will be used
instead to generate links, but it might be the wrong url as it is the last
domain used to login as the admin (unless web.base.url.freeze is set).
Also, one might want to unset the `localhost` domain that was set by default
in xml data (now removed with 1f0edacdf)
closesodoo/odoo#69038
X-original-commit: 0650862c7adcbe4113e071778a66053b88e004ef
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Rationale:
The majority of cases where an ir.asset is manually declared
outside of manifest files is to specifically add a single asset file.
This means developers are specifying a single asset *path*, and not a
glob expression. In this context, it seems better to name the filepath
field `path`, and document that it can be specified with a glob
expression when (seldom) needed, rather than making the exception appear
to be the norm - possibly puzzling many developers (What's a glob and
why do I need one?)
The doc is updated as well, and some spell-checking and wording
improvements were done too.
This required some adaptations to the existing `ir.asset` declarations:
- odoo/enterprise#17465
- odoo/design-themes#459closesodoo/odoo#68695
Related: odoo/upgrade#2348
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
It prevents users accidentally writing below the image when they modify
the snippet.
Part of https://github.com/odoo/odoo/pull/68823
task-2446852
X-original-commit: b6684fcdf6b62b6d12dd500ca5f9c2187a91fe97
The option to add the label "Share" before the social media icons is
still usable.
Part of https://github.com/odoo/odoo/pull/68823
task-2446852
X-original-commit: c5c601ec18ad415320ccfa9012b9a1c17e080040
Added o_not_editable class to carousel-control-prev and
carousel-control-next container divs so that the user can't add text
when sliding carousel items
Part of https://github.com/odoo/odoo/pull/68823
task-2446852
X-original-commit: a6d52aed947180bf73718aa95ac3b4e0016e4a9f
On website app installation and on new website creation a configurator is launched.
The purpose of this configurator is to generate a website that meet the user's needs.
The configurator is composed of 4 steps:
1) Business description: the user is asked to describe its need with its website purpose (dropdown), its industry (autocomplete search) and its objective (dropdown).
2) Logo and palette selection: the user must select a color palette for its website. He can also upload its logo. In this case color palettes recommendations are generated based on the logo's colors.
3) Features selection: the user select the pages and applications he needs.
4) Theme selection: three themes are recommended to the user based on its industry. This screen display a preview of these three themes.
task-id: 2451965
ENT PR: odoo/enterprise#16949
UPG PR: odoo/upgrade#2316closesodoo/odoo#67537
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
*: portal, portal_rating, product, sale, sale_product_configurator,
website, website_sale_comparison, website_sale_product_configurator,
website_sale_stock, website_sale_wishlist, point_of_sale
Redesign of the product page + various UX improvements.
task-2009483
Part of #66736
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
This commit changes the way assets are declared in Odoo modules.
Before: assets were declared in template files. Template bundles were
generated from primary templates, so technically any qweb template could
have been called as an asset bundle, with the 't-call-assets' directive.
Being standard qweb templates, they had access to standard HTML tags
(script, link, with or without raw scripts or style definition), qweb
directives (t-call, t-raw, etc.) and could be inherited by other
templates.
Now: assets are defined in the module's manifest and generated by the
't-call-assets' directive.
More information on the new system can be found on the updated user
documentation (see the "JavaScript Reference" section).
Task: 2352566
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit, the asset bundle "_assets_helpers" was the only
bundle using a "t-raw" directive to insert assets in between other asset
calls.
Now _assets_helpers only contains the assets called before the t-raw
directive, and the second part (1 file actually) has been added after
every call of the bundle.
This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Before this commit both Google Map and Map snippets were always
available in the block list.
After this commit:
- if the Google Maps API key is specified: only the Google Map snippet
is available
- if the Google Maps API key is not specified: only the Map snippet is
available
- if debug mode is activated: both snippets are available
https://github.com/odoo/odoo/pull/68529
Before this commit filter selection on the dynamic snippet did trigger
the rendering of a preview. This sometimes caused a blocking loader to
appear when the filter selection triggered the replacement of the list
of available templates.
After this commit selecting a filter does not trigger a preview
rendering anymore.
Also the condition for making the warning message appear is now about
the selected template being in the list of available templates.
https://github.com/odoo/odoo/pull/68529
Before this commit the latest posts snippet implemented the lookup for
its templates and its rendering procedure.
After this commit a new blog posts snippet is introduced which relies on
the dynamic snippet mechanisms.
task-2477207
https://github.com/odoo/odoo/pull/67334
Before this commit the recently viewed products were handled differently
from the dynamic product snippet.
After this commit the dynamic product snippet supports the functionality
of the recently viewed products snippet:
- its template used to show each product
- its filter of displayed products
- its "Add to cart" feature (with the animation)
- its "Forget" feature (only applicable when viewing recently viewed)
Also added "Accessories" and "Recently Sold With" filterings.
Several kinds of filtering can be combined.
- Products can be restricted to a given category
- Pseudo categories for all products or current category can be used
- Products can be restricted to matching names
- Products can be obtained from one of the following:
- Newest
- Latest sold: ordered by descending frequency in last 8 orders
- Latest viewed
- Accessories (of the current product)
- Recently sold with (the current product)
Accessories and recently sold with are only available in product pages.
Also, generic templates have been considered useless and the whole
mechanism allowing them has been removed (this includes the
pre-rendering mechanism for the fields specified in the filter).
task-2453416
https://github.com/odoo/odoo/pull/65554
Before this commit recently viewed products included below the single
product details were a specific snippet.
After this commit recently viewed products has been removed and
cross-product drop areas have been added to the product page.
task-2453416
https://github.com/odoo/odoo/pull/65554
See https://github.com/odoo/upgrade/pull/2153
The core website behavior is the COW (copy on write) which makes it possible to
handle multiple websites on a single database.
When you do a CRUD operation on an `ir.ui.view` in a website context, the ORM
normal behavior is bypass to perform special stuff, such as:
- Write: if the view is generic (no `website_id`), we bifurcate the write on
the specific view (same `key` but with `website_id` set). If that
view doesn't exist, we create it and fork its whole descending
hierarchy. This write behavior is known as COW.
- Create: we ensure that view is created only for the website and no other.
Basically we just add a `website_id` to that view, but it might
also be about setting the correct `inherit_id` by finding the
specific view among multiple views with the same `key`.
- Unlink: if the view is generic, we will unlink that view but also create a
copy of that view for every other websites so they remain
unmodified: this is known as COU (copy on unlink).
All those behavior aims to satisfy to the multi website holy grail:
-- Any modification in a website context should never impact another website --
Because of those uncommon behaviors, it is sometimes hard to understand or
investigate a database, as views might be copied, up to the point where there
is multiple whole view hierarchies.
This commit attempts to create an user interface to easily figure what's going
on in a database at an `ir.ui.view` level.
The mains advantages of that new `ir.ui.view` Qweb view is to:
- easily figure which views are COW'd on which website
- easily detect which views have a real `arch` modification
- easily see that `arch` change
Closes#63040
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*: web_editor
All theme specific color palettes have been moved into website.
It allows to access them without having to install theme modules and
this is a preparation for our website configuration screen task.
Lists of palettes have been replaced by maps with palette names as keys.
Those names are composed of the palette's original theme name ('generic'
or 'base' for palettes not specific to a theme) and of an index
(ex: 'anelusia-2'), for compatibility.
To keep compatibility with previous version we also convert old color
palettes number to color palette name, specifically for each theme.
A side effect of this change is that we got rid of all gray palettes
which existed in some themes. Those were not fitting the new possibility
of gray customization in the third panel and were not always really a
good customization of the default grays (they still were there mainly
for historical purposes). Unfortunately, this may have some side effect
for old websites which used those grays but the new gray palettes (left
to the default one) should most of the time come as an improvement of
the old ones, and they are now customizable by the user. In the future,
we may associate a perfectly-chosen default gray palette, fitting the
customization system, for each color palette.
PR: https://github.com/odoo/odoo/pull/67488
task-2451965
closesodoo/odoo#67488
Related: odoo/design-themes#455
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit displaying a map on the website required the use of
the Google Maps snippet which requires to configure an API key.
After this commit displaying a map on the website can also be done with
a simpler Maps snippet which requires no configuration.
task-2464422
closesodoo/odoo#66766
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Purpose of the task is, 'general setting' is not easily understandable
by the user. The user often gets lost. This is especially damaging
through onboarding as some new users like to discover the software by
scrolling through the general settings.
So in this commit, the general setting is well organized and easily
understandable by the user.
Related PR: https://github.com/odoo/enterprise/pull/14707closesodoo/odoo#61645
Taskid: 2374990
Related: odoo/enterprise#14707
Related: odoo/upgrade#1958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
*: web_editor
The purpose of this commit is to control the hue and the saturation of
the gray palette.
task-2362091
closesodoo/odoo#66428
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
*: web_editor
Adding the option to show/hide on mobile at snippet level + review the
UI (now a top action button).
task-2431659
closesodoo/odoo#65013
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Previous default website logo of the 'website' module ('YourLogo'
image) looked like a text and not like a proper logo, so it has been
replaced by a more stylised, gray-coloured, version, as a svg.
--
task-2448746
closesodoo/odoo#68075
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
From the editor, when clicking on an image there is a new refresh icon
next to the delete icon that will open the media dialog to allow for its
replacement.
Part of https://github.com/odoo/odoo/pull/66550
task-2431684
When the snippet was dropped, the miniatures were disappearing and
replaced by an arrow.
It was due to two things:
- the wrongly calculated index when the snippet was
initialized, as the jquery method .index() will still return -1 when no
element is found, fixed in https://github.com/odoo/odoo/pull/67389
- none of the sample images in the template were active
task-2472041
closesodoo/odoo#67081
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web_editor
The goal of this commit is to tweak the code of <we-range> widget
to be able to select a css using class values.
This way, the image spacing selection can be easily replaced by
a slider of 4 levels [0 -> none, 1 -> small, 2 -> medium, 3 -> big].
Part of https://github.com/odoo/odoo/pull/66544
task-2326573
*: website
The goal of this commit is to improve multi image selection
(Image Wall, Gallery...) using the same layout as in selected themes
for selected images.
Part of https://github.com/odoo/odoo/pull/66544
task-2326573
Behaviour before the PR is merged :
There is no indication that the user can exit fullscreen by
pressing on escape.
Desired behaviour after PR is merged :
An indication is shown to the user after he enters fullscreen,
which disappear after a few seconds. A new widget
FullscreenIndication is available.
Part of https://github.com/odoo/odoo/pull/65255
task-2438556
closesodoo/odoo#65255
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Behaviour before the PR is merged :
Options tab from the snippets menu can be misleading for some
users.
Desired behaviour after PR is merged :
The options tab from the snippets menu is renamed to Theme, and
the tooltip is removed.
Part of https://github.com/odoo/odoo/pull/65255
task-2438556
Before this commit the save snippet button appeared for the cookie bar.
But this makes no sense because the cookie bar is implicitly saved.
After this commit the save snippet button is not available for the
cookie bar.
task-2464233
https://github.com/odoo/odoo/pull/67217
X-original-commit: 439a7568b5b1e7d0aa53c63c7332dd22e3d6fc04
Before this commit, if we replaced an icon of the showcase snippet
with an image, this image was streched depending on title size (if too
long and on 2 lines). Its because the align-self default value of a
flex item is strech.
task-2447087
closesodoo/odoo#67244
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* = website
Add we-datepicker
Allow empty date/datetime inputs
The countdown was the only snippet using this so if no date it will
default to timestamp 0 and display a resolved countdown.
Before it was the moment().now() datetime which is the same result:
0 time remaining.
Part of: https://github.com/odoo/odoo/pull/47949
task-2011583
The goal of this commit is to add tips when theme is loaded
to encourage users to follow the tour (in Edit mode).
task-2440450
closesodoo/odoo#67007
X-original-commit: f5f9f336b052ddc4bd327618bad6d2a3284aa3ff
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Primary color lets imagine that it is the primary action to be done to update
the routing. While it is just to refresh the url_from list if you have missing
route (new module installed, ...)
Maybe we should just remove this button at the end.
closesodoo/odoo#66919
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, display mode is changed to block after hiding it on mobile mode.
After this commit, only change display mode for mobile and use inherited mode otherwise.
task-2431659
closesodoo/odoo#66787
X-original-commit: 83112caf1964801cd2edfa5a28bf8199d66e00cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Previously, when removing all the content of a snippet, that snippet
would get automatically deleted. This was not the case for parallax
snippets because we previously intended the user to drop the parallax
snippet, empty it, and drop other content inside of it.
Recently, we added the parallax option on all snippets, rendering the
previous workflow obsolete. There is now no longer any reason to keep
empty parallax snippets. This commit fixes that.
task-2446008
closesodoo/odoo#65551
X-original-commit: 61f410b57f1c28bd6464b86d1582c22b7fd846d5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>