Commit Graph
6885 Commits
Author SHA1 Message Date
Younn Olivier 5a5f3da58b [FIX] web_editor, website: fix existing links edition via link tools
Before this commit, there was an issue with the edition of links that
were already in the page, via the link tools.
1/ In edit mode, drag and drop the s_image_text snippet and save,
2/ Click on edit, click on the "learn more" button,
3/ From the link tools, change the style to secondary,
4/ Click on save again, the button is still styled with as primary.

[1] added a history step to the link creation via the link tools. As the
editor observer is set to unactive at the start of the link tools, the
changes made to the link with the link tools were not processed by the
EditPageMenu observer, and the block was not set as .o_dirty (the
changes were therefore not saved).

This bug was hidden by our use of bootstrap popovers. The
aria-describedby attribute, managed by bootstrap when showing/hiding a
popover, would be recorded as a change from the EditPageMenu observer,
which would set the view as dirty.
Also, changing any other element of the page would set the page as dirty
and hide the bug.

It only became visible when [2] changed the popover initialization from
'focus' to 'manual'. With that, the aria-describedby attribute was
modified inbetween the LinkTools.start and LinkTools.destroy (and was
therefore not recorded at the EditPageMenu level).

To record correctly the changes made from the link tools to the link, we
activate the editor observer when applying the changes to the DOM.

This commit also introduces some tests for the link tools.
The listener on customizable links from the wysiwyg was changed from
mousedown to click for simpler tests.

task-2680461

[1]: 6db6134f97
[2]: 161c5fc8e742294e8d85c889b4bf8d3d8cd484f5

closes odoo/odoo#80763

X-original-commit: c29fe9fa8fc8ff4a5e6f042607ef9b3070d1d339
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-02 15:16:34 +00:00
Nicolas Lempereur d0ba6c26e6 [FIX] website: allow non 400 normal google font
When adding a google font, the website test if it is valid with an URL
like:

https://fonts.googleapis.com/css?family=Open+Sans+Condensed

but this is only testing the normal with weight 400 version which might
not be available (for "open sans condensed" only 300 and 700 weight is
available).

Instead with this fix we try:

https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300i,400,400i,700,700i

which is what is being queried when the font is really used and will
only fail if all types are missing (in which case it is a good thing
that it fails).

opw-2678485

closes odoo/odoo#80564

X-original-commit: 126ccaecb876c17dd6b7e34aef4aa4927d13b8f7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-11-30 12:52:26 +00:00
Benjamin Vray e717ccd353 [IMP] website: redesign the toggle switch
This commit redesigns the toggle switch in website to make it clearer
and prettier.

task-2586313

closes odoo/odoo#77392

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-29 15:40:50 +00:00
qsm-odoo 044d0a7908 [FIX] website: change default scss file displayed in SCSS editor
By default show the user_custom_rules.scss one as some people would
write rules in user_custom_bootstrap_overridden.scss otherwise, not
reading the comment inside explaining how that file should be used.

task-2698641

X-original-commit: d465b333a403807f09cdd49078f87b102595994e
Part-of: odoo/odoo#80499
2021-11-29 10:33:53 +00:00
qsm-odoo 8ff5ab4d6c [FIX] website: review pages and features screen of the configurator
Now allow to scroll through the pages and features without hiding the
"Build my website" button on small (or zoomed) screens.

task-2670809

closes odoo/odoo#80466

X-original-commit: 8fe2674f013408d7d1449fddc7d18728cef69281
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) bcee349dc4 [FIX] website: restore scrollbar for some menus
After [1], the dropdown menu of the main navbar for some menus
(e.g customize on /shop) didn't have scrollbars anymore, making it hard
to navigate on smaller resolution devices.

This commit restores that.

[1]: https://github.com/odoo/odoo/commit/1971bf39810468b2b67e2ecd3c86c663d5cffcfd

task-2670809

X-original-commit: b46d2ad7c6b225ae34594991d5189672b95fc3cc
Part-of: odoo/odoo#80466
2021-11-26 16:42:17 +00:00
Benoit Socias fdd30e368c [FIX] website: survive to null texts during trigram search
Generic search bar was introduced with #65871.
But the trigram search would fail if it encounters a (SQL) NULL text
from the database. This is because when word_similarity() receives NULL
as a parameter it returns NULL, and NULL not being a number cannot be
compared with the similarity threshold.

