Fix various tours which either have transient failures due to logging
the entire browser lifecycle or don't deal well with the last step
being suppressed if no explicit `run` is provided.
* test_website: add a warning final step for the page reset as there's
no way to actually run a tour step in the recovery page (because
it's asset-less)
* website: remove final step's action in reset password tour, it's
relatively low-value and adding a proper followup is probably not
worth the effort
* website: add final check step in dashboard tour, as we want to check
that the dashboard gets loaded, but we don't want that to be dangling
The move snippet arrows where not hiding properly when the target was
not movable.
closesodoo/odoo#43864
X-original-commit: ab32882ff0ecaf9995e52b062b880cd8ea0b6efa
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit fixes the visitor's time_statistics computation. When creating a
new visitor, last connection datetime is not set, so it's not retrieved in the
search_read and crash at search_read_result[visitor.id].
This fix also speeds up and simplifies the time_statistics computation.
As time_connection_datetime is always set (for already created visitor) and in
the depends, no need to read values before looping, the data is already fetched
in memory. We can then use directly the value for each visitor in self.
Task ID: 2120464
PR #40199closesodoo/odoo#43780
X-original-commit: 1f0c9f272ea5b6b7b891fcb8d00eb81e7fe33f81
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fix most `t-set` errors that either led to:
1. unwanted text to be considered as translatable.
eg: `<t t-set="classes">text-left bg-100 p4</t>` would create an
`ir.translation`.
2. text that should be translatable were not.
eg: `<t t-set="text" t-value="'Both'"/>` would not create an
`ir.translation` while it should.
If a text should be translatable, it should never be inside a `t-value`:
- `<t t-set="text">Both</t>`
If a text should not be translatable, it sould either be inside `t-value`,
`t-valuef` or the `<t>` tag should have `t-translation="off"`:
- `<t t-set="classes" t-translation="off">text-left bg-100 p4</t>`
- `<t t-set="classes" t-valuef="text-left bg-100 p4"/>`
- `<t t-set="classes" t-value="'text-left bg-100 p4'"/>`
https://github.com/odoo/odoo/pull/43660https://github.com/odoo/enterprise/pull/7839https://github.com/odoo/design-themes/pull/203closesodoo/odoo#43660
Related: odoo/enterprise#7839
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
* website, mass_mailing, website_event, website_form,
website_mass_mailing, website_sale
Now the user can save snippets to use them on other pages.
task-2120409
closesodoo/odoo#40408
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Adding more control on the rating snippet. Choose the color, select
other icons in media dialog, no limit to add active or inactive icons,
display the rating inline or below the title.
task-2146209
closesodoo/odoo#41169
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Apply the style of drag&drop zones (.oe_structure.oe_empty) even when
it is a descendant of the editable element, not the editable element
itself. This change allows to add a visible drag&drop zone in any
snippet.
- Add the editor messages (data-editor-message) on drag&drop zones when
a snippet is dropped (not only on editor start as before).
In preparation of task-2152185
closesodoo/odoo#43358
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
An http-port provided on the command line (may also have been an issue
for config files, didn't check) would not be taken in account anymore,
because `odoo.tests.common` would be imported during the import of
`odoo` itself (when loading odoo.service.server), itself importing
`odoo.tools.config` leading to a default configuration being set up.
* remove `odoo.tests.common.PORT`, `config['http_port']` should be
used always
* defer the import of odoo.tests.common by moving it inside
load_test_file
* stop generating default configs
closesodoo/odoo#43283
X-original-commit: 45871f498ea4cf3ada719692e69cd413883ab442
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
* website
This commit is simply about factorizing the code some more and making
sure the user value widgets always trigger a meaningful 'previewMode'
value.
Part of https://github.com/odoo/odoo/pull/42986
* website
This commit is simply about making the related method public instead of
private (allow to better see the diff in upcoming improvement commits).
Part of https://github.com/odoo/odoo/pull/42986
*: website_blog, website_event
This commit adds a "Height" option to sections, allowing them to have a
minimum height of the user's choosing (either full screen height or half
screen height, similar to blog covers). Enabling the full screen option
also allows the user to add a "scroll down button" that will scroll down
to the next section, also similar to blog covers.
As such, the classes doing the corresponding things in website_blog and
website_event have been renamed to reuse the same code.
task-2155710
closesodoo/odoo#41623
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Themes image would not be shown correctly in the theme selection if the
`website` module was installed in CLI.
Indeed, the code supposed to load the theme images was done in the kanban view
during theme selection after installing module through apps screen.
Now, this code is encapsulated and called in post_init hook of website.
This was also needed for an improvement on `test_themes` module, see
https://github.com/odoo/design-themes/pull/195.
closesodoo/odoo#42206
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- The module `website` instanciate the environment bound to
request before `_dispatch` is called.
This causes issues with with routes that create their own
psycopg2 cursor.
To be more precise, the issue that allowed us to discover this
instanciation is linked to the module `auth_oauth`.
The route `/auth_oauth/signin` is a `none` route that receives
a database name. It uses the db name to create a cursor and
an environment manually to process the OAuth signin, log-in the user
then assume it is safe to now use `request.env` to process the rest
of the code.
But here, since a cursor has already been created in `request` before the
route had the chance to commit its changes to `res.users`, the
changes made in the route `/auth_oauth/signin` are not available.
And this causes issues with the computation of the session token
done in the method `_compute_session_token` in the model `res.users`.
It uses the field `oauth_access_token` to compute the session token.
But since, the cursor in `request` is in a transaction that is not
yet aware of the changes made on this field, it will compute a
session token using the old `oauth_access_token` and store this
outdated token in the client's session.
Then here depending if you are using a multi-worker or a multi-thread
Odoo, you either are never signed in or your session is expired
after a cache cleaning (the method `_compute_session_token` is cached).
closesodoo/odoo#42808
X-original-commit: ceec103826ae2a18c63b48c17850d035e352fa3b
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
This reverts commit 404fa816403b60c0d6e36bef6f2c73f020ea5ff3.
The commit acts on some special case. But it seem to break some case
when there is a t-ignore or other directive at that same element.
Reverting because a good solution would need to take
into account t-attr-class and this might not be possible easily.
opw-2122947
closesodoo/odoo#42599
X-original-commit: da62f7e65bd1df67138fe9a82000f800dc0ff84c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Fine-tunning of 42eec88e5da164e4930c48113109f2c8d4b73da3
Before this commit, the assets were not found when the user is connected
in mode debug assets in a multi-website and multi-company. This occurs
because the attachments (assets) were created only for the first website
accessed, and cannot be loaded when trying to access the second website.
Now, the attachments are created for each website accessed and can be
loaded withtout problems.
closesodoo/odoo#42593
X-original-commit: 95077a8cdd9f2cd99c2ef85bdf7ca5d58e006b71
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
*: web_editor, website_forum, website_mass_mailing, website_slides
This class no longer does anything.
Part of odoo/odoo#41561
task-2155808
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The previous commit introduced a new imagepicker uservaluewidget, which
allows the user to select a picture or video in a generic way, this
commit adapts the background and CoverProperties snippet options to make
use of this uservaluewidget instead of duplicating most of the logic.
Part of odoo/odoo#41561
task-2155808
In 2cc8316c66, the cover properties snippet option was refactored to
using a single data attribute per select instead of repeating it on
every button inside of it. After selecting an option, the corresponding
data attribute would be set on the cover container by finding the
currently active button and copying its select class attribute.
However, because of an oversight, instead of finding the currently active
button inside the select, the option would find any active item inside
of the select, and because the select is always open when a button
inside is clicked, the first active item inside of the select is its
toggler.
This commit fixes that by increasing the specificity of the selector
that finds the active button to only find buttons, and not the
select-menu toggler.
closesodoo/odoo#42567
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Changes (+ fix) to the way inputs work:
- Placeholder is now independant from the default value and set through
data-placeholder. When emptying an input, it still sends the default
value but appears empty. The value is only visually added in the input
after leaving it (or hitting enter), after the validation through
_computeWidgetState (because now when the default value is applied on
a snippet, the value is displayed in the input as any other value).
- Consider inputs active if they hold a value and, in the case the input
has an associated unit, if that value is different from 0 (important
for visibility checks).
- If no default value is set and that a unit is set, the input will
return the ('0' + unit) value by default (no need to specify it in xml
anymore).
Part of https://github.com/odoo/odoo/pull/42407
Currently, the website logo is not displayed on SEO dialog and instead the
company logo is being displayed.
After recent changes (see [1]), company logo and website logo are now
different and so changes were not adapted on the website.
This commit fixes the issue by adapting the changes and displaying the
correct website logo on the SEO dialog.
[1] - https://github.com/odoo/odoo/commit/8be4567ae8f6b0388206c091590278ef11a2df21
task-2083006
closesodoo/odoo#42391
X-original-commit: 9c75960e931bc77530074f60997cced4b5907d3e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adds the width of blog posts to the "Stretch" snippet option
(previously, only full width aka container-fluid and regular container
were allowed, hence the name), as such it has been renamed to width.
Some code in website_blog has been adapted to reuse that class, such
that the width of the small container can be adjusted and website and
website blog will stay consistent with one another.
task-2155513
closesodoo/odoo#41844
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this task, we had some menu snippets but they were not really
perfect and there were theme specific.
task-2091911
closesodoo/odoo#40169
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In a80775ce3c, some code was refactored to stop using the confusing
'animation' denomination, as in reality they were just public facing
widgets that did many things, such as loading data based on
data-attributes and other things that were not always animation related.
One instance of the animation_stop_demand event was not renamed in the
_onSnippetWillBeCloned method, which creates some problems, one of which
being that the facebook snippet's iframe wouldn't be destroyed on clone,
but since the animation was started after the clone, this would result
in one facebook page snippet with two iframes with the facebook page,
for a total of 3 instead of 2, and one of these was unconfigurable.
This commit renames the event to restore the proper behavior.
closesodoo/odoo#42311
X-original-commit: 2a671f47f87e2bb52a5fade11ea6b79070516694
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the configuration of the facebook page snippet was
done in a modal window. In an effort to streamline and unify snippet
options, the configuration has been moved into the left panel.
task-2146928
closesodoo/odoo#41104
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
* website, website_mass_mailing
Instead of a custom string, use the name of the snippet when displaying
an 'invisible' snippet in the 'invisible elements' section.
This commit also fixes a font-awesome bug introduced with the library
update revert.
Part of https://github.com/odoo/odoo/pull/41789closesodoo/odoo#41789
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
- Download the customer db: stargue-inc
- Go on the website in mobile mode
Traceback & the second item in the carousel is not displayed.
Cause
Traceback: we use `this.$iframe` without checking if it's defined
Second item not displayed: the first video promise is overriden
by the second video promise.
Solution
Check if this.$iframe is defined and resolve the old promise
instead of overriding it.
OPW-2152690
closesodoo/odoo#42139
X-original-commit: f5f569b4705f37865cb976a4df10a0d9f388fae2
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
* web_editor
Previously, increasing the number of columns on the tabs snippet would
cause the newly created tabs to toggle the original tabs instead of its
own, this was caused by an oversight where the columns were clone
directly using jQuery, and the snippets' the onClone method was not
called on the newly created columns (here, tabs). This commit move the
responsibility to clone onto the SnippetsMenu so that it can create the
appropriate snippetEditor if needed and call its onClone method.
task-2070643
closesodoo/odoo#42130
X-original-commit: 77ebadfe6ada8ad1fa4d6e476b9534f252499d92
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
If getLangDateFormat is called right in loading the js file, it returns
default format. We now call it when translations are ready.
closesodoo/odoo#42126
X-original-commit: e7a58430a382ca1161131e562d53bef3ea0e6ce0
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>