Commit Graph
3190 Commits
Author SHA1 Message Date
Sébastien Mottet (oms) 2323af4451 [REF] website, *: centralize color palettes in website
*: 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

closes odoo/odoo#67488

Related: odoo/design-themes#455
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-26 11:31:17 +00:00
qsm-odoo e08184103c [IMP] website: add technical improvement for gray customization
Improvement of [1]. Allows to not have to save the gray-hue and
gray-extra-saturation server-side at all, and thus better allow to use
a fully customized gray palette in theme should a theme need it.

[1]: https://github.com/odoo/odoo/commit/35d27a6c1d3dab621de7f059565d7619ae004412

Merged with https://github.com/odoo/odoo/pull/67488
2021-03-26 11:31:17 +00:00
Benoit Socias 20433b9796 [IMP] website: make maps available without configuration
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

closes odoo/odoo#66766

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-25 15:43:21 +00:00
Oussama MESSAOUDIandqsm-odoo 35d27a6c1d [IMP] website, *: control hue and saturation of grays
*: web_editor

The purpose of this commit is to control the hue and the saturation of
the gray palette.

task-2362091

closes odoo/odoo#66428

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-03-24 17:36:14 +00:00
Jeremy Kersten 86e3c1a5e0 [FIX] website: improve logo svg
Without this 'XML declaration', if you have magic installed, the mime type
is image/svg instead of image/svg+xml and browser don't render it.

This commit is related to #68211 meanwhile a more generic solution (if needed).

closes odoo/odoo#68239

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 13:13:23 +00:00
Oussama MESSAOUDI 91703b9ff5 [IMP] website, *: improve the UI of the mobile visibility option
*: web_editor

Adding the option to show/hide on mobile at snippet level + review the
UI (now a top action button).

task-2431659

closes odoo/odoo#65013

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 10:15:24 +00:00
Carlos Valverde da6c19acd0 [IMP] website: replace the default website logo
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

closes odoo/odoo#68075

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-18 12:34:54 +00:00
Samuel Degueldre 7e1ba0de41 [FIX] web, web_editor, website: fix incorrectly translated template literals
closes odoo/odoo#68105

X-original-commit: e1d280880c26d6139dc6a3679fb7df7e07defdd6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-03-18 16:05:37 +00:00
Benjamin Vray 86a1b78f99 [FIX] website, website_sale: fix right corner ribbon
Before this commit, when ribbon was at the right corner of a product
card, this ribbon hid the buttons in list view.

After this commit, in list view, we place the ribbon on the left to
avoid this bug. There was no better solution to fix this in stable.

task-2466120

closes odoo/odoo#67898

X-original-commit: dcddf2125652b03bf4bff385c074fef0b2096f1d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-15 18:19:44 +00:00
Younn Olivier 9bbe5be3fb [IMP] web_editor, *: display handles overlay only when needed
*: website

When declaring a SnippetOption, it is now possible to specify if the
display of the handles overlay should be visible on the snippet element.

By default, it is set to false, and if the selected snippet element does
not have any option that require the handles to be displayed, we will
display them on the first parent element that needs the handles to be
displayed.

In the context of an image, the handles will be displayed on the parent
column, as the image does not have an option that require the handles.

Part of https://github.com/odoo/odoo/pull/66550
task-2431684

closes odoo/odoo#66550

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-12 10:16:14 +00:00
Younn Olivier f3ccc91d42 [IMP] website, web_editor: add an icon to replace images in edition
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
2021-03-12 10:16:04 +00:00
Younn Olivier 7332d37c68 [FIX] website: fix image gallery slider index
The gallery slider index was wrongly calculated when the gallery had no
active element, as the jquery method .index() will still return -1 when
no element is found.

task-2472041

closes odoo/odoo#67563

X-original-commit: 666fc3697bd7d70cfa0dd92f0a401b771196bb27
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 15:50:37 +00:00
Younn Olivier 4366d17794 [FIX] website: fix fullscreen indication pointer events
As the container div of the fullscreen indication stays on the page to
be displayed, it was obstructing the click events of the elements it was
displayed on. The user could not access what was on top of the screen.

The solution was to remove pointer events for that div so that it
doesn't interfere with other elements on the page.

Related to https://github.com/odoo/odoo/pull/65255

closes odoo/odoo#67589

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-10 12:49:29 +00:00
qsm-odooandOussama MESSAOUDI 43232259bf [FIX] website: restore mobile visibility snippet option
Conflict between a fix in 14.0 (see [1]) and an improvement in master
(see [2]) broke the feature (because both introducing a JS option for
the feature).