After this commit the trigram search will exclude matches returning a
NULL similarity.

Step to reproduce:
  - Enable trigram in the DB, run `CREATE EXTENSION pg_trgm;` in psql
  - Create a product, name it `myproduct`
  - Insert NULL values inside the translation table (not sure how the
    user did it):
    `update ir_translation set value = NULL where src = 'myproduct';`
  - Search 'mypro' in the eshop search bar
    -> Traceback

opw-2680659

closes odoo/odoo#80426

X-original-commit: ef17edc32d4646c93e31e730249be83469951241
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-26 14:26:31 +00:00
Victor Feyens b885b9e090 [REM] website: empty method override
Part-of: odoo/odoo#62249
2021-11-26 09:44:58 +00:00
Nikunj Ladava 00193c4d11 [FIX] website_{event, event_meet, sale, sale_coupon}: improve design for customize menus with label tag
With a recent commit[1], we added the scrollerService. However, as a side effect
'Track Visitors' and 'Event Sub-menu' customize menus are not clickable because
they are anchor tags with href=# and the clicks on such anchors are disabled
with scrollerService..

With this task, we take the opportunity to clean up customize menus a bit
because and instead of the anchor tag, now such menus are wrapped within
label (<label>) tags with 'dropdown-item m-0' classes.

Menus are now cleaned and clickable again.

commit[1] - 0573aca

Task-2616588

closes odoo/odoo#80391

X-original-commit: 7e010500fbe64bddb944335ca5960586699484af
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-25 13:28:51 +00:00
qsm-odoo 870c439737 [FIX] website: properly mark carousel test tour as a test tour
Commit [1] and its forward-ports introduced a test tour (properly added
in assets_tests) but was not declared as a test one. Meaning that if you
were in debug=tests, you were able to follow a strange tour not meant
for user testing.

[1]: https://github.com/odoo/odoo/commit/3c194faa930b0d3a537ca8b893b2c0442b5464e7

closes odoo/odoo#80362

X-original-commit: 732addec9452813a404823f28703d54d37a6b87f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-25 09:14:09 +00:00
Benoit Socias eab9931c11 [FIX] website: manually cascade delete from page to menu
Before this commit when a website page was deleted, its related website
menu was deleted inside the database only through the ondelete="cascade"
of the Many2one relationship. This however did not perform the menu
cleanup on the ORM side.
This caused problems when the related menu id was kept in cache by
website's _get_menu_ids(), because the record could not be fetched
anymore. E.g. deleting a website-specific version of the "Contact Us"
page caused the problem, making the menu bar non renderable on all
pages.

After this commit the caches are cleared when a page is unlinked to
avoid this problem.

task-2686221

closes odoo/odoo#80348

X-original-commit: dd9997753d442f8923b31c3ceaa0cd29b09a06b2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-24 18:38:06 +00:00
Benjamin Vray db27973180 [IMP] website, website_livechat: redesign and improve livechat button
After this commit:

- The livechat button is redesigned as a floating icon in website.
- The "colliding" check between buttons and bottom fixed elements is no
longer done only on the buttons but also on the <a> elements.
- When the livechat button hides a button/link, it is moved up rather
than made invisible.

task-2614762

closes odoo/odoo#78891

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-24 13:16:40 +00:00
Benoit Socias 6b9183a322 [FIX] website: accept default template key in dynamic snippets
Before this commit the "first" template key was selected by default
before the default options were being considered. Because of this,
setting a specific default template key was always ignored since a
template was already selected.

After this commit the widget keeps track of which value is actually a
default one, allowing for setting a specific default for the template
key.

task-2680578

closes odoo/odoo#80207

X-original-commit: 84130ffb5c7f728e7e61d6979d78c496c473947e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-23 11:12:18 +00:00
Jeremy Kersten 5945e8e4e3 [FIX] http_routing: don't remove trailing / during redirect
Before this commit, since we promote the use of route without trailing / for
best SEO (fee0113), we remove the trailing / during a redirect to avoid an
extra request.

Unfortunately, it will break some route with trailing / in case of multi lang.

So we remove this optimization, it will increase potentially number of http
request before to get the final url, but it will allow to continue to support
trailing slash in v15.

This commit partially revert the commit ae35117

closes odoo/odoo#80191

X-original-commit: 84d2f5b57ccf3dbcefebdbc795ab1872bc1504b9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-22 16:27:09 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
2dd772dab8 [IMP] website, *: improve video providers handling
*: web_editor, website_sale

