With this commit, it is now possible to activate a cookies bar on a
website through the res.settings.
The cookies bar can be edited in the frontend by entering edit mode.
The cookies bar will appear until the user clicks on 'I agree'.
Part of https://github.com/odoo/odoo/pull/41294
task-2087003
closesodoo/odoo#41294
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit introduce a new snippet option for s_popup to control the
consent duration in days. This value will be used to know if the popup
should be shown or not.
If the user close the popup, it won't be shown until the consent
duration is over.
This will also avoid popup to be shown on exit (display mode) more than
once. Indeed, every mouseout of the screen (changing tab, changing app,
alt tab etc) would show the popup, as well as page navigation.
Part of https://github.com/odoo/odoo/pull/41294
task-2087003
*: website
This commit is a safety nest to ensure `o_snippet_invisible` will be
found, even if somehow they appear as one of the editable area elements.
It might be the case with some refactoring, as it was the case between
404fa8164 and 83d99941c, in which case, the step to reproduce were:
- Add s_popup snippet into the page
- In the options, select 'Show On All pages' -> It moves to footer
- Now save and enter Edit mode again
- The invisible element (popup in this case) is in the DOM, the widget
is working fine but it is not retrieved as an invisible element,
thus not possible to edit it
+ lint/dead code
Part of https://github.com/odoo/odoo/pull/41294
task-2087003
* website, website_sale
The design will be deeply reviewed in a future update. This commit is
just about unifying it and making sure no element is cut/overflowing.
-> All items are now inline automatically
-> If there is no enough space, it becomes full-width over two lines
automatically (this can be forced with the o_we_fw class)
-> Force to stay on one line with the o_we_force_inline class
closesodoo/odoo#44142
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, `sequence` field was in the last column of List view which is not Ideal for `widget="handle"`
Now we display `sequence` first on the list view
closesodoo/odoo#43969
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Remove s_comparison title's col
- Rename 'Text Block' into 'Text'
- Make all icons of s_features rounded
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
* website_blog, website_event, website_form, website_mail_channel,
website_mass_mailing, website_sale, website_twitter
+ Reorganize the order.
+ Do not promote apps via snippets when they already are promoted via
the "New" menu. Also do not promote apps in the same snippet section
more than once.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
Part of Inner Snippets review task. `s_share` should have a list of preset
layouts.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152191
Part of Inner Snippets review task. `s_alert` should have a list of preset
layout.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152191
To fit the general look&like of the left panel, the size elements should be
handled with an input to allow full control.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152191
Adding new options that are available through Bootstrap (Tabs or pills
class for nav-item. Alignment, menu horizontal/vertical, etc). Adding a
slide transition option. The snippet becomes also a drag&drop zone.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152185
Make the parallax snippet empty (remove the title). Remove the padding.
Add style to the building block with a message to help user to drag
stuff into the snippet.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152185
Add padding top and bottom on title. Add padding bottom on the whole
block. Disable y-axis padding in the divs who are within the company
member divs. Do not allow to drop a company member div within another.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152185
Adding arrows to move the items above and below each others and remove
the big title
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152185
This commit reviews a bunch structure snippets to streamline their use
and edition, namely:
Banner, Cover, Picture and Text-block snippets:
- Remove extraneous levels of edition (buttons, heading/text only
columns)
Picture snippet:
- make picture bigger
Three columns and comparison snippets:
- Make regular column options available on the cards
- Remove unwanted UI elements (card footer, button)
Cover snippet:
- Make title bold
It also consolidates the main colorpicker and the column colorpicker
into a single option as they did the same thing and allows inner content
to be dropped next to images in the Image - Text and Text - Image
snippets.
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
task-2152184
The tour had been fixed for running headless, however that was only
checked in enterprise, and community turns out to have a more complex
loading sequence, and thus higher likelihood of dangling request: when
logging in, on enterprise the user lands on the applications screen
which performs no further RPC. On community however the homepage
triggers the Chatter action which can take some time to load after we
already see the user menu.
Add a community-only step which waits for chatter to load.
closesodoo/odoo#43936
X-original-commit: d7777044a7649a4809dd08f864bb8d43729b201e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
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>