[1]: https://github.com/odoo/odoo/commit/9463f0f889f9dd8da6077895c125da4998a933c0
[2]: https://github.com/odoo/odoo/commit/25173a4c29b57a01cbe415de439f2da0f4760507

closes odoo/odoo#67555

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Oussama MESSAOUDI <ome@odoo.com>
2021-03-09 16:28:23 +00:00
xO-Tx 90b1b1b1b0 [IMP] website: make images wall editable
The goal of this commit is to make the Images Wall/Gallery snippet
editable to be able to open the media dialog on "double-click"
on images.

Part of https://github.com/odoo/odoo/pull/66544
task-2326573
2021-03-09 11:02:36 +00:00
xO-Tx b1e48c8dd2 [IMP] web_editor, *: update multi image selection layout
*: 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
2021-03-09 11:02:14 +00:00
Younn Olivier dfcc9a3ce0 [IMP] website: show indication to the user that he can exit full screen
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

closes odoo/odoo#65255

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-08 16:25:14 +00:00
Younn Olivier eddf8971cf [IMP] website, website_sale: change labels of new content
When adding a new product, 'Product Name' is displayed
instead of 'Name', and 'Create' instead of 'Continue' for every type of
new content added.

Part of https://github.com/odoo/odoo/pull/65255

task-2438556
2021-03-08 16:23:55 +00:00
Younn Olivier e55de3be34 [IMP] website: rename 'options' tab to 'theme' and remove tooltip
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
2021-03-08 16:23:54 +00:00
Jeremy Kersten 1ff61fc714 [FIX] website: typo in drop snippet tour
task-2466754

closes odoo/odoo#67346

X-original-commit: 19ef4f1b318b979bf2c6e89ad9962a50e6684dc9
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-05 11:58:59 +00:00
Benjamin Vray cca12cd718 [FIX] website: fix showcase snippet images stretched
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

closes odoo/odoo#67244

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-04 13:53:34 +00:00
Benjamin Vray 032d96ffbd [FIX] website: state not saved for accordion snippet
Before this commit, the states (collapsed/not collapsed) of the tabs
of the accordion snippet were not saved if it was the only changement
in edit mode.

After this commit, we trigger a content change when the states of the
tabs is changed.

task-2442237

closes odoo/odoo#67276

X-original-commit: 18af2ecade9482b5243059aefbfa79410ebf59a6
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-04 16:02:16 +00:00
qsm-odoo 25173a4c29 [FIX] website_form, *: remove "Shown on mobile" opt for hidden fields
*: website

Part of https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 14:40:49 +00:00
fja-odoo 9ea276ae2f [IMP] website_form, *: allow form default input value
* = web_editor

Add support for default values on website form

Compatible fields are: textarea, text, number, date, datetime, unique
checkox, multiple checkboxes, radio buttons, select.

Part of: https://github.com/odoo/odoo/pull/47949
task-2011583
2021-02-26 14:40:49 +00:00
xO-Tx de351e4873 [IMP] website: add theme loader tips
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

closes odoo/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>
2021-03-01 14:27:27 +00:00
Michael Mattiello (mcm)andged-odoo 7086488064 [REF] web, *: remove patchMixin + imp utils.patch
* hr, hr_holidays, im_livechat, mail, snailmail, website,
  website_livechat

This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.