This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.

All the regexes are kept in a python tools file and are called in JS
using an RPC.

task-2154812

closes odoo/odoo#44537

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
2021-11-19 22:32:39 +00:00
Jeremy Kersten 27df588c15 [FIX] *: remove trailing slash from controllers
Follow-up of c1ae086cdb

closes odoo/odoo#80139

X-original-commit: 58ee1a5906e4b2a50fb248085abd9caab97f4c52
Related: odoo/enterprise#22421
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-19 18:53:45 +00:00
Benoit Socias b15959c70f [FIX] website: change default template of mega menus
Before this commit the default template for mega menus was the "Multi
Menus" template.

After this commit the default template for mega menus is the "Odoo Menu"
template.

task-2675252

closes odoo/odoo#80040

X-original-commit: a4d686140133ecf59a3d09c8f930a70b91064599
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-18 18:45:26 +00:00
Younn OlivierandMatthieu Stockbauer aba31e9f2d [IMP] web_editor, website: add connector options to steps snippet
A new option StepsConnector is added to the steps snippets, allowing to
pick the type of the steps connector and its color.

The option listens to changes in the UI or in the columns size to
recompute the width and position of the arrows.
The width of the connector is computed based on the widths of the
current step and the next step, which are defined in bootstrap columns.

The s_process_steps snippet CSS version is now 001.

task-2463009

closes odoo/odoo#77282

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Matthieu Stockbauer <tsm@odoo.com>
2021-11-18 16:00:40 +00:00
Romain Derie 8386d62702 [FIX] website: change the asset disabling from GC to CRON
Before this commit, the behavior disabling the unused snippet assets was put
directly in the autovacuum CRON instead of its own CRON.

That behavior is leading to some perf-issue running the autovacuum cron since
it would take too much time.
Indeed, the code will loop inside as many snippet as it exists, and every time
then perform an SQL Query to get the HTML fields using the snippet.

An improvement will come later to not loop on every snippet anymore.

task-2694120

closes odoo/odoo#79981

X-original-commit: 96ab95d37c9b442a4ccb737fd867ca91ec1c11b6
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-11-18 08:37:49 +00:00
Patrick Hoste b5c87d86ca [IMP] website(_event): replace old event snippet by new dynamic one
PURPOSE

Replace the old event snippet which was a simple template with a
javascript file doing a rpc by a new one directly inherited by the
dynamic snippet.
The old snippet was displaying a list of the upcoming events based
on the user's localization. With this commit, it will be completely
replaced by the new snippet. The migration will convert the old
snippets to avoid versioning and keeping ugly code.
The new snippet allows the user to set multiples tags to display
only the wanted events on the website.

LINKS

Task-2489680
PR : odoo/odoo#68644

Related: odoo/upgrade#2406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 13:05:53 +00:00
Tom De Caluwé 4fd5fd4a97 [FIX] web_editor, website: fix removal of last item inside active slides
A bug currently makes the carousel snippet collapse/disappear when its
active contents are removed. This happens because after the removal,
the carousel no longer has an active item.

The solution that was chosen was to not allow the removal of slides
unless using the dedicated option which is there for that. This solution
has the advantage to also allow users to create empty slides (using a
background image for example) by simply removing the columns inside.

Note: Newly created carousels will include the oe_unremovable class on
their slides. As such they will no longer depend on isEmptyAndRemovable
checking them for having a carousel-item class on the parent.

task-2506165

closes odoo/odoo#79892

X-original-commit: 0cf36a227e7b90fb64b1bc8024de813894d10d14
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-16 19:21:14 +00:00
fde251330d [FIX] website: fix sharers of share snippet
The whatsapp sharer was fixed via [1]. This uses https for all sharers
and fix the pinterest one using the logo image with their new API.

[1]: https://github.com/odoo/odoo/commit/62575b75ff48a34df23f8742737226949f13c13c

closes odoo/odoo#79891

X-original-commit: 45497060d9185e7fddb3fc6fcfcbcb81040c8d8b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-11-16 18:39:20 +00:00
stefanorigano (SRI) 9bd712edd8 [FIX] website_sale: topbar dropdown design
Prior to this commit the element was affected my themes customization.

task#2667024

