Since commit [1], the custom filter for website was disabled.
This commit restores the filter and adapts it for "Milk" redesign.
Steps to reproduce:
* Open the Website app
* Select the menu "Site" -> "Pages"
* Open the "Dropdown" in the SearchBar
=> Bug there is no filter for website
[1]: odoo/odoo@caef16ee4eclosesodoo/odoo#124042
X-original-commit: 9237ca777fb9c5e9bda03c2d0dbe0deed8e1b2e5
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
The translation of input "default values" is allowed only when
`type="text"`. However, email field values are translatable because of
strange behaviour:
- Go to website (Edit mode) > Add a form block.
- Select the existing email field > Change label position > The input
is transformed into a `type="text"`.
Each time a "non-custom" field is re-rendered, The `_getActiveField()`
method is obtaining field related data from the database, including its
type, which changes it back to the original value ("char").
The goal of this commit is to fix this behaviour using `_getFieldType()`
to set the right field type instead of the default one.
task-3247520
closesodoo/odoo#123819
X-original-commit: caf6183c2a46ee1843b4df902fe0a96dfe3740d0
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
When generating a new page key, it was only made sure to not match
existing page keys. This leads to COW happening on existing views if the
key already existed in a view.
This commit ensures that new page keys are not existing view keys
either.
Steps to reproduce:
- Create a page named "snippets".
=> Notification was shown indicating that `website.snippets` is private.
task-3328827
closesodoo/odoo#123693
X-original-commit: e7ef9f0bfc59a468c9f883561c371367cc06c1b7
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
When the name given when creating a new page starts with a slash, the
werkzeug route `/website/add/<path:path>` cannot be matched. This leads
to wrong navigation situations.
This commit removes any leading slash from the entered page name.
Steps to reproduce:
- Create a page.
- Enter "/abc" as name.
=> A 404 error page was reached.
task-3328827
X-original-commit: 7ff29b680d8552f0b4a440b3209a6a37357af21e
Part-of: odoo/odoo#123693
The build does not break if the `with_context(active_test=False)` is
removed from `ir.asset`'s `_get_related_assets`. This access to inactive
assets is actually needed to be able to disable assets on a specific
website, similarly to what is done for `ir.ui.view`.
This commit adds a test to ensures that this feature is not accidentally
lost.
task-3326887
closesodoo/odoo#123662
X-original-commit: fced70f840c98e29675ff41812e76c1883d1d57f
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
When leaving the `website` application, the HTML/CSS editor keeps its
open/closed state. Because of this, when returning to the website
preview, the HTML/CSS editor is being mounted immediately if it was
left opened when leaving the `website` application.
This commit closes the HTML/CSS editor upon leaving the website
preview, or navigating to another page.
Steps to reproduce:
- Open HTML/CSS editor.
- Go to the Discuss application.
- Go to the Website application.
=> Error dialog was displayed.
task-3302981
closesodoo/odoo#123661
X-original-commit: 45fd54f15689e2a749666059f9d2b99aa80f6c88
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Commit [1] introduced an cleaning of the iframefallback on page unload,
which was removing the `autoplay` attribute of the iframe `src` URL.
It was done to prevent video/music to keep playing in the invisible
iframe.
The fix was not generic and purposely targetted the elements which we
identified as problematic.
Commit [2] then made that cleaning generic, catching all iframe.
Doing so, it was actually catching too many iframes and led to traceback
on iframe not having a set `src`.
This is the case for every database having a configured reCaptcha, among
other things.
For reCaptcha, it's because it's adding the following iframe dynamically
through their third party script:
`<iframe style="display: none;"></iframe>`
This commit ensures we only target iframe having an URL attribute being
set to something.
Step to reproduce (with reCaptcha):
- Enable and configure reCaptcha
- Go to /contactus
- Leave the iframe page, eg click on "Contactus" menu to refresh it
-> Traceback
[1]: https://github.com/odoo/odoo/commit/ad78585cd514f5ff16647572d34937c18a112529
[2]: https://github.com/odoo/odoo/commit/6be8af36726d750065972e122e8f4a0aa0f56a17
opw-3343450
closesodoo/odoo#123621
X-original-commit: 463d4ee0c8000f948463772b7c96c8d111bcbc8e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Underscore.js has been removed from legacy qweb engine
and from web manifest.py
range and uniqueId functions has been added to qweb
engine to replace usages of them in xml templates.
Underscore usages has been remove from xml templates.
taskId : 3246238
closesodoo/odoo#123018
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Postgfresql functions can only take a max of 100 arguments by default,
when using 'jsonb_build_object' to update translations in jsonb menus
each lang adds 2 args as key value pairs. The languages should be added
in batches of 50.
closesodoo/odoo#123562
X-original-commit: 7dfbbcf91baf796174b171e46c182b8eeb2423a9
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
This PR refactors the public livechat in order for it to use
owl and to rely on the discuss components as much as possible.
task-2212347
closesodoo/odoo#122834
Related: odoo/enterprise#41636
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When you create a new website, the contactus page have default action
("Send an Email"). For each action, there are mandatory fields that
cannot be deleted by the user. Unfortunately, the template for the
`/contactus` form didn't have the right fields marked as mandatory.
This led to the following bug:
- Go to `/contactus`
- Edit the page
=> The Email and Subject fields can be deleted. However, when you drop a
form and set the action to "Send an Email", these fields are mandatory
and cannot be deleted. This commit fixes this bug by ensuring that these
fields are marked as mandatory on `/contactus`.
task-3302433
closesodoo/odoo#123360
X-original-commit: 09a9cff6af44157c760c4f3d95d478f10d5c2411
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
While creating redirects/rewrite if the user does not enter any url in the
'Url to' field of the website module under 'Configuartion/Redirects' then during
redirection, the error 'NotFound: 404 Not Found: The requested URL was not
found on the server' will be produced.
Applying this commit will solve the issue.
sentry-4206504892
closesodoo/odoo#123391
X-original-commit: 14a850976711431f36b7f889ea9cf31b1114513d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Saurabh Mishra (sami) <sami@odoo.com>
Since [this commit] which allows to have mega menu with transparency,
the user can see the color of the block which is positioned at the very
top of the page (behind the mega menu when it is open). Before that,
the gap was always gray.
Steps to reproduce the bug
- Have a mega menu on your site
- Put a block on top of the page
- Put a red background color on this block
=> When you open the mega menu, you can see the red color between the
mega menu and the navbar.
[this commit]: https://github.com/odoo/odoo/commit/147f99bb04f83943aaedbacb1844234288e60eaf
task-3327094
closesodoo/odoo#123312
X-original-commit: dba1dac5d0b09e999e194debcb5907affca61bd7
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
Before this commit, when a snippet section was hidden on mobile devices
and its height was then set to 50% or 100%, the visibility classes
remained as "d-lg-block" instead of "d-lg-flex". This inconsistency
resulted in the content not being vertically centered until the "hidden
on mobile" toggle was turned off and then back on.
Steps to reproduce the bug:
- In edit mode, drag and drop a "Text" snippet onto the page.
- Click on the "Mobile visibility" option button to hide the snippet on
mobile devices.
- Click on the "50%" button in the "Height" option of the snippet.
- Bug: The content within the "Text" snippet is not vertically centered.
This commit fixes the issue by properly updating the CSS class set by
the mobile visibility option when the "height" option is enabled.
task-3224575
closesodoo/odoo#123135
X-original-commit: 0377b035eff80baec3f78ea984e12ad1422dbf7a
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
Steps to reproduce:
- Install industry_fsm_report, website
- Create Project P, add column/stage PC.
- Edit stage, Email Template = Task: Intervention Schduled.
- Edit the template > Advanced Settings > Optional report to print and
attach = Worksheet Report (PDF). Save everything.
- Go to website, "contact us" page > Edit the form, Action = Create a
task, Project = P > Save
Issue:
When you first submit the form, it will fail, but the task will be
created and visible in project P. By instinct, the user will submit the
form again, so the task will be duplicated. The second form submit will
return a success message.
When submitting a form, we first generate a savepoint (added in
commit [1]).
Since this is the first interaction with the report system, during the
handling of the form, the assetsbundle will be generated (see keyword
'commit_assetsbundle'), which will cause a commit.
Finally, assuming no other error is raised, we try to delete the
savepoint.
However, since a commit was executed, then the savepoint will no longer
exist, which will cause an error status to be returned.
Solution:
When submitting a form, pass `commit_assetsbundle=False` to the record
creation, which prevents the commit from happening.
This solution has a downside; creating the record also sends an email
and the report attached to that email will have broken styling. This is
still an improvement to the current behaviour, which doesn't send the
first email at all.
[1]: https://github.com/odoo-dev/odoo/commit/5a499ecf113f08c11d2b33b47680dd00ec1b297b
opw-3183912
closesodoo/odoo#123198
X-original-commit: 26031c452a7d92f35270cb04a4f37b26ff6bcc99
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
*website
Steps to reproduce the bug:
- Add a Cover and a Picture snippet on the website.
- Change their visibility to "Conditionally".
- Change the order of the two snippets on the page either with the drag
and drop tool or with the "move up" or "move down" option.
=> Their order on the "Invisible Elements" panel has not been updated.
The problem is fixed by calling `_updateInvisibleDOM()` at the end of
`moveSnippet()` and `_onSnippetDragAndDropStop()`. Note that before this
commit, all the snippets with a conditional visibility were hidden at
the call of `_onSnippetDragAndDropStop()`. This is due to the call of
`cleanForSave()` from `_destroyEditors()`. `_onSnippetDragAndDropStop()`
has been adapted in order to, as for the "move" option, do not change
the visibility of those elements.
task-3203914
closesodoo/odoo#123027
X-original-commit: 3a023cf00812cfbbef7f3b406fbd01b74f07b7c8
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
*web_editor, website
Steps to reproduce the bug:
- Add a Text-Image snippet.
- Change its visibility to "Conditionally".
- Save.
- Edit again.
=> The eye icon indicates that the snippet is not visible but the
snippet is displayed.
Note that [1] introduced a mechanism to solve this problem (the
`cleanForSave()` of the `ConditionalVisibility` option) but the code was
not working correctly since [2].
Let's first remember that when calling `toggleTargetVisibility()`, two
main actions are performed:
- The addition or suppression of the `data-invisible` attribute from the
dataset of an invisible element. This attribute is responsible for the
crossed or not of the eye icon in the "Invisible Elements" panel.
- The call to `onTargetHide()` or `onTargetShow()` that performs among
other things the addition or the suppression of the
`o_conditional_hidden` class on an invisible element. This class is
responsible for the visibility of the element on the page in edit mode.
This being said, here is what happened at the "Save" before this commit:
- `cleanForSave()` of `snippetEditor` is called. If the related element
has the `o_snippet_invisible` class, `toggleTargetVisibility(false)` is
called (meaning that the `o_conditional_hidden` class and the
`data-invisible` attribute are added to the element).
- `cleanForSave()` of the `ConditionalVisibility` option is called and
before [2], the `data-invisible` attribute was removed from the
corresponding element.
- At the `DOMContentLoaded`, the `o_conditional_hidden` class is removed
from all the elements that have a conditional visibility. The visibility
of those elements on the page now depends on the rule set by the user.
The goal of this commit is to restore the mechansim of the remove of the
`data-invisible` attribute from the conditionnal elements at the
`cleanForSave()`.
[1]: https://github.com/odoo/odoo/commit/1c442782f887a8c16bae05a43fae13a310ac05df
[2]: https://github.com/odoo/odoo/commit/de3c29fab2bc5349da8a9418f9d0086d76e6f7de
task-3203914
X-original-commit: b10d6cbf78235acd170716d556578227cccfbc14
Part-of: odoo/odoo#123027
Before this commit, the columns in the "contact" footer template were
aligned at the bottom, which looked bad and served no purpose.
This commit aligns the columns towards the top, like the other footer
templates.
Steps to reproduce the bug:
- Choose the "contact" footer for the homepage of a website.
- Add multiple lines in one of the columns of the footer.
- The columns are aligned at the bottom, and it looks quite ugly.
task-3321445
task-3241256
closesodoo/odoo#122274
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Before [1], chat windows were not shown on the website preview.
Showing them was not intended and those chat windows overlap
with the one of the livechat.
This PR restores the previous behavior by preventing chat
windows to be shown on the website.
[1]: odoo#110188
closesodoo/odoo#123096
X-original-commit: 3e74f5c1f4ea045725edcd945276e524529ffd97
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Steps to reproduce the bug:
- Drop the "Form" snippet on the website.
- Add a new field.
- Replace the field label by two quotation marks (`""`).
=> Traceback appears.
Since [1], it is possible for the user to create forms whose fields can
have a conditional visibility, meaning that the field is only visible if
another field in the form meets certain conditions. Due to that, there
is a mechanism that verifies if a condition on a field should be updated
when the user modifies the label of a field. To do so, a `querySelector`
is searching for an element that has a `data-visibility-dependency` set
to the previous field name by doing a querySelector of type
`querySelectorAll('.s_website_form_field[data-visibility-dependency="${previousInputName}"]')`.
Because `previousInputName` is set to `"`, it is not considered as a
character and an error is thrown.
To resolve this problem, strings that are stored in `name`, `data-name`
and `data-visibility-dependency` are encoded: All the occurrences of `"`
are replaced by `"`, all the occurrences of `'` are replaced by
`'` and all the occurrences of ``` ` ``` are replaced by `‘`.
[1]: https://github.com/odoo/odoo/commit/2dcbfecf3c10687a2cd3af36335d5be70c904fce
opw-3246341
closesodoo/odoo#122782
X-original-commit: ccaf4f1e52f10308ef507059316732c02ad6e6e4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: loco-odoo <loco@odoo.com>
The goal of this commit is to be able to use the `addCustomField`
function with a `type` argument that is different of `checkbox`,
`radio` or `select`.
opw-3246341
X-original-commit: 34b3770ad1ee9c872acaf4f82ac3c6cf52d5d333
Part-of: odoo/odoo#122782
Steps to reproduce the bug :
- Add the same google font twice with the font family selector in the
option tab of the editor panel.
- The font will be displayed only once in the font selector menu but 2
trash icons will be added, one for the added font and one for the font
that was already there.
This commit fix this and allows now the user to add the same font twice,
but only to replace a served font by a local font. The opposite does not
make sense, but if the user really wants to replace a local font with a
served, it is always possible by deleting the locale beforehand.
In addition, this commit adds a cloud icon next to the default fonts of
the theme. Since these fonts are served by Google, it is logical to have
the cloud icon. This is consistent with the cloud icon that is present
when the user adds a font served by Google.
task-2998689
closesodoo/odoo#122652
X-original-commit: 948ff01e64e5d71d60d209d074dd6be6510fe794
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The 'frontend_lang' cookie is used to 'cache' the user's preferred lang.
We want to make sure that this language preference is preserved for a
longer period of time than just the life of the browser. This means that
even if you quit your browser and come back into the year, your
preferred language will be used, until you choose to remove your cookies.
The 'utm_*' cookies are used to 'track' where you are coming from on the
instance. The purpose of these cookies is to know the tracking value
to improve the overall user experience or compute the profitability of
some campaigns. Now we keep these cookies for 1 month.
closesodoo/odoo#122573
X-original-commit: 058e0abcf621796bf23d8dcaaf3b2297f632b5fd
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
This commit:
- Unifies the SCSS code for the off canvas filters used in
website_sale and website_crm_partner_assign
- Removes the custom width of 80% on small devices that made it
possible for the user to click outside of the `.offcanvas` to close it
- Adds a close button in the website_sale `offcanvas` as the default
`.offcanvas` width is 100% on small devices and the user needs an exit
button as he can't click outside of the canvas anymore
task-3083706
Part-of: odoo/odoo#109752
Since [this other commit], a traceback is displayed when the user wants
to see the pages of his site when he has only one site. Steps to
reproduce the bug fixed by this commit:
- Launch Odoo without any app installed and without demo data
- Connect to the DB
- Activate the Website module
- Skip the configurator
- Choose a theme
- Discard edit mode
- Go to Site > Pages
- Go to kanban view
=> An error is displayed because the record has no website_id.
[this other commit]: https://github.com/odoo/odoo/commit/f23399db1dfb816a68ecf1be4367234b6e9a28bc
task-3316267
closesodoo/odoo#122754
X-original-commit: 322f0882e9fc0b33c90a2e22fdffa01b5d4345e4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit fixes the issue of having duplicate iframes when dropping a
custom "s_map" snippet that has been saved by the user.
This issue was introduced by this commit [1].
Steps to reproduce the bug:
- Drag and drop a "s_map" snippet onto the page.
- Save this "s_map" snippet by clicking on the custom snippet "save"
button.
- Drag and drop the saved snippet onto the page.
- Observe that a duplicate iframe is created in the snippet.
This commit adds a check to verify if an iframe already exists before
adding it when dropping a "s_map" snippet.
[1]: https://github.com/odoo/odoo/commit/88194dd94182ad1bbdcb9aa8f855f30f6369d148
task-3340644
closesodoo/odoo#122739
X-original-commit: 34b8c2e0578b56b87c50c222564582ed4fa7051f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
=== ISSUE ===
With the new Milk design, we introduced `.border-radius` on buttons.
Most of the time the render looks great, but in some cases, it would break
the layout.
This is due to the fact that old design sometimes used two buttons
next to each other.
This worked fine because they did not have any radius but now it looks
like they are compressed and squished.
=== AFTER ===
This commit tracks some of these cases to improve the global render
of these buttons.
task-3329612
part of task-332626
closesodoo/odoo#122705
X-original-commit: 90c2ba3eb0bf74d675c574b13cedb90235398773
Related: odoo/enterprise#41590
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Delete the autoplay for all iframes in the iframefallback.
The autoplay was causing issue where the sound of the previous video
was played on the background. Now we delete the autoplay for all iframe
directly.
This happened in media_iframe_video, youtube player and vimeo videos.
We can do this for all iframe source url directly as it impacts other
modules like website_slides or website_event_track_live.
task-3012952
closesodoo/odoo#122392
X-original-commit: 6be8af36726d750065972e122e8f4a0aa0f56a17
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Hennecart Jérémy (jeh) <jeh@odoo.com>
Steps to reproduce:
- Go to a website page > Add a 'Form' block > Set an input "Placeholder"
value.
- Go to the page (in 'edit_translations' mode) > The translation of the
input "Placeholder" attribute doesn't mark the input as translated and
even after saving the translation, the input is still marked as
"to_translate".
The goal of this commit is to fix this issue by extending the same
behaviour on the translated `<select/>` options (using `.oe_translated`
class) and setting the right translation state on the input from the
linked attribute translation `<span/>`.
task-3323245
closesodoo/odoo#122011
X-original-commit: 946de52ea80e0cf5f1284cea2134c22ffda3aa5f
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
== ISSUE ==
With the new design introduced within Milk, most of the buttons received
a visual upgrade (eg. removing borders)
This change applied on most of the buttons since the same code, but some
buttons were using a `.border` class on top of that and so they did not
loose this border.
== After this commit ==
We clean up these buttons that were keeping a border, in order to make
our secondary buttons more consistent.
Please note that this change does not apply on all secondary buttons
since some of them are customized for a specific module and so remain
unmodified.
task-3326313
part of task-3326263
closesodoo/odoo#121990
X-original-commit: b2e338666f59a1c40e4dcb072928ee1ae5f3ab52
Related: odoo/enterprise#41310
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.
This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).
closesodoo/odoo#121629
Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.
task-3326633
Part of task-3326263
X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
When a new user is created from the website, the company id was always
set to the first company of the database even if the website was the one
of another company. This flow has been already fixed if there is the
"Specific User Account" setting activated (see [this other commit]).
This commit fixes the same issue but for every case.
Steps to reproduce the issue:
- Create 2 companies A & B
- For each company, create a website linked to a different URL
- Activate 'Free sign up' for company B
- As a public user, go to website of company B
- Go to 'Sign in > Don't have an account?' and create an account
=> If as an admin you check the company of the created user, it is
company A instead of company B.
[this other commit]: https://github.com/odoo/odoo/commit/77c708c516beb322df37220634e178ba82e894c9
task-3277317
closesodoo/odoo#121834
X-original-commit: 3fbfb5301c7583583e4f46c9b4ef16e048e5800c
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
Before this commit this tour was often failing. It seems to be because
there were some requests still being executed / received after the test
was marked as successful and browser getting killed.
According to the logs, even when the tour is actually not failing, there
is still some unexpected requests going on.
With this commit, saving and waiting the edit mode to be exited will
prevent all those requests issues, as it seems like the requests done
after exiting edit mode are all awaited before marking the test as
successfull.
== Before the fix success case ==
- Tour snippet_editor_panel_options on step: 'The text toolbar should still be visible, and the text still selected. (trigger: #oe_snippets .o_we_customize_panel > #o_we_editor_toolbar_container)'
- GET /website/static/src/img/snippets_options/header_template_default.svg HTTP/1.1" 200 - 0 0.000 0.003
- [Same GET for 10 other header templates]
- test successful
- Session expired
- POST /website/theme_customize_data_get HTTP/1.1" 200 - 3 0.001 0.003
- [2 lines above x10]
- Deleting cookies and clearing local storage
- Navigating to: "about:blank"
- Navigation result: {'frameId': 'A538603CC37A4E9EBA99B8624C1CD34E', 'loaderId': '9187051DD3D9477FA4EDEB1A544D584E'}
- Waiting for frame 'A538603CC37A4E9EBA99B8624C1CD34E' to stop loading
- waiting for threads: [<Thread(odoo.service.http.request.139669352166976, started 139669352166976)>]
== Before the fix error case ==
- Tour snippet_editor_panel_options on step: 'The text toolbar should still be visible, and the text still selected. (trigger: #oe_snippets .o_we_customize_panel > #o_we_editor_toolbar_container)'
- GET /website/static/src/img/snippets_options/header_template_sidebar.svg HTTP/1.1" 200 - 0 0.000 0.004
- [Same GET for 10 other header templates]
- test successful
- GET /web/static/img/smile.svg HTTP/1.1" 200 - 0 0.000 0.001
- GET /web/static/img/spin.svg HTTP/1.1" 200 - 0 0.000 0.001
- Failed to fetch
- Asking for screenshot
- Trying to set result to failed (TypeError: Failed to fetch) but found the future settled (<Future at 0x7f8fa1a25120 state=finished returned bool>)
- Deleting cookies and clearing local storage
- Screenshot in: /data/build/tests/36222061-master-all_no_autotag/screenshots/sc_20230513_220042_739175_TestUi.png
- Navigating to: "about:blank"
- Navigation result: {'frameId': 'E1A779132E972A440E5FE892BBBC9FEC', 'loaderId': '822ACED443DB0C84F57DD4A1FF451D5B'}
- Waiting for frame 'E1A779132E972A440E5FE892BBBC9FEC' to stop loading
- waiting for threads: [<Thread(odoo.service.http.request.140254747010624, started 140254747010624)>]
== After the fix case ==
- Tour snippet_editor_panel_options on step: 'iframe body:not(.editor_enable)'
- GET /web/static/img/spin.svg HTTP/1.1" 200 - 0 0.000 0.003
- POST /website/theme_customize_data_get HTTP/1.1" 200 - 8 0.002 0.035
- [Many other POST/GET requests]
- test successful
- Deleting cookies and clearing local storage
- Navigating to: "about:blank"
- Navigation result: {'frameId': '4B87BC8A50A3FEBD7D508394DD5BDB19', 'loaderId': '7CCB3B6434B52B456A1AA470C3CFA1BF'}
- Waiting for frame '4B87BC8A50A3FEBD7D508394DD5BDB19' to stop loading
- waiting for threads: [<Thread(odoo.service.http.request.139744500471360, started 139744500471360)>]
runbot-15312
closesodoo/odoo#121795
X-original-commit: 936cc061ab20dc1fe4587b24f59dc322d0e7ad9b
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The generation of the assets may make this step fail randomly.
The pregenerate is not enough because this is generating assets for
website2.
This issue will be partially solved in master with this PR [1] by not
generating an asset if a close one is found in the database.
For now just increase the timeout for this test.
[1]: https://github.com/odoo/odoo/pull/121376closesodoo/odoo#121777
X-original-commit: c3209aec9741cda8597525add88b0a932fb7532a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, links scrolling to an anchor with a special
character did not work and displayed a traceback. The issue was that to
check that the anchor is valid, we don't need to check that the anchor
is a valid url as we have been doing since these commits [1], [2]. But
we only need to check if the jQuery selector is valid to correctly
target the element to which the page must scroll.
Indeed, the anchor widget returns stuff like 'ok%C3%A9%25' when typing
'oké%' wich is not valid jQuery selector. It has to be encoded to
'#ok\\%C3\\%A9\\%25' to be valid and that's what this commit does.
We also changed the way to display a new anchor to the user in this
commit. Before, we showed the anchor unencoded in a notification and now
we show it encoded. That way, if the user copies the anchor from the
notification, it's the real anchor.
Also, this commit detect if the success URL of the redirect of a from is
the current page to perform a scroll to the anchor instead of a
redirect. To make this comparison, we needed to add the url code of the
language of the current page to the session info.
Also, before this commit, the page froze when we clicked on the "submit"
button of a form that redirected to an anchor that did not exist.
[1]: https://github.com/odoo/odoo/commit/0abfaeda96c2eaa868cc7fc5fa1926dfa90fc420
[2]: https://github.com/odoo/odoo/commit/b492bde6a121be1c15ed90ce0827fcfd72a12f5c
task-2172312
closesodoo/odoo#121656
X-original-commit: f09a3fc47b5fd088c3aa5112a0fac5f442d9c915
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Cast website_id so that if it contains more than 1 digit, we do not
browse() a tuple with each digit. For example, if we pass pagenew() the
website_id '123', this is the current behavior:
- browse('1', '2', '3')
After this fix:
- browse(123)
To reproduce the erroneous behavior:
- Create at least 10 websites so that the id of this website is at
least in the double digits.
- Create a new page within this website with a double digit id.
- It will throw an expected singleton error.
Issue was introduced in this commit: https://github.com/odoo/odoo/commit/d6014c60acc4231a5e56d492d2a39deaf789cbe8
opw-3290571
closesodoo/odoo#121586
X-original-commit: 3855829a0daf4321ab54cce3a71a92eb68c216b3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
One of the most costly part of a page loading when the ormcache is cold
is computing the assets node, the unique identifier of an attachment to
validate whether the existing attachment is still valid with the current
version of the static files.
This operation needs to glob assets path in the filesystem,
get the modification date, check attachments, ...
Right now this task is not really optimized and can take some time
because of an excessive number of glob on the filesystem, unnecessary
exists to define absolute path, double computation of file list and
modified times when getting js and css bundle separately, ...
A list of modifications mainly discussed in the pr message are made
with this commit to speedup things.
- split css and js unique
- prepare api for an in memory glob
- change api to propagate absolute path and meta information through
`ir.asset._get_paths`-> _get_asset_paths -> `_get_asset_content` ->
`AssetsBundle`
closesodoo/odoo#121159
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Before this commit, when a cookie bar was displayed on a page and
elements of that page were animated (on scroll and on appearance), those
animations did not work while the cookie bar was present. This commit
fixes that and enables animations even if a cookie bar is displayed. The
problem was that we were looking to see if a modal (cookie bar, popup)
was displayed and if it was, all animations were based on the scroll
height of that modal. However, this should only be done for elements
that are in the modal. The other elements should always base their
animation on the scroll height of the page.
task-3151000
closesodoo/odoo#121543
X-original-commit: 406fc8a59a36313f382a34aaba143ab2a9845718
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Dieleman Guillaume <gdi@odoo.com>
Steps to reproduce:
- Log in as admin
- Install `eLearning` module
- Create a course and add a youtube video as a lesson
- Publish the course
- Go to the website and click on the course
- Enable `Editor` mode (top left corner)
- Click on lesson to open it in fullscreen
- Click `Back to course` button
Issue:
Video is playing in the background.
Same issue occure with video snippet in the website editor (by default
video is mute but still playing in the background).
Cause:
When editor mode is enabled, there is a fallback iframe that clone the
content of the current page that we leave into it.
Since the youtube video has `autoplay=1` in the URL, it will
automatically start in the fallback iframe.
Solution:
For regular website pages, remove the `autoplay` param from all
media video iframes urls (targeting all `div.iframe` that have a class
`media_iframe_video`).
For eLearning, override the `WebsitePreview._cleanIframeFallback`
method to remove the `autoplay` param from youtube videos URLs.
opw-3226002
closesodoo/odoo#121475
X-original-commit: ad78585cd514f5ff16647572d34937c18a112529
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit fixes a bug with the navbar links in the header of a website
on mobile. When the text of a link is long enough to be wider than the
screen, the text does not wrap to the next line as intended, but instead
overflows to the right outside of the screen, causing part of the text
to be hidden.
Steps to reproduce the bug:
- Edit the text of one of the menu links on a website to make it longer
than the width of the mobile screen.
- Bug: In mobile view, part of the link text is hidden.
This bug occurs with both the "default" hamburger type and the
"off-canvas" hamburger type.
opw-3233684
closesodoo/odoo#121464
X-original-commit: eae10f2e154a1b6bf9f385460b1371faf9869a3f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Prior to this commit, `o_navbar` wasn't fully hidden when we were in
edit mode and created an offset at the top of the loader when we loaded
something (eg. changing the header template).
This commit fixes this issue.
task-3326604
Part of task-3326263
closesodoo/odoo#121387
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The cookie policy banner template includes nested selectors, such as
o_cookies_bar_text_policy within o_cookies_bar_text_secondary.
The process for switching the banner layout involves copying selectors
based on the order defined in CookiesBar::selectLayout()::selectorsToKeep.
However, a bug caused o_cookies_bar_text_policy to be copied before
o_cookies_bar_text_secondary, resulting in its content being overridden
by its parent content. The fix involves reordering the selectors so that
o_cookies_bar_text_secondary is copied before o_cookies_bar_text_policy.
opw-3302511
closesodoo/odoo#121324
X-original-commit: 720ae005bce261ce3b9e32dc8ade1f1d97f1aee1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Prior to this commit, after [1], when a user is trying to visit or view
their website from a domain that is not their current website, a
traceback would appear if the redirect took too long.
This is because when redirecting, we do not set any URL as the iframe
iframe source, so it loads the `about:blank` page. When trying to push
that page into the history (done to change the name and url displayed in
the browser), the browser crashes and displays a CORS error.
On top of that, it seems some users do not understand what is happening
and feel like they are being logged out if they're not logged into their
custom domains.
This commit prevents replacing the history state if the page displayed
in the iframe is `about:blank`.
It also displays a dialog before redirecting, explaining to the user why
it is necessary.
Steps to reproduce:
- Go to website settings
- Set a domain for your website that's different from the one you are
currently using to access Odoo (Could be anything but for a realistic
setup, if accessing from localhost, use 127.0.0.1 or the other way
around, or use different 127.0.0.X ips)
- Toggle a slow network mode from your browser's dev tools
(This is to ensure the traceback appears as it does not if the network
is quick enough with its redirect)
- Go on the website app
=> A traceback appears (and disappears as the page is unloaded)
[1]: https://github.com/odoo/odoo/commit/59b96b0742fe8da31eecf896f7a6157811d49de5
opw-3250663
closesodoo/odoo#121311
X-original-commit: 15a31cbcec9f51c72abac8df69932cc1a742baef
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, now that multiple files can be uploaded in a form,
we could observe that the file input is not convenient to manage this
situation:
- Clicking again on the input to choose other files replaces the
previously uploaded ones, we can therefore not upload files one by one.
- A file cannot be deleted in an obvious way: we need to cancel a new
upload, as it will replace the file by nothing and therefore delete it.
- When multiple files are uploaded, only the number of files is
displayed and not their name (they are only displayed on hover).
This commit improves these behaviors:
- Clicking again on the input adds additional files instead of replacing
them (unless the number of files allowed is 1);
- The button text content is modified after the upload of files,
displaying "Add Files"/"Replace File" (if multiple/single files are
allowed) to show its role better.
- When files are uploaded, blocks containing each files name and a
cross to delete them are displayed.
In order to make these improvements, the file input is hidden and
replaced by an input of type=`button` when files are uploaded. This was
done for two reasons:
- It is not possible to modify the content of an input of type=`file`
but we can change the value of a button.
- The input did not look good with the file blocks, because it has a
text displaying file informations, which was redundant with the blocks.
task-2798576
Part-of: odoo/odoo#89055
Currently, we can only upload one file in a form File Upload field and
this file does not have a size limit. (Note that the server can have a
limit to prevent files too large from being uploaded but the file input
itself does not have one.)
This commit adds options to the form file inputs in order to set a
maximum number of files and the maximum file size (in MB) allowed to be
uploaded in these fields. The default values are 1 file and 1 MB. Note
that the option for the number of files is not displayed for the fields
where only one file is supposed to be uploaded.
If the uploaded files do not respect these limits, the form is not sent
and a message is displayed.
task-2798576
Part-of: odoo/odoo#89055
Edition of block links has been broken several times.
This commit adds a test that makes sure it does not happen again by
changing the URL of a card of a mega menu with the Cards template.
task-3300977
closesodoo/odoo#121362
X-original-commit: b4b5816a4acd953eb4dabfd14d2a142934dee357
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238
closesodoo/odoo#120437
Signed-off-by: Géry Debongnie <ged@odoo.com>