Commit Graph

151 Commits

Author SHA1 Message Date
Martin Trigaux c5a161385d [I18N] *: export 16.0 translations
closes odoo/design-themes#708

X-original-commit: c3d2f03db6
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-10-05 15:36:20 +00:00
Jorge Pinna Puissant 0ecf1636eb [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/design-themes#709

Related: odoo/odoo#137517
Related: odoo/enterprise#48364
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:55 +00:00
=?UTF-8?q?Beno=C3=AEt=20V=C3=A9zina?= 1f7f82b38e [FIX] theme_avantgarde: properly define 3rd 3-cols image for previews
Since [1], the manifest is not well formed: it contains a duplicated key

[1]: https://github.com/odoo/design-themes/commit/08befbeaf5ef90ef7ab2176847269d7eea2ec4c7

closes odoo/design-themes#702

X-original-commit: a26fec8761
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-22 15:06:05 +00:00
Pierre Paridans 331b8a3a06 [IMP] theme_common: remove PublicWidget fix for deprecated old apple devices
Introduced in odoo/design-themes-old@a3dbaf1576,
this Bootstrap's Collapse fix was targetting very old Apple devices.

task-3439226

closes odoo/design-themes#694

Related: odoo/odoo#134020
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-06 11:50:52 +00:00
Brieuc-brd 458919e515 [FIX] theme_anelusia: s_product_list broken img
Since PR #641, the url of item 4 was broken.

This commit fixes this issue.

closes odoo/design-themes#691

X-original-commit: 684a824668
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-08-21 19:57:20 +02:00
Jorge Pinna Puissant f7f7016efb [REF] test_themes: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

closes odoo/design-themes#686

Related: odoo/enterprise#45020
Related: odoo/odoo#130467
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-11 14:32:07 +02:00
Michael (mcm) feed58b94b [REF] test_themes: remove legacy patch
This commit removes the use of legacy patch by using the modern patch.

closes odoo/design-themes#685

Related: odoo/enterprise#45271
Related: odoo/odoo#130867
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-07 10:58:41 +02:00
Robin Lejeune (role) a86d9f73df [FIX] theme_*: remove mb-2 class on orphan buttons
*: anelusia, artists, aviato, graphene, kiddo, loftspace, monglia,
notes, odoo_experts, paptic, test_custo, yes

The community PR [125824] introduces an automatic check on buttons to
add the `mb-2` class when several buttons follow each other, so that
they have space to breathe when split on multiple lines.
For consistency, this commit therefore removes most `mb-2` occurrences
on buttons within themes as long as they are alone on their line, but
keeps or adds the class when several buttons are next to each other.

[125824]: https://github.com/odoo/odoo/pull/125824

task-3369604

closes odoo/design-themes#680

Related: odoo/odoo#125824
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-08-03 19:30:56 +02:00
Arthur Detroux (ard) 6a50b911fe [IMP] website: warn users when a website has no domain
This commit disables the warning (introduced by the community commit)
when test-themes is installed, as a lot of websites are created and are
not necessary when testing the different themes.

-- ORIGINAL COMMIT MESSAGE --

Prior to this commit, if a website does not have a domain, nothing tells
the user that this is a misconfiguration that can lead to broken
behaviours. For example, here are the steps to reproduce:

- Have two website (X and Y)
- Website Y does not have a domain
- Tab 1 has Website X selected
- User opens a new tab
- Tab 2 has Website X selected as well
- User switches tab 2 to Website Y
- No redirection happens
- User switches back to tab 1
- User opens the HTML editor for Website X
- Website X content is displayed
- User saves
- Content is saved on Website Y

This is pretty hard to fix as a lot of the python flow for Website uses
`get_current_website` which will uses the session's "force_website_id"
in priority.

In any case, we consider having multiple websites sharing the same
domain (or having no domains at all) a misconfiguration. Therefore, we
should warn the user of so.

This commit adds a tooltip on the website switcher for websites that do
not have a domain set. It also adds a notification recommending users
close other tabs if they switch website.

opw-3374214

closes odoo/design-themes#684

X-original-commit: 2e3188e1e1
Related: odoo/odoo#130448
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-03 10:43:08 +02:00
Pierre Pulinckx (pipu) 94b3042634 [REF] website_*: Change registerTours of tour_utils
As steps are encapsuled in an arrow function from
69a5d8e3ce47238 for steps tour definition to avoid
direct Markup(_t()) interpretation, the same is done
for registerWebsitePreviewTour() of
"odoo/addons/website/static/src/js/tours/tour_utils.js"
in this commit.

This is done in anticipation of the use of
_t() (import from @web/core/l10n/translation) with
registerWebsitePreviewTour().

task-3292454

closes odoo/design-themes#678

Related: odoo/odoo#130248
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-02 13:20:26 +02:00
Bastien PIERRE b9d48ebe86 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/design-themes#671

Related: odoo/odoo#127414
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:31 +02:00
Benoit Socias ab791fab67 [IMP] theme_cobalt, theme_paptic: adapt to new theme options
This commit adapt themes to rely on the new theme option
`headings-line-height`.

See https://github.com/odoo/odoo/pull/111621.

task-3140991

closes odoo/design-themes#633

Related: odoo/odoo#111621
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-07-17 10:40:26 +02:00
Robin Lejeune (role) cc958193fb [FIX] theme_test_custo: add test for the mobile/desktop theme preview
With the Milk redesign in [1], the possibility to use the mobile/desktop
switcher on a theme preview to see how it behaves/displays on those
devices didn't work anymore.

It has been fixed in [2], but in order to prevent future breaks, this
commit tests this functionality.

task-3355253

[1]: https://github.com/odoo/odoo/commit/caef16ee4e5351142ef04f02798999ccb38a56bc
[2]: https://github.com/odoo/odoo/commit/9445f61bcaee88bc6ac2fc373d7eca4e4b38c154

closes odoo/design-themes#670

X-original-commit: ed2fdd45f2
Related: odoo/odoo#127911
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-10 18:16:28 +02:00
Victor Feyens c338c17bf7 [FIX] *: clean useless content in manifests
Make sure the linting test added in community do not fail.

closes odoo/design-themes#669

X-original-commit: f78f8df161
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-07-07 10:52:58 +02:00
Pierre Pulinckx (pipu) 06dda77753 [REF] theme_common: remove underscorejs usages
After this commit, usages of underscore js functions
has been replaced by native javascript function.

task-3246238

closes odoo/design-themes#662

Related: odoo/odoo#125889
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-06-26 15:11:57 +02:00
Mathieu (mano) fb611453ee [IMP] theme_test_custo: xpath new shape UI
This commit fixes the xpath that have been broken by the new
we-select-pager introducing a full height version of the shape UI in
the web_editor.

task-3266751

closes odoo/design-themes#653

Related: odoo/odoo#118253
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-12 11:17:43 +02:00
Guillaume (gdi) 1c029c860b [FIX] theme_test_custo: use new utility to enter in edit mode
This commit permits to use the new utility to enter in edit mode. This
way, we make sure that the edit mode is enabled before testing the next
step of the test. This avoids race conditions during tests.

task-3203820

closes odoo/design-themes#656

X-original-commit: 38e0c87ae3
Related: odoo/odoo#120481
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-05-04 20:33:57 +02:00
Michael (mcm) 7ab07c6ec1 [REF] *: convert odoo module by native one
This commit converts all odoo module of this repo by native module.
The goal is to depreciate odoo.define in favor of native module
and then simplify boot.js by removing the regexp that finds
module dependencies.

task id: 3162300

closes odoo/design-themes#652

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-27 12:31:44 +02:00
can-odoo 9cca23373e [IMP] theme_yes: change description of masonry snippet
Introduced with [1], same description for Caterers and Venues block.

[1]: https://github.com/odoo/design-themes/commit/299d504df31bf179775eec1d37e71605c3637460

task-2994239

closes odoo/design-themes#647

X-original-commit: 57de963baf
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-04-17 18:01:32 +02:00
Benjamin Vray 44b3badbca [FIX] theme_*: remove flip classes from theme snippets
Initially, the background shapes were flipped using only CSS. This was
done by adding the classes 'o_we_flip_x' or 'o_we_flip_y' to a shape to
flip it. However, this system caused issues as it sometimes left a gap
between two connected shapes. As a result, the system was changed with
this commit [1], and the classes 'o_we_flip_x' and 'o_we_flip_y' were no
longer used from this point on.

Despite this change, in our themes, we continued to use these obsolete
classes to define whether a shape should be flipped or not. This commit
addresses this by removing all instances of 'o_we_flip_x' and
'o_we_flip_y' classes that were still being used in theme snippets and
replacing them with the new system, where flipping is defined as a
parameter in the background image URL.

Note that in stable versions where we cannot modify theme snippets, we
have added code to automatically adapt the shapes to the new system
(in this commit [2]).

[1]: https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
[2]: https://github.com/odoo/odoo/commit/256ff539afe331544ccb58848f1ecd0eecbe4daa

task-2824607

closes odoo/design-themes#639

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-07 19:43:08 +02:00
Mathieu (mano) 8ee2b3ac77 [FIX] theme_*: adapt svg shapes paths
In commit [1] some of the shapes have been moved to new folder or have
been renamed.

This commit adapt the paths of the previous shapes to their new location
in various themes.

[1]: https://github.com/odoo/odoo/commit/934069f834534ca3553ed28e46e5619c33463e50

task-3266705

closes odoo/design-themes#641

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-04-06 19:16:46 +02:00
Romain Derie a5d1ca4651 [IMP] theme_beauty, *: rename the font "Muli" to "Mulish"
* theme_bookstore, theme_clean, theme_enark, theme_kiddo,
  theme_loftspace, theme_odoo_experts, theme_orchid

This commit will rename the font "Muli" to "Mulish" as it has been
renamed in Google Fonts.

Closes #574

Courtesy of Kaushalya Mandaliya <kma@odoo.com>

closes odoo/design-themes#638

X-original-commit: 7afe3a3438
Related: odoo/odoo#114932
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-03-10 14:38:56 +01:00
Denis Ledoux 1c01209d32 [IMP] base, *: change the API of init hooks to pass env
This is mostly a cleaning/refactoring change.

The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.

By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`

Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.

closes odoo/design-themes#631

Related: odoo/enterprise#35084
Related: odoo/upgrade#4144
Related: odoo/odoo#108254
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-02-01 10:24:50 +01:00
Soukéina Bojabza e2a23d96b4 [FIX] theme_clean: remove the content class from the Carousel rows
In [1], in master, the `content` class is removed from the elements
with the `row` class in the Carousel snippet. This commit does the same
for the extension of Carousel in the "Clean" theme, to be consistent
with these changes.

[1]: https://github.com/odoo/odoo/pull/102696

task-3011192

closes odoo/design-themes#628

X-original-commit: 6232ec4af4
Related: odoo/odoo#108646
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-28 11:42:48 +01:00
Arthur Detroux (ard) c718482a50 [FIX] theme_kea: fix the data of shape on s_picture in KEA theme
Commit [1] refreshed the design of the KEA theme but unfortunately
introduced the wrong path to a shape on the s_picture snippet.

This used to cause a traceback but [2] fixed it. However, it is still
worth correcting the path so that shapes automatically chain under the
s_picture snippet of that theme.

To do so, a simple check is added when the option computes the next
shape, and looks for the broken path, if it finds it, it corrects it.

Steps to reproduce:
- Use the KEA theme
- Drop the "Picture" snippet
- Drop the text snippet under it
- Enable the background shape option for the text snippet
- The first shape is selected instead of the next one in the series.

To fix properly in master of course.

[1]: https://github.com/odoo/design-themes/commit/88b81d41dadbfaad5d0b36ba2f1c595e309438ba
[2]: https://github.com/odoo/odoo/commit/e985f8ef7a358c5aae9245267e18e65ea8383400

opw-3082292

closes odoo/design-themes#623

X-original-commit: f3bd5ab20b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-27 08:18:47 +01:00
qsm-odoo 2aeedacb60 [REF] theme_common: remove (deprecated) $target uses in public widgets
See community commit for details.

closes odoo/design-themes#618

Related: odoo/enterprise#34343
Related: odoo/odoo#106437
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-24 19:25:08 +01:00
Soukéina Bojabza 4c321782ac [FIX] theme_zap: remove contentenditable property from Masonry image
In [1], in order to allow back the edition of the images of the columns
in grid mode containing only an image, the `contenteditable` property
is removed from these columns.

This commit removes the `contenteditable` property that was set on an
image column of the Masonry snippet in the Zap theme.

[1]: https://github.com/odoo/odoo/pull/103767

opw-3028116

closes odoo/design-themes#617

X-original-commit: 6e285922a1
Related: odoo/odoo#104899
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-03 23:35:12 +01:00
Romain Derie 3c61793056 [FIX] test_themes: call post_copy again on test_themes' themes
Since [1], the themes installed in the `_post_init` hook of test_themes
would not go through the `_post_copy()` anymore.
It is not a big deal as this module purpose is to ease our tests and
quickly being able to navigate through themes when we need to, but still
this is something that need to be fixed as otherwise the themes would
not really reflect how they look like.

Typically, go to the Odoo Experts theme, which is supposed to have the
"Contact" header template, it will not have that header layout.

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

closes odoo/design-themes#615

X-original-commit: fea847977d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-28 16:20:14 +02:00
can-odoo 2ff4b26495 [FIX] theme_bookstore: correct shape data JSON value
Since it was introduced with [1], the bookstore `Price` snippet couldn't
be clicked on.
Indeed, a typo/wrong format inserted inside a `data-oe-shape-data` xpath
was making it crash due to invalid JSON format.

[1]: https://github.com/odoo/design-themes/commit/1f632d8dd79ceba6e152bedcb6de21cd9ada14c0

task-3002630

closes odoo/design-themes#609

X-original-commit: d9bb32b273
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-17 17:11:07 +02:00
Soukéina Bojabza 6c79fc30a7 [IMP] theme_*: remove some snippets hard coded background color
This is the direct following of the PR [1].

Some themes "hard code" the background colors of some snippets, which
prevents the user to change it with a preset color without deleting the
current background first.

This commit does two things:
- remove the problematic hard coded background colors;
- replace the colors that are removed by some themes by the ones that
were set in [1] (for the searchbar and text highlight snippets).

[1]: https://github.com/odoo/odoo/pull/90749

task-2824393

closes odoo/design-themes#604

X-original-commit: 7d193e0560
Related: odoo/odoo#103123
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-11 23:29:11 +02:00
Soukéina Bojabza 628880b71b [IMP] theme_*: adapt some themes to the grid-only Masonry snippet
The Masonry snippet has been modified to be only in grid mode
and its templates have therefore been changed.

This commit adapts the themes that modify the Masonry templates to be
in accordance with these changes.

See community counterpart for details.

task-2973198

closes odoo/design-themes#601

X-original-commit: ef84cdf84d
Related: odoo/odoo#102525
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-06 23:14:30 +02:00
qsm-odoo 0049109fda [FIX] theme_test_custo: do not inherit from we options but website ones
(Otherwise you could impact other apps like mass mailing). In fact this
should have been part of [1] as before you were *required* to inherit
from web_editor.snippet_options as it was t-called inside the website
snippet_options template.

Note: this new test theme was only recently introduced with [2].

[1]: https://github.com/odoo/design-themes/commit/0ce8547d34f08eb5a27329c66e53828e7b039ef1
[2]: https://github.com/odoo/design-themes/commit/0e2497b8e84eab8957028f4d63ff0899a9fe6ab3

closes odoo/design-themes#600

X-original-commit: 4f3b5b9f29
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-06 23:14:11 +02:00
qsm-odoo 0fa75513c3 [REF] theme_test_custo: adapt following options conflicts between apps
See community commit for details.

closes odoo/design-themes#597

Related: odoo/odoo#99850
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-04 17:01:14 +02:00
Benoit Socias 6d48bdf9a5 [FIX] test_themes: patch website switcher template
In [1] when all modules were migrated to the new assets system, the
modules in design themes were forgotten.

This commit puts the owl templates into the correct asset.

[1]: https://github.com/odoo/odoo/commit/5410b7c238f211ced2519e53afc99c8468e1f527

closes odoo/design-themes#596

X-original-commit: 9f579f6400
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-27 17:11:42 +02:00
Benoit Socias f127ff3741 [IMP] theme_*: add precondition on tour to ensure expected theme
This commit adds a precondition to verify the presence of the specific
theme at the beginning of their tour.

See https://github.com/odoo/odoo/pull/100690.

task-2687506

closes odoo/design-themes#594

X-original-commit: 8b377af3a7
Related: odoo/odoo#101119
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-09-26 14:43:17 +02:00
qsm-odoo c95aa445fa [IMP] theme_*: ease defining only one font family to use in a theme
Before this commit, if a theme wanted to define a main font for their
theme and let the "headings", "navbar" and "buttons" ones use the same
they had to add this in their map:

```
'font': XXX,
'headings-font': null,
'navbar-font': null,
'button-font': null,
```

Indeed, without setting the "null" values, those font would use YYY
which is the first font defined in the theme config, which might be
different from XXX. And if forcing XXX 4 times, like most themes do at
the moment, if the user wanted to change them all, he had to change the
4 ones instead of the main one.

Now, only the 'font' value use the first font defined in the theme
config if not explicitly set. So forcing the null values is not
necessary, it will be the default behavior.
The advantage is thus also functional, as most theme forced all their 4
fonts so changing the main one did not change the others.

task-2993054

closes odoo/design-themes#593

X-original-commit: fc64bce81e
Related: odoo/odoo#101068
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-26 11:36:44 +02:00
qsm-odoo a05eb04897 [IMP] theme_test_custo: review website tour utils
See community commit for details.

closes odoo/design-themes#588

Related: odoo/odoo#100024
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-12 17:33:41 +02:00
Romain Derie f4a772bffe [FIX] theme_test_custo: add bigger timeout to the new test
New test was introduced with [1] but it actually sometimes lead to
timeout errors.
That's a common issue since we merged the frontend in the backend and
some tour (like this one) now have to start both the backend and the
frontend (in the iframe).

10 seconds is not enough to load both, it often miss just half a second.

[1]: https://github.com/odoo/design-themes/commit/0e2497b8e84eab8957028f4d63ff0899a9fe6ab3

runbot-4684

closes odoo/design-themes#587

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-09 22:50:02 +02:00
Romain Derie 0e2497b8e8 [IMP] test_themes, theme_test_custo: add new test theme for tests
This commit introduces a new theme for tests purpose.
The goal is to be able to create records and simulate a real use case
without only testing through unit tests in python.
For instance, with this commit, we now fully test:
- menu creation
- page creation
- new header & footer template
- new image shape & background shape

This will be extended later to be able to test other stuff too, maybe
like changing the website logo (not supported yet). Also, our existing
standalone test in themes should use this theme instead of nano to not
rely on a real theme that might change.

Courtesy of NMI as this theme is partly based on his job.

closes odoo/design-themes#586

Related: odoo/odoo#99099
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-07 23:10:56 +02:00
Romain Derie ca449f01f8 [FIX] test_themes: force request's website before _frontend_pre_dispatch
The callstack is:
- _pre_dispatch() (http_routing)
  - super()
  - _frontend_pre_dispatch()
    - super()
      - _frontend_pre_dispatch() (website) -> Set the website on request

But in `test_themes` we were forcing the website in a `_pre_dispatch()`
override, after calling `super()`.
It means that the call to `_frontend_pre_dispatch()` was actually done
without having yet forced the website in session. get_current_website()
would then not consider the `fw` param as not yet in session, and the
request.website would be set to 1, the default one.
Later in the business code, there would be a mismatch between
`request.website` and `get_current_website()`.

closes odoo/design-themes#582

Related: odoo/odoo#98200
Related: odoo/enterprise#30691
Related: odoo/upgrade#3808
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-31 23:50:15 +02:00
Romain Derie 35f4de9674 [FIX] test_themes: fix theme_upgrade standalone test
Ripple option is now an ir.asset, not an ir.ui.view anymore, see [1].

[1]: https://github.com/odoo/odoo/commit/9f56357cc1f4a7b8606ef4d5fd431fc396bdf1e8

closes odoo/design-themes#585

X-original-commit: 96e713a14f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-30 21:25:43 +02:00
Arthur Detroux (ard) fb23f19c1b [IMP] test_themes: (re)add preview to website (themes) switcher
Commit [1] moved the website switcher from the frontend to the backend
and in doing so re-factored it into an OWL component.

Initially, this refactoring broke the theme preview from the previous
widget. This commit re-introduces those previews.

[1]: https://github.com/odoo/design-themes/commit/163a8b6fae0d6709d61af81550d1ad77dfe311c9

task-2687506

closes odoo/design-themes#573

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2022-07-08 19:52:25 +02:00
Odoo's Mergebot 937d1ce897 [MERGE] *: Migrate Bootstrap to version 5.1.3
Migrate Bootstrap to version 5.1.3

some highlights of BS5 changes:
- Browser support: Internet Explorer is definitely gone (Goodbye! We won't miss you) ; not a huge change on the backend as we didn't supported it anymore anyway.
- Bootstrap's Javascript components doesn't use jQuery anymore! A compatibility layer is present but with some quirks, so avoid to use it if possible ; less jQuery is less overhead!
- The color contrast system in BS5 relies directly on WCAG 2.0 contrast algorithm (https://www.w3.org/TR/WCAG20-TECHS/G18.html). Some visual elements (like texts/buttons/...) may have a slightly different contrast than before.
- Background color classes ('bg-') only set the background color and don't change the foreground (aka. text) color anymore. We backported the '.text-bg-' from Bootstrap 5.2 to restore the previous behavior ; or use separate background ('.bg-') and foreground ('.text-') depending on your usecase.
- Media Breakpoint's usage has changed
- More and more CSS utility classes are introduced: use them in your templates instead of adding more custom CSS rules.
- Bootstrap still provides a quite powerful grid system, but please use it as intended by the framework (I'm looking at you '.col' without its parent '.row'). Also while keeping the same API, it was internally changed ; the main issue that you can encounter is that columns no longer apply 'position: relative', which could be solved by adding the '.position-relative' class when needed.
- BS5 doesn't allow to use multiple components on the same element (ie. adding a tooltip on a dropdown). It generates this kind of error: "Bootstrap doesn't allow more than one instance per element.
- Badge usage has changed a bit: '.badge' still exist but is now extended using utility classes (text and background colors, border-radius for pills) instead of specific '.badge-*' classes.
- '.input-group-{append,prepend}' are gone! You can now just add buttons and '.input-group-text' as direct children of the '.input-group'.
- Popover/alert components' close button use the new class '.btn-close'.
- Dropdown: the '.show' class is not added anymore to the parent group of dropdown ; some CSS selectors may still need some love.
- All data attributes of BS5 are now prefixed by 'bs-' (ie. 'data-toggle' is now 'data-bs-toggle').

Bootstrap documentation
https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

closes odoo/design-themes#580

Related: odoo/enterprise#29195
Related: odoo/odoo#95450
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-07-07 13:29:21 +02:00
Romeo Fragomeli 54cca0eaf6 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/design-themes#580
2022-07-07 13:29:20 +02:00
Romeo Fragomeli ac63e031c0 [REF] *: BS5: adapt changes in media query mixin
> Media query mixins parameters have changed for a more logical approach

> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).

https://getbootstrap.com/docs/5.1/migration/#sass

Task ID: 2766483

Part-of: odoo/design-themes#580
2022-07-07 13:29:20 +02:00
Carlos Valverde 5b04bc356b [FIX] theme_avantgarde: fix color variable in some snippets
This commit fixes the previously hardcoded color customisations in theme
Avantgarde's snippets, by using proper color variables, which allow the
snippet customisations to change dynamically.

While theoretically unstable (changing views), this was judged safe
enough for 15.0 (it would require someone to xpath a theme.ir.ui.view in
this specific theme, targeting an inline style to break; and it does not
change the current websites at all (just new dropped snippets)).

closes odoo/design-themes#579

X-original-commit: 65baa9bb4a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-07-01 17:48:02 +02:00
Younn Olivier 163a8b6fae [IMP] test_themes: adapt to website_preview client action
This commit removes the tooltips shown when hovering over a theme in
the website switcher dropdown. This feature will be reimplemented later,
patching the WebsiteSwitcherSystray component.

It also adapts the ?fw= url parameter to force a website id during the
tours.

task-2687506

closes odoo/design-themes#572

Related: odoo/odoo#89223
Related: odoo/enterprise#28448
Related: odoo/upgrade#3464
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-06-24 12:39:29 +02:00
Romain Derie ab4f5e6178 [IMP] test_themes: add a test for the _post_copy() community fix
Now, `_post_copy()` is only called when the module is installed for the
first time on a website, not when the module is updated.

See counterpart commit in community for more details.

opw-2824045

closes odoo/design-themes#571

X-original-commit: 0e324061d1
Related: odoo/odoo#93109
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-08 16:50:59 +02:00
xlu-odoo 3bb934b4e3 [FIX] theme_*: use correct header SCSS variable
This commit fixes the "Contact" header and the "default" header that
were not displaying correctly (in related themes) in the web editor
panel as expected.

task-2713578

closes odoo/design-themes#557

X-original-commit: f403f252bc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-04-05 08:55:32 +02:00
Gorash 93e2ca6de4 [IMP] *: remove _render from ir.ui.view
Follow adaptations made in the render api at odoo/odoo#85110

closes odoo/design-themes#554

Related: odoo/enterprise#24622
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-03-29 10:56:01 +02:00