Part-of: odoo/odoo#79651
2021-11-16 13:03:01 +00:00
Romain DerieandSiddarth Gajjar 7ab8fc9eda [FIX] website: fix usability of the popup snippet
There were some usability issues with the popup when a video was
inserted inside it:
- The video would be playing before the popup is shown and the user
  would thus miss part of that video (potentially a lot, depending of
  the set popup delay).
- The video would continue to play in the background after closing the
  popup.

task-2251203

closes odoo/odoo#79802

X-original-commit: 5ec45659fe89f14a9c770d982e257d75931033d8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Siddarth Gajjar <sga@odoo.com>
2021-11-16 10:49:20 +00:00
Siddarth Gajjarandqsm-odoo a66d347606 [FIX] website: fix background video placement in popup
Before this commit, if you add a background video in a popup, the video
frame will not setup properly because the _adjustIframe function cannot
find wrapperWidth and its ratio.

After this commit, _adjustIframe will be called again once the popup
is opened.

task-2251203

X-original-commit: 2b571bd012c8a1226d17edb2ee9dd2e6f74ce5d1
Part-of: odoo/odoo#79802
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-11-16 10:49:19 +00:00
jpr-odooanddwa-odoo f2bace6518 [IMP] website: add min & max option for chart axis value
This commit introduces min & max input options for the chart values of
the axis. It will be visible only for the line and bar chart.

- When min and max values are same, we fix this by changing the min
  value to zero and multiply provided value by 2 to set max value.

- When min value greater than max value, we swap the values.

- When the min value is given and the max value is not:
    - If the min value is smaller than greatest value of the chart, then
      the max value is set to the greatest value of the chart.
    - Otherwise, the given minimum value is used as maximum value and
      the minimum is set to 0.

- When only the max value is given then the minimum value is set to 0.

task-2250766

closes odoo/odoo#52221

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: dwa-odoo <dwa@odoo.com>
2021-11-15 14:27:06 +00:00
Thibault Libioulle f2b13dd0ec [FIX] website{,_sale}: fix search product with several categories
This commit fixes an issue when there are several public categories on
a single product. Categories are shown side-by-side under product name
in the search bar.
This commit also fixes the issue where the `Category:X` text is matched
and highlighted whereas the search text is not used to match the product
categories.

Steps to reproduce :
    - Install eCommerce
    - Add several eCommerce Categories to a product
    - Go to shop
    - Search for the product in the searchbar
    - Traceback

Current Behavior :
    - Traceback when generating the results in the quick search bar.
      It's not expected to have several categories in the current
      implementation.
    - If all products have a unique category, then the text in
`Category:X` is matched and highlighted.

Desired Behavior :
    - No traceback
    - When there are multiple categories, an extra link should be
      present on each category rather than a unique link on all
      categories.
    - The product categories don't have to be matched.

Related PR: #79258
task-2680726

closes odoo/odoo#79363

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-11-15 12:53:20 +00:00
qsm-odoo 1ebc7c301b [FIX] web_editor, website: fix onFocus/onBlur flow + add test
The flow has been broken multiple times across the years. Let's add a
test in all stable versions.

For the 14.0 forward-port, the test came with a fix which restores the
13.0 flow which we tried to change in 14.0... but only ended up broking
it. Indeed, with [1], the 13.0 was fixed. And, with [2], we tried to
simplify the flow... but the explanation given by the commit is just
wrong: the flow was just broken and the simplification that was to be
done in fact practically never occurs. The more the reason to add a
test, proving how the flow is working. The simplification may be done
someday but not sure it is really worth it.

For the 15.0 forward-port, another fix was needed because of [3] which
introduced a bug which makes the onBlur method be called multiple times
when hiding a whole editor hierarchy.

[1]: https://github.com/odoo/odoo/commit/076992bdf099f3a645c9a1ef6df2cdcccbf1c2b2
[2]: https://github.com/odoo/odoo/commit/5c007305c9998ade32c6677cac5552101c3a96af
[3]: https://github.com/odoo/odoo/commit/806a8db35b5e0e6a461422f5bba7c97180c3ef29

closes odoo/odoo#79734

X-original-commit: 0acc5e784b15d9c963660da3781763448503f33e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-14 21:40:48 +00:00
Nicolas Bayet e68a9d37dc [IMP] web_editor: allow to use link popover everywhere
Before this commit, the link popover was only available in the website
builder. Now it is available anywhere the wysiwyg is used.

Task-2678412

closes odoo/odoo#79542

