website{_*}: website, website_blog, website_event, website_forum,
website_sale, website_slides
Since the generic search bar was introduced in [1] all text fields were
truncated in search results.
This caused problems for long URLs which were truncated as well, and
therefore could become invalid.
After this commit URL fields specify `'truncate': False` in their search
detail metadata, which informs the rendering to skip the text truncation
step for that field.
Also added previously missing controller-level tests of the
autocompletion.
Steps to reproduce:
- start odoo with website_forum and demo data
- go to the Help forum
- search for "configure" in the Help forum
- click on the auto-complete suggestion
- => redirected to a 404 page because the URL was shortened
To test the fix on other models, use a long enough name that causes the
problem. E.g.: "This product has such a long name its URL would have
been truncated without the fix contained in this branch".
Note that the problem did not occur on blogs because the URL does not
contain the name, but the same fix was applied for consistency.
[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986
task-2727788
closesodoo/odoo#82621
X-original-commit: 045f741be35e62f5e3a636490c6c1d475b5d78eb
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Use theme_default instead of theme_common.
Instead, theme_common is not available when only website is installed as it
depends of the design-themes repository.
closesodoo/odoo#82587
X-original-commit: a10522c6509caf7f09f21e6da3224d5865f0ba6a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The record is read directly in sudo, the prefetch is in the sudo
environment. When reading the other information there is no longer any
need to make a request.
closesodoo/odoo#82475
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This restores a (basic) feature that was lost in 15.0 by mistake.
Allow the user to set a link on an image. The user can access this link
tool in the editor panel or via the CTRL+K shortcut. This tool is very
similar to the existing link tool for texts. This tool uses the
suggestion system already existing on the text link tool.
task-2666467
closesodoo/odoo#82512
X-original-commit: bfcd25c5d66765b7436114dba3316ac7331a4d97
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
First step to stream QWeb templates: removing the two post
processing operations applied on rendered templates. This
should slightly speed up the rendering of every page.
1/ Don't remove empty lines after rendering, but fix the root
cause of: view inheritancies and QWeb compilation that don't
add extra empty lines.
2/ handle page break in the two reports that uses it, rather
than processing every view produced.
closesodoo/odoo#82244
Related: odoo/enterprise#23328
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Header of XML files should not be translated.
Before this commit, some users may translate the XML header and get
invalid XML if translating words like "encoding"
Fixesodoo/odoo#82155closesodoo/odoo#82439
X-original-commit: aaac6fc04f4e5aa4c9ad68d9e844f3e786044800
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
A mega-tour was introduced with [1] to test every single snippet.
This tour, despite being very useful as it tests the core behavior of the
website builder, is creating a lot of race conditions.
This commit should prevent one of those race condition:
When the step was removing the snippet, it was then clicking on the "Blocks"
tab to get ready to drag and drop the next snippet.
The issue was that in some cases, it would click on the "Blocks" tab before the
snippet removal process was fully done.
Basically, when the race condition happened, it was the same as doing:
```
$('we-button.oe_snippet_remove:first').click();
$('.o_we_add_snippet_btn').click();
```
which, when done in the browser console, will result in the same visual than
the screenshots on the failing runbot builds.
[1]: https://github.com/odoo/odoo/commit/460d5ecb926c13a79ba363f8f86442433d91bf6f
task-2726529
closesodoo/odoo#82214
X-original-commit: 49c7bd39826b428430c08c5faedca51dde9e2359
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
A mega-tour was introduced with [1] to test every single snippet.
This tour, despite being very useful as it tests the core behavior of the
website builder, is creating a lot of race conditions.
This commit won't fix anything but will actually reduce the tour length,
hopefully also reducing the amount of race condition while those are fixed.
Indeed, some snippets were tested multiple times, as a snippet might include
another snippet in its DOM, the xpath query would return multiple times the
same snippet.
Duplicates: s_card (5), s_banner (2), s_donation_button (2),
s_dynamic_snippet_products (2), s_newsletter_subscribe_form (3),
s_searchbar_input (2), s_text_block (3), s_hr (2).
[1]: https://github.com/odoo/odoo/commit/460d5ecb926c13a79ba363f8f86442433d91bf6f
task-2726529
X-original-commit: 6f6ace0f0b09f6ad8b497f89e331e43a18e00471
Part-of: odoo/odoo#82214
Steps to reproduce:
- Install `website_hr_recruiment` module
- Go to `your_website.com/jobs`
- Activate Edit mode and add a "3 Columns" block
- Select one of the columns and set the shadow to `None`
Issue:
Shadow is not removed, and by default the "outset" mode is selected.
Cause:
When we check the state of the shadow with `css('box-shadow')`, it
will always be set because a custom css 'box-shadow' is set by the
module website_hr_recruitment on card element, and therefore the value
will always be either 'inset' or 'outset'.
Solution:
If widget value is set to '', replace `box-shadow` style to 'none'
(only if needed) so it will override the style from css file.
opw-2701512
X-original-commit: 212d8ec10bb48e8fd7de3d3ff7660447b968c62a
Part-of: odoo/odoo#81980
Co-authored-by: qsm-odoo <qsm@odoo.com>
Before this commit, if a theme record (eg `theme.ir.ui.view`) was deleted,
its copy_ids would not be.
While this is perfectly normal and wanted behavior when this is done in a
website context (to not alter other websites), it shouldn't be the case when
performing a theme update through CLI/Migration (or if the user find a way to
update the module through the UI).
Fixes https://github.com/odoo/upgrade/pull/3048
task-2593407
opw-2680866
opw-2685951
opw-2685124
opw-2679040
closesodoo/odoo#81953
X-original-commit: 3146dd72e6cb07d6e78ca763325f13dd54de0086
Related: odoo/design-themes#548
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Some theme are enabling an header template. When doing so, they also disable
the default header template.
But this is not enough, as the user could have changed that template and it is
not the default one anymore.
Then, updating that theme (UX, CLI, Migration) will raise a traceback.
Step to reproduce:
- Create a website and install theme avantgarde
- Enter edit mode and select Magazine header template
At that point, update the theme, either:
- Through the UI, on theme switch screen, click on Update
- Through CLI, just run a `-u theme_avantgarde`
-> A traceback will be raised about an xpath error, as both the magazine header
template and the hamburger header template are active at the same time. Only
one template is supposed to be activated.
The issue also impact migration, as migrated website can't be accessed due to
the xpath error on rendering.
Theme being impacted (at least): Avantgarde, Graphene & Nano
Note that when installing one of those themes for the first time on a website,
the error won't occur as `_reset_default_config()` will be called through
`_theme_remove()`.
Note that this fix will ensure the correct template is set (and all others are
disabled), but the scss variable won't be correctly set (as it would be if that
template change was done through the right panel).
This is not that much of a problem (considering what it solves), any later
change from the user through the right panel will solve that mismatch.
Fixes https://github.com/odoo/upgrade/pull/3048
task-2593407
opw-2680866
opw-2685951
opw-2685124
opw-2679040
X-original-commit: f18cd32a936829d8a059db0d259189503ee5317f
Part-of: odoo/odoo#81953
This PR allows the user to put a transparency effect on the mega menu.
The transparency effect did not work on the mega menu because
the container that contains the mega menu did not have transparency.
Note that the mega menu templates use a default background color
since [1] to not be transparent by default because of this commit.
[1]: 967d21a
task-2623335
closesodoo/odoo#77871
Related: odoo/upgrade#2929
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Those were not accounted for, leading to fstrings passing through
unflagged.
Also update the SQL checker to be stricter but smarter:
The previous version would "fail open", unknown nodes would be allowed
through hence f-strings not being flagged when they started appearing
in arg0 position, should now fail-closed, anything that's not allowed
is forbidden.
This flags a few more cases, all of which seem acceptable upon review.
However the previous version would also only resolve arg0 (in case it
had a `NAME`, to see if that resolved to an acceptable form of
query-building). The new version performs resolution during
`_check_concatenation` and should thus allow e.g. format strings to be
separate variables (though not e.g. module-level constants, yet
anyway).
In resolution, replace the ad-hoc process by astroid's built-in
`lookup` which seems to provide the same information. Slightly more in
fact, as it yields every assignment in case of e.g. conditionals, but
making use of that would require a lot more changes in the checker so
leaving the behaviour as-is for now.
It's important to *not* use `ilookup` here, because ilookup is not
"iterable" but "inferring", and we don't want values, we want
expression ASTs for analysis.
NOTE: previous improvements as well as fixes to existing code were
only implemented in 14.0, hence this being merged in 14.0 not 13.0
despite 13.0 still being supported.
closesodoo/odoo#81721
X-original-commit: 376ccf0944dae1bc53ae9c5385977c4e6b23e083
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Refactor the whole sale price computation logic in `product` & `sale` to improve code quality, maintainability, ...
### Drop/reduce as much as possible context-based logic
* Drop magic `price` and `pricelist_id` fields on `product.product`/`product.template`
* Keep one unique `_get_contextual_price()` to provide the old logic where it's still needed/difficult to remove atm.
* Do not rely on context fallbacks on the lower level of price computation (aka `price_compute` method)
It is way too dangerous to have such magic fallbacks so deeply in the logic, inducing potentially unexpected/wrong results
### Clean `product.pricelist` API
* Clear parameters and fallbacks
* Do not provide unused parameter(s) anymore (`partner`)
* Stop providing products & quantities as a list of tuples, it was never used with different quantities in the existing code anyway
* Removed unused methods
* Split methods logic to ease and allow clean overrides and customizations
* Convert the old hardcoded SQL query to a clear domain, using ORM querying and formatting logic instead
* Improved documentation (docstrings, ...)
### Side cleanups in related/impacted modules
* Update to use the new clean pricelist API
* Code cleanup in sale prices computation (`sale_*`, `website_sale`, ...)
* Some onchanges -> computes conversion in `sale_*` scope
* Cache applied pricelist rule on SOL (avoid recomputing the pricelist rule in the price AND in the discount computation)
Task ID - 2688106
Community PR: https://github.com/odoo/odoo/pull/79605
Enterprise PR: https://github.com/odoo/enterprise/pull/22211
<!-- Keep both authorship for the merge commit (author=robodoo) -->
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#79605
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Before this commit, the "ripple effect" no longer worked because the
assets were never activated for the following reason:
- To activate the ripple effect assets via the editor options, we
activated a template that no longer exists (with
data-customize-website-views). Instead of activating the assets with the
new system of assets using records.
After this commit, a new "data-customize-website-assets" xml attribute
was created so that the assets can enable/disable in the same way as the
views. The "write" method for ir.asset has also been overridden in
website so that each website has its specific assets (via COW).
task-2686370
closesodoo/odoo#81833
X-original-commit: 9f56357cc1f4a7b8606ef4d5fd431fc396bdf1e8
Related: odoo/design-themes#546
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose
=======
The fields are not used, don't work correctly and there is a specific
report to generate the product prices according to the pricelist and
the ordered quantities
Before this commit the cover dataset was only updated during updateUI()
but if the cover was saved before closing the color palette after
selecting a solid color, the selected color was not confirmed and the
saved cover dataset was based on the previously selected color.
After this commit the cover dataset is updated whenever an option is
selected to handle the specific "save before close color palette" case.
task-2678100
closesodoo/odoo#81835
X-original-commit: ad59cbd33e0eaf5c7c77f9e5c0b0435917e2c155
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Commit [1] did adapt the selection of savable to include cover
properties detected through `[data-name="Cover"]`, but [2] did rename
the blog cover option block from `Cover` to `Blog Post Cover` therefore
it did not get detected. Because of this, only changing attributes on
the root element of the blog post cover was not marking it dirty, and
therefore not saving it unless other changes also happened (e.g. change
the picture)
Given that the name might even be translated, this commit does not use
the value of `data-name` anymore but relies on either the `s_cover` or
the `o_record_cover_container` class.
[1] https://github.com/odoo/odoo/commit/fc67a3370ab04facff28dd956590e4dfa71f8441
[2] https://github.com/odoo/odoo/commit/27e4f8a3e164cad6814cc8d77e4f46515eab5fb4
task-2678100
X-original-commit: 1a37f57e5cbc9a5557efe3ae281790fadc6498ff
Part-of: odoo/odoo#81835
Before this commit, the ripple effect did not work when a button was not
in the same location/size when clicked compared to its position/size
when the page was loaded. (e.g. after scrolling the page)
task-2686370
closesodoo/odoo#81756
X-original-commit: 95728886ef3abd4e5809a5749c803c312b9267b8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, in some cases the submit button of the form snippet
never stopped loading after being clicked (e.g. redirect to an anchor in
the same page).
Now, the form and the button loading effect are reset at the same time
at the appropriate time depending on the post-send action:
- Redirect to another page: never (we leave the form values and the
button loading effect for the whole redirection duration)
- Redirect to an anchor on the same page: after the scroll animation
- Show a custom HTML message: never (this type of post-send action is
meant to hide the form after that message is shown, there is no need
to restore it to its initial state)
- "Nothing" (= small message next to send button): once the data is sent
In the last two cases, a 400ms delay was also added before showing the
message so that the send flickers less and seems more smooth. In the
last case, it also prevents to double click and double send the form.
Related to task-2172312
closesodoo/odoo#81703
X-original-commit: 42f6887bb4406d4aa636040c8325e8ecab202778
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, when the redirection of a form was an anchor and
that anchor link came from the anchor option, the scroll animation was
not triggered.
task-2172312
closesodoo/odoo#81622
X-original-commit: 5db838cfc91d8438d6234df00bd8174768445974
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Prior to this commit, the color presets generated by the color palette
would always be visible by the user which could lead to confusion.
Most users would click on the presets and edit them instead of editing
the color palette.
This commit groups the presets into a collapsed section under the color
palette to incentivize the user to click on the color bubbles instead.
task-2687469
closesodoo/odoo#79921
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When inserting a new paragraph by pressing 'enter', it would
automatically close the mega menu.
As inserting a new paragraph triggers a historyRevert at the editor
level, it was leading to two issues:
- The widgets of the public root were stopped then restarted. The
StandardAffixedHeader (the public widget for the header), as an
Animation, would start its effects when started, which would close its
dropdowns. This commit changes the _updateHeaderOnScroll method to close
opened menus and dropdowns only when the animation has scrolled.
- Opening the dropdown was a recorded step. When history was reverted,
it would close it. Now toggling the mega menu is done with the editor
observer unactive.
task-2668908
closesodoo/odoo#81559
X-original-commit: 675430d53f6ef048b77afe95395bd760d3f5a2be
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
[1] changed the structure to adapt it to the new dropdown menus. This
commit changes the css according to these changes so that mega menus are
correctly displayed inside the extra menu items dropdown from the auto
hide menu.
[1]: 29b9280c44534d2f210dbcea83e0049365949f48
task-2668908
X-original-commit: fdd06d70fa78098cbfe0bd5200acd2fa171f4576
Part-of: odoo/odoo#81559
This commit adds the possibility to modify some background colors of the
mega menus so that the templates are fully editable.
Some of these templates have a column with an extended background, using
the :before css pseudo element.
As this is not a DOM element, it cannot be changed from javascript.
It was decided that using shapes would not produce the same effect as
the designer intended, and that it would be too confusing for the user
to be provided with an option allowing to extend the background of a
column.
Therefore, these specific s_mega_menu_gray_area elements must have their
background hardcoded.
task-2668908
X-original-commit: f01c74118ad4c772fb18866956ab9fb214f781fa
Part-of: odoo/odoo#81559
Co-authored-by: qsm-odoo <qsm@odoo.com>
When editing a countdown with a redirect action, sometimes the
countdown block will be hidden when toggling the "Hide countdown at the
end" option.
The problem is caused by the button that allows previewing
and editing the end message of the countdown, this button does not
apply in the case of a redirect action though. However, the button can
still be activated by selecting a different end action first and
switching to the redirect action afterwards, in which case it will
incorrectly hide the countdown.
task-2638366
closesodoo/odoo#81557
X-original-commit: 7f6ebee33e8a82d7ccdf155c3a543898b187389c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The countdown snippet has an end action that can be configured to show a
message when the countdown reaches zero. A button in the editor toggles
a preview of this message. However, a bug currently makes the preview
disappear whenever the snippet's widget is restarted... which occurs by
simply hovering some other options.
To solve the problem, the preview visibility is now controlled by a
separate css class s_countdown_enable_preview overriding d-none. This
way, the preview visibility no longer interacts with the widget's logic
and is no longer affected by the widget restarting.
task-2638366
X-original-commit: c37354d457f5b868673b4f974e401f4c635062d2
Part-of: odoo/odoo#81557
Co-authored-by: qsm-odoo <qsm@odoo.com>
When double clicking a number in the numbers snippet, then typing a new
number, the number line would be merge with the text underneath. This
prevents that by adding a line break in between so they aren't
considered the same line by the editor (an inline with a block as
sibling is a tricky case for edition).
task-2711644
closesodoo/odoo#81551
X-original-commit: 886af1f328a9f1664b0d3e204bf984bfee28b215
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
The http.addons_manifest is a map {module: manifest_dict} that is
populated upon the first http request. This map is basically a module
manifest cache with an extra `addons_path` key, the path of the module
on the file-system. This cache is eagerly populated upon the first http
request, the map is empty in non-http contextes (e.g. cron) which have
been a source of bugs (e.g. 50c8eb1).
A manifest cache is necessary because reading and parsing python files
from the file-system is not that cheap but there is no reason that cache
is located in `odoo.http`. A thin cache layer now wraps
`load_information_from_description_file()`/`load_manifest()` and is
lazily populated.
The `http.addons_manifest` have been removed. The extra `addons_path`
key is now present in the "normal" manifest. The `read_manifest()` was
hardly used so it has been deprecated. The only way to retrieve a
manifest is now `load_information_from_description_file()` which was
renamed `load_manifest()` (no cache) and `get_manifest()` (cache).
Side note about performances, the cache is necessary. Addons manifest
are read-only and reading + parsing python files from the file system is
not a cheap operation. Running the e-commerce tour
`@website_sale.test_04_admin_website_sale_tour` without cache on
`load_manifest()` requires 68,29 secs to complete on my laptop,
exceeding the default 1-minute time frame allowed in tests. Using a
cache the time is down to 36,53 secs. The performance impact is huge.
Part-of: odoo/odoo#79977
Before this commit, the EditMenuDialog was closed before reloading the
page. [1] introduced a new test on this dialog using a workaround to go
to the next step when saving, after the page was reloaded. This
workaround used an unreliable event 'unload', which was inconsistent.
To avoid using that event, the edit menu dialog is not closed after
saving. A new parameter closeOnSave is added to the wysiwyg Dialog,
which allows to keep the dialog open until the reload is done.
task-2513588
[1]: 725cad3478e5ab12ad7f0cf5166a2b968a1373da
closesodoo/odoo#81351
X-original-commit: d35125cc0444679488fa1a020b6bd8a6c4409b6f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, editing a menu item after clicking on the "edit
menu" button of the link popover, in edit mode, would not save the
change.
This was caused by the "Double-click to edit" tooltip that is shown over
media and links. Triggering the bootstrap tooltip on a target leads to
attribute mutations (data-original-title, title and aria-describedby),
that were processed by the EditPageMenu observer to set a view as
o_dirty.
The website.menu was therefore saved a first time by the edit menu
dialog with the correct value, and a second time with the outdated label
from the page.
To solve that, the observer is deactivated when showing the
"Double-click to edit" tooltip over a link or a media, so that the
website.menu is updated only once, when saving the edit menu dialog.
task-2513588
X-original-commit: 4244b60f36acbdbdc17c24d45144604d1276c15f
Part-of: odoo/odoo#81351
There was an issue when saving the LinkDialog with invalid data.
The _DialogLinkWidget.save methods return values were not consistent.
Also, tests are added for the regular menus edition.
The existing mega menu edition test was not played from the python test
suite.
task-2513588
X-original-commit: 725cad3478e5ab12ad7f0cf5166a2b968a1373da
Part-of: odoo/odoo#81351
Co-authored-by: Arthur Detroux (ard) <ard@odoo.com>
When changing the label of a navbar menu via the link popover "edit
link" button and the menu edition dialog, the label would not be changed
after saving.
Reloading the page would display the updated label.
While the RPC was correctly made to update the website.menu, the editor
would apply a historyRevert after the DOM update to change the menu
label on the page. This change should not be recorded by the editor as a
RPC to update the website.menu is executed at the same time.
task-2513588
X-original-commit: 71ac6244037608cf529586b43946f992b723e7db
Part-of: odoo/odoo#81351
In Safari (14+) the CSS workaround to make block "readable" over any bg
is broken. By replacing the current CSS workaround by an appropriate
SVG filter in each themes svg, the problem will be fixed.
This commit will remove the CSS workaround.
task-2667028
closesodoo/odoo#81190
X-original-commit: 6b17497f4e29394a704646b287f0d9c8c9839768
Related: odoo/design-themes#538
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit when covers were edited from their list view (e.g.
changing their background color from the blog posts list or from the
events list), the resize class was lost.
After this commit the resize class is kept from its previously saved
value if it is not a parameter during edition.
Related to task-2359250 and task-2678100
closesodoo/odoo#81349
X-original-commit: 4e5aa57913c4270d0e9de6e7318eb5d25daaddf4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
* = website_livechat
Before this commit, some elements (e.g. sidebar, livechat button) were
not correctly positioned in edit mode or/and full screen mode.
task-2677132
X-original-commit: 42db4d432d39a8db87c66cd682064ab76fd0aa27
Part-of: odoo/odoo#81151
Before this commit, the magazine header template was broken in several
cases. The menu links were not aligned correctly according to the
options chosen and the "off canva" menu was not correctly positioned in
edit mode.
task-2677132
X-original-commit: 8f15f96826c783a99e4021ca2a0b55f01f7a343f
Part-of: odoo/odoo#81151
Before this commit, changing a filter in the dynamic snippet could
cause errors because the option wasn't awaiting an asynchronous
call.
This commit fixes that by using the same mechanism used in the
s_website_form snippet, relegating the rerenderXML call to updateUI
task-2654924
closesodoo/odoo#80867
X-original-commit: 8a4391a7d6e6988da7b62f6caa91e49c831da774
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Prior to this commit, when using a ir.filter on a dynamic snippet,
the filter would not use the product context defined in itself.
This would cause unexpected behaviour like ignoring
the 'display_default_code: False' in the website_sale ir.filter.
This commit adds context to database record lookups.
task-2654924
X-original-commit: d10d406739239e8d8fc240b2c6b2596b1ee6e610
Part-of: odoo/odoo#80867
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
closesodoo/odoo#80763
X-original-commit: c29fe9fa8fc8ff4a5e6f042607ef9b3070d1d339
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#80564
X-original-commit: 126ccaecb876c17dd6b7e34aef4aa4927d13b8f7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit redesigns the toggle switch in website to make it clearer
and prettier.
task-2586313
closesodoo/odoo#77392
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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