`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.

closes odoo/odoo#65967

Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
2021-02-26 10:39:21 +00:00
Romeo Fragomeli 965eed79b9 [FIX] website: o_cp_top_left class doesn't exist on mobile
Before this commit, the selector 'o_cp_top_left' was used to target
a descendent element. The 'o_cp_top_left' class was added in this commit
odoo/odoo@533db5991a
But 'o_cp_top_left' class is only available on desktop.
On mobile the layout of the control panel is different.
This produce a bug on Mobile.

After this commit, we use a less restrictive querySelector to match
the element in mobile too.

Note: we remove the 'div' for clarity/consistency

Steps to reproduce:
* Open Odoo in "Mobile mode" (small screen)
* Go to Apps
* Install a module that need website or website it self
* You are redirect to the "chose theme" => Bug

closes odoo/odoo#66870

X-original-commit: 3d401a30ee7d673776c129b27dd3b298a4c7a3fe
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2021-02-25 16:17:18 +00:00
Oussama MESSAOUDI 9463f0f889 [FIX] website: hide block in mobile display mode
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

closes odoo/odoo#66787

X-original-commit: 83112caf1964801cd2edfa5a28bf8199d66e00cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-24 19:09:44 +00:00
Andrea Grazioso (agr-odoo) 371ae55a19 [FIX] website: show thumbnails for img gallery in tabs snippet
- Go to the website
- Drag a "Tabs" block on the page, you will have 3 example tabs
- Click on the tab "Contact" and drag in the block "Image Gallery"
- Add multiple images to the image gallery
- Click on one of the other tabs so that the image gallery is hidden
- Save

The image gallery do not have the thumbails anymore.
This occurs because when the carousel-indicator is hidden, jquery is not
able to fetch its real length, so no icons are added.

opw-2438513

closes odoo/odoo#66608

X-original-commit: eeb6eea90b9d44a42b1cc4f6b6f6c29cc7370d26
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-22 13:49:46 +00:00
Benoit Socias 0cede3fa14 [IMP] website: display sample data for dynamic snippets
Before this commit when a dynamic snippet was fully configured but
returned no data, the rendered section remained empty in edit mode.

After this commit when a dynamic snippet is fully configured but has no
data to display, some sample data is generated in edit mode to give a
feel of how the page will look like when data will be available.

task-2446024
https://github.com/odoo/odoo/pull/65176
2021-02-16 10:17:58 +00:00
Benoit SociasandSamuel Degueldre 62b4e968c9 [FIX] website, web_editor: ensure the loader appears on click options
Before this commit the loader did not always get displayed when
switching to the options tab.

After this commit the loader always gets displayed ASAP when switching
to the options tab until the tab is ready and displayed.

task-2439295
https://github.com/odoo/odoo/pull/65223

X-original-commit: f2fa17540e130b5cf3f70570a3a97495cfbb7499
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-02-15 18:30:08 +00:00
Cocographique fe21692abe [IMP] website: set lead class font-size to match editor value
Currently, when you edit a paragraph with the lead class, the font-size
is set to x px. This value is not available in the font-size dropdown of
the editor. So no value is set as active (checked). With this change,
the lead font-size will now be 18px and match a default value from the
editor.

task-2209960

closes odoo/odoo#46902

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-15 16:23:17 +00:00
Krunal Trivedi d10b9f7164 [FIX] website: open dropdown to right position for sidebar menu template
closes odoo/odoo#66076

X-original-commit: 70f993e2209a1fd45d0ba938672295d79349febe
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-12 13:46:21 +00:00
Younn Olivier ab6f9a5b22 [FIX] website, web_editor : image gallery miniatures are not updated
Description of the task :
Make the website ui as consistent as possible by making some layout
quick wins.

Behaviour before the PR is merged :
When changing an image in the image gallery snippet, its miniature
is not updated.

Desired behaviour after PR is merged :
The miniature of an image of the image gallery is updated when the
image is changed.
The snippet options listens to the 'image_changed' event triggered
by the media widget.

task-2438556

X-original-commit: a291923a95841c8b1ff9d3bb743f3da03a80dedb
2021-02-12 12:01:13 +00:00
Samuel Degueldre 480327381a [FIX] website, web_editor: fix empty parallax snippet not being removed
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

closes odoo/odoo#65551

X-original-commit: 61f410b57f1c28bd6464b86d1582c22b7fd846d5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 15:18:36 +00:00
qsm-odoo 98d8d51100 [FIX] website_mass_mailing, *: add test for newsletter popup
*: website

This is the forward-port of a stable dependency fix, needed as it
includes a test. The dependency was properly fixed with [1].

[1]: https://github.com/odoo/odoo/commit/d4984b81e6b244297e192f2be2768ed11da170aa

closes odoo/odoo#65530

X-original-commit: 76e1495b0d5eab8fc03b6daf51dbc1c148c7de53
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-04 12:10:51 +00:00
Noe Antoine da05b282d9 [IMP] hr_timesheet, website, digest : Add new digest tips
This commits adds a few digest tips concerning the website
customization and shortcuts in timesheet. It also changes
sequence of one.

Add css selectors to include button inside the digest tips,
matching existing style: no underline, white text on odoo
purple button.

PR #63784
Task-2341722

Related: odoo/enterprise#15478
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-01 16:51:27 +00:00
fw-bot 6ce10faff3 [FIX] website, website_sale: preconfigure Dynamic Products w/ 1st option
Before this commit the Dynamic Products snippet was displaying a message
box instead of its content until its template and product category were
selected.

After this commit the Dynamic Products snippet is automatically
configured on drop with the first available template and the first
available product category. The message box only appears if no product
category exists yet. Also an "All Products" category was added as first
element of the list to make the snippet usable before categories are
defined.

task-2439295

closes odoo/odoo#65342

X-original-commit: db3ced474e44b5a8188f0d77521bfcaee2575060
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-02-01 13:58:22 +00:00
Benjamin Vray 9e01297c67 [FIX] website: fix popup height
- The modal content of the popup snippet had a maximum height of 100%
because of a global rule on modals. But, here, the scrollable element
is not the modal so we dont want this rule.

- For the popup to be scrolled correctly we also had to remove the
rule that adds a fixed 100% height on modal-dialog and we added a
min-height of 100% to correctly display the popup in the middle
position.

Part of https://github.com/odoo/odoo/pull/61998
task-2312878

X-original-commit: 9cd8c15ed22e3033c654fcfa28f76b79083dcf98
2021-01-27 17:48:22 +00:00
qsm-odoo f9479738a2 [FIX] website, *: reset header items colors to default when transparent
*: web_editor

Users can choose one of their color combination to apply on the header.
If they then choose to make the header transparent over the content for
a specific page, the color of buttons & other components in the header
should be reset to the default website color combination's colors as the
header component are now appearing over the default content.

Part of https://github.com/odoo/odoo/pull/65139

X-original-commit: 2172295cefa1d8780332709bf0c97cfa23def3a5
2021-01-27 16:07:11 +00:00
jpr-odooandSiddarth Gajjar 149cc6c2ed [IMP] website: improve countdown snippet on mobile
Before this commit, the countdown snippet was layouted vertically on
mobile devices.

After this commit, the countdown snippet is layouted vertically,
just like on desktop.

task-2349095

closes odoo/odoo#59756

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Siddarth Gajjar <sga@odoo.com>
2021-01-26 15:56:28 +00:00
Nasreddin (bon) f6e2d74a78 [FIX] website: Warning message on website if dynamic snippet category deleted
Issue

	- Install "Ecommerce" app
	- Go to 'Shop' page and edit it
	- Add a "Dynamic Products" block
	- Click on it to edit it :
	-  Select any template
	-  Select `Desks` as product category
	-  Save
	- Go to "Website -> Configuration -> eCommerce Categories"
	- Delete the "Desks" category
	- Go back to Shop page

	Error : "Record does not exist or has been deleted".

Cause

	The search domain is looking for child categories of dataset.productCategoryId
	(who does not exist anymore in the above case).
	`child_of` do a browse() to fetch the records, and therefore generate
	an error if category not found.

Solution

	Log warning message if unexptected domain and return empty records set instead.

This commit also reverts commit 0de069b8ca9fb005ba5b076984f5677de25889ee that generated the issue.

opw-2440917

closes odoo/odoo#64947

X-original-commit: e452d30f739db39a088248a3109c8c49cff9d49f
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-01-22 15:03:24 +00:00
qsm-odoo 6abcac85af [FIX] website: stop messing up countdown snippets on undo
Like any snippet creating dynamic elements on page load, we need to
use a special class on those elements to mitigate the undo/redo system's
imperfections.

closes odoo/odoo#64893

X-original-commit: 0d9a782681fcbd50ca687ae3158dc12f5b3571cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-22 10:56:49 +00:00
qsm-odoo 16656e7113 [REV] web_editor, *: remove JW empty assets
*: mass_mailing, website

The revert of Jabberwock at [1] was made reverting all the commits
that happened during and after the Jabberwock merge. This missed a
preparation commit [2] which added empty asset files a few days earlier.
This reverts that commit.

[1]: https://github.com/odoo/odoo/commit/e5572c317a7775a58675ed73efc89b5c9f6c0c39
[2]: https://github.com/odoo/odoo/commit/55f10ac9a0bb574a893e84c3ee6237e1d439750b

closes odoo/odoo#64860

Related: odoo/upgrade#2098
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-21 13:32:10 +00:00
nie 41d77e9227 [FIX] website: an erroneous Google font makes website not editable
Steps:
- Go to "Website" > "Go to Website"
- Click Edit in the top right corner
- Click Options
- Select "Add a Google Font" in the Font Family field
- Insert an erroneous Google Font link (e.g. https://fonts.google.com/specimen/Robotoj )
- Save & Reload
- Click Edit again

Bug:
The Edit button is not responding anymore

Explanation:
We try to `@import` the link in multiple files.
For example, here: https://github.com/odoo/odoo/blob/70eb39b0cf30c1acf9a7116e109874b60e27aa2c/addons/website/static/src/scss/website.scss#L10
An erroneous font family results in an error 400 from the Google Fonts
server. This prevents parts of the JS to load and makes it impossible to
enter the edition mode.

`EditPageMenu` handles the behavior when clicking on the Edit button.
This menu depends on `website.compiled_assets_wysiwyg` as seen here:
https://github.com/odoo/odoo/blob/b02a99bec709b5a6dc4dabb6cb81435dadc24e7e/addons/website/static/src/js/menu/edit.js#L10-L14
Since there is an error generating the file, the Promise fails but the
error is not handled:
https://github.com/odoo/odoo/blob/70eb39b0cf30c1acf9a7116e109874b60e27aa2c/addons/web/static/src/js/core/ajax.js#L164-L168
This commit prevents CSS loading errors from silently failing. The crash
screen will only show up if the user is logged in and has edition
rights.

This commit also prevents the user from posting the form if the font is
not accessible. At the moment, querying an unknown Google font from a
script will result in a CORS error. A valid one will pass just fine. In
case Google changes the behavior of these queries and allows the 400 to
be sent, the fix also checks if the query returned an `ok` status code.

opw:2439073

closes odoo/odoo#64824

X-original-commit: 604c07edcd4da8cf2a663d06ba91f137eb74691b
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-01-20 17:09:20 +00:00
qsm-odoo 05627e4815 [IMP] website: test a website style can properly be edited
This test at least ensures that a SCSS edition through the editor can
properly be done and indirectly tests that the assets order is correct
(in prevision of a future asset refactoring).

closes odoo/odoo#64770

X-original-commit: fe19b48831df17352ea7dbb0b7fa2497ac2da38f
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-19 18:56:42 +00:00
Benjamin Vray 0d925816f0 [FIX] website: fix a typo in the js file of the snippet popup
We were using 'onExit' instead of 'mouseExit' as the value of the
data-attribute 'display' in the .js code of the s_popup.

task-2312878

closes odoo/odoo#64751

X-original-commit: bca1a13a846b3398a70f12be259a425df140a8f7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-01-19 15:00:53 +00:00
Romain Derie ec132b530f [FIX] web_editor, website: prevent multiple click on save
Clicking on save on html editor is taking quite some time. The user might think
something is not happening and need to click again.
If he does click again, 2 write RPC will be sent, making the COW business code
being triggered twice, ultimately leading to create 2 COW.

Instead of
  A
 / \
B   B'

It will be
    A
  / | \
B   B' B'
With as many B' than there is click on save.

This commit adds a generic helper to make a button load/spin.

closes odoo/odoo#64366

X-original-commit: 80592abda266ef3f9f463854c3101eb3f728087b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-01-11 18:41:32 +00:00
nie 6d64212f08 [FIX] website: dynamic snippet products overflows on mobile
Steps:
- Install eCommerce
- Go to "Website" > "Go to Website"
- Click Edit
- Add the Dynamic Products block with a template and a category
- Save
- Switch to mobile view

Bug:
The right arrow of the block overflows and makes it possible to scroll
the entire view sideways.

Explanation:
This commit puts back prev and next arrows onto the carousel. It also
changes their design to be more visible over the content. The arrows are
now smaller and displayed in clickable gray circles.

opw:2415187

closes odoo/odoo#64274

X-original-commit: a5d7a1a6f3cf82610802ad84a9ae1baaa3f58e15
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-01-08 15:36:35 +00:00
Nasreddin (bon) 5a23a935fe [FIX] website,website_sale: Dynamic products isn't visible if category deleted
Issue

	- Install "Ecommerce" app
	- Go to 'Shop' page and edit it
	- Add a "Dynamic Products" block
	- Click on it to edit it :
	-  Select any template
	-  Select `Desks` as product category
	-  Save
	- Go to "Website -> Configuration -> eCommerce Categories"
	- Delete the "Desks" category
	- Go back to Shop page

	Error : "Record does not exist or has been deleted".

Cause

	The search domain is looking for child categories of dataset.productCategoryId
	(who does not exist anymore in the above case).
	`child_of` do a browse() to fetch the records, and therefore generate
	an error if category not found.

Solution

	Check if dataset.productCategoryId exist before updating domain.

opw-2416231

closes odoo/odoo#64157

X-original-commit: 0de069b8ca9fb005ba5b076984f5677de25889ee
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-01-06 14:16:13 +00:00