X-original-commit: 161c5fc8e742294e8d85c889b4bf8d3d8cd484f5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-09 14:00:56 +00:00
Nicolas Bayet d5a031a9a3 [FIX] web_editor, website: only save dirty element
Before this commit, when inserting a new snippet or moving a snippet
that was already in the page would temporarily create hooks (`we-hook`)
in the page. The insertion of thoses hooks would trigger mutation
in the dirty observer (observer defined in edit.js) and mark all
oe_structure for which a hook was temporarily inserted.
Thus, creating unnecessary views in the backend.

Now, the code skip the mutations of the drag and drop hooks.

Task-2567752

closes odoo/odoo#79394

X-original-commit: 1b80fe9b56acea09a6784691561df65fe6349f50
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-08 10:15:56 +00:00
qsm-odoo 95ca988113 [FIX] website: fix video loading
task-2376327
2021-07-16 11:26:38 +02:00
Xavier Morel b51b094c2b [IMP] http: avoid cycle on request 2021-01-26 09:05:35 +01:00
Benjamin Vray f534d20674 [FIX] web_editor, *: fix active class disappearing on tabs snippet
* = 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

closes odoo/odoo#79190

X-original-commit: 7f33cdcd14ef753cc5bf823bfc1de0d2431e285a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-29 12:39:58 +00:00
Romain Derie f51a53e6ee [FIX] website: avoid calling external services during test
`s_map` snippet is calling maps.google.com which might be the reason this tour
experience some race condition when trying to drag and drop the
`s_newsletter_subscribe_form` (which happen after the `s_map` snippet was
dropped).

When the race condition happen, we can see on the screenshot that the snippet
was drag & dropped into the footer instead of the `s_text_image` inside the
`#wrap` as it should be (see comment on first step of the test).
The reason the snippet is not dropped where it should be is because the `s_map`
was not removed as it should have been (seeing the screenshot), so the page was
scrolled and the footer became the first available and visible `o_editable`.

The `s_map` snippet is probably still in the DOM (despite a step is in charge
of removing it) because it is recreated after the google maps server reply,
which sometimes is probably taking an unexpected long time.

Anyway, external services should never be called during tests, removing the
snippet from the tour is an "easy" first step to try to fix the race
condition.

closes odoo/odoo#79120

X-original-commit: 37c9ae2c3b228e5abbe5bdb84df2c381d9f2fcb3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-10-28 10:05:33 +00:00
Guillaume (gdi) e55d2839a6 [FIX] website: add default color combination to mega menus
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

closes odoo/odoo#79094

X-original-commit: 967d21a8d0dd8c79be1fe0a2d2ec3a6edbb389ca
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-27 19:23:42 +00:00
xO-Tx 04f09503b2 [FIX] web, website: fix initAutoMoreMenu on user navbar
The current code in 'initAutoMoreMenu' doesn't work properly
on navbar after the update on dropdown in [1]. Small tweaks
were added in this commit to fix that.

[1]: 84715436d87bb05b421bc9ccaacda67d07571690

task-2618929

X-original-commit: 29b9280c44534d2f210dbcea83e0049365949f48
Part-of: odoo/odoo#78959
2021-10-26 07:48:00 +00:00
Kamen Zhekov 3739d74afe [IMP] website - add noindex when not browsing configured domain
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

closes odoo/odoo#78425

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-21 16:54:43 +00:00
Romain Derie 7d8a8ddea0 [IMP] website(_forum/_profile): remove _get_http_domain method
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/2951

closes odoo/odoo#78766

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-21 15:47:22 +00:00
Tom De Caluwé f81f2a124c [IMP] website: prevent clicking while starting the editor
When visiting a page with enable_editor set to true, the web editor
will be automatically started. However, while the editor is loading,
the end user can still click other buttons in the navbar.

For example, some changes in the web editor require a save and reload
of the current page being edited. After saving, the same page will be
reloaded with enable_editor.

This commit blocks any clicks while the editor is being loaded.

task-2607755

closes odoo/odoo#78721

X-original-commit: 89bdfcd16828e1432900ea46118fd6ddadf96f2d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-21 09:56:47 +00:00
Benjamin Vray 9dd8f06117 [FIX] website: prevent scroll button editing
Before this commit, it was possible to edit scroll buttons with the
editor toolbar.

task-2656662

closes odoo/odoo#78637

X-original-commit: ca5a36323900a27896761ed12c002d22b6c6cf53
Related: odoo/design-themes#523
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-19 15:59:07 +00:00
Barad Mahendra 281b65a943 [FIX] web,*_*: fix the html content in notification
Currently markup-ification of the legacy notifications system
display the html content in notification layout for some of the
notification of document and planning from commit: https://github.com/odoo/enterprise/commit/ba44461fea337ed2e5adbdfa1e8eede00b036def

So here in this commit, we make the method `makeLegacyNotificationService`
always `_.escape(message)` and pass `messageIsHtml: true` to the owl
notifications system so notification with html content will be displayed
properly.

Task-2657391

closes odoo/odoo#78627

X-original-commit: 7ce6d8d70be79c9c626865598b898dce9a18b045
Related: odoo/enterprise#21782
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-19 14:43:42 +00:00
Kishan Gajjar b2f170156a [FIX] website: restore icons for 'Big Icons Subtitles' snippet
closes #78507

closes odoo/odoo#78548

X-original-commit: 593efcf99a6aa2b18364786a807d9ec9b3c7e72f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 12:46:02 +00:00
Benjamin Vray 34c401caf8 [FIX] website: fix save animated snippet
Before this commit, when dropping custom snippet (or saved snippet)
containing an animation in the page, the animated element of the
snippet remained hidden.

task-2664876

closes odoo/odoo#78493

X-original-commit: 61d7744ca988641bd4d8a4006350ec197eece25a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:58 +00:00
Benjamin Vray 2e57d784d3 [FIX] website, web_editor: fix overlay options of the timeline snippet
Before this commit, the CSS of the overlay option buttons of the
timeline snippet was broken.

task-2648348

closes odoo/odoo#78491

X-original-commit: 13770d650def3107378fe4010aac48dc85a5256a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-18 10:21:49 +00:00
Younn Olivier 46c0bf7827 [FIX] website, mass_mailing: remove composed css classes
Recently, [1] broke the style of a few snippets, because it was adding a
:not selector to the parent css class, that was used to define children
classes that were adding a suffix to the parent class name with the &
symbol.

It was decided that every snippet css class should be explicitly
declared to avoid breaking the style when adding selectors to the parent
class. This will also prevent breaking the style when adding a new css
version for the snippet.

task-2660921

[1]: https://github.com/odoo/odoo/pull/77312

closes odoo/odoo#78413

X-original-commit: af6785599358d2dcb9ff811afc2e558a94d9704d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-15 16:13:47 +00:00
qsm-odoo 05765de195 [FIX] website: properly re-show the header when scrolling to the top
Sometimes, when using the "standard affixed" header effect, when
scrolling to the top, the header was kept hidden and left a blank space.

This happened in fact systematically when scrolling to the top very
fast. Indeed, in that case, the code went through the header update
only once and was not able to go from state 3 (page scrolled header
visible) to state 1 (page not scrolled header visible) without going
through state 2 (page scrolled header invisible) and you thus ended
with a mix of state 1 and 2: page not scrolled and header invisible).

Closes https://github.com/odoo/odoo/issues/71449

closes odoo/odoo#78268

X-original-commit: 20648ef2134672587c25fd3c7c79ed3825728b38
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-13 10:02:38 +00:00
Sébastien Mottet (oms) 667a00a029 [FIX] website: use base-1 as default palette for configurator
When using the configurator the user can upload its logo to
generate a color palette. In this case we select the base-1
palette as default palette instead of the theme's default palette.
Doing so avoids the potential customizations the theme palette
may introduces.

task-2665885

closes odoo/odoo#78251

X-original-commit: 50019c8f68b89968615f87c365095c94caeef46c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-13 08:41:06 +00:00
Arthur (ard) 9b47e248de [FIX] website: prevent snippet drop in product_catalog
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

closes odoo/odoo#78185

X-original-commit: 086bef8ffaff29a12836a36baed6cfb0ffea7da0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-12 14:11:43 +00:00
Jeremy Kersten 05dd2169a6 [FIX] website: allow to disable cache page based on content
In some case, we know that page will contains dynamic content and that cache
should be ignored.

E.g. as soon as a s_snippet_form will be present in page, we know that we need
the real csrf, and so we cannot use the cached response from another user.

Now, we disable the cache (cache_time=0)

closes odoo/odoo#77935

X-original-commit: 262499a91cc9f2365cf2ff131796d9b61b438f9b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-10-12 11:44:44 +00:00