Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Josse (THJO) d0b8f88710 [IMP] theme_test_custo: update js import
This commit updates the js import for ImageShapeOptionPlugin as it was moved
from website to html_builder in: odoo/odoo#215136.

task-4247642

closes odoo/design-themes#1109

X-original-commit: 823975f973
Related: odoo/odoo#217401
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Thomas Josse (thjo) <thjo@odoo.com>
2025-07-04 06:55:56 +00:00
Serge Bayet (seba) e78bd3fbbb [REF] website: convert default images to WebP format
This commit switches the default image format from JPEG to WebP for all
design-themes images. WebP offers superior compression compared to JPEG,
resulting in smaller file sizes and faster website loading times.
Additionally, this change helps avoid warnings from performance tools
regarding image optimization.

See also: odoo/odoo#168862

task-3167548

closes odoo/design-themes#805

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2025-07-01 06:52:49 +00:00
Hubert Van De Walle b8b7faf51e [FIX] theme_test_custo: correct tour trigger to look for svg images
Since [1], the test "test_01_menu_hierarchies" fails.

Note that the check is not as strong as before as we cannot check the
source of the image.

Since [2], the btn-primary is now btn-secondary
---

[1]: https://github.com/odoo/odoo/commit/3cc5ff6e96493f2b068090f880987def3787895e
[2]: https://github.com/odoo/odoo/commit/eca4d1b1d4ea58959793b0a2cbfa443308759372

runbot-226641

closes odoo/design-themes#1102

Signed-off-by: Robin Lejeune (role) <role@odoo.com>
2025-06-25 06:25:11 +00:00
Louis (loco) bcb3f3718a [FIX] theme_test_custo: rename wrong template
[1] adapted the code to work with the new website builder (introduced by
[2]). The problem is that since [3], some templates have been renamed
and `html_builder.FooterTemplateOption` became
`website.FooterTemplateOption`. The commit changes the occurrence of
`html_builder.FooterTemplateOption` into `website.FooterTemplateOption`
in `design-themes`.

[1]: https://github.com/odoo/design-themes/commit/0ce1455aac7d95154b92daa98fb8ffbf27d12f1a
[2]: https://github.com/odoo/odoo/commit/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2
[3]: https://github.com/odoo/odoo/commit/f32212f6a4e1c9915791a5d4d63a57bbcb40ac61

runbot-226494

closes odoo/design-themes#1097

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2025-06-05 19:33:55 +00:00
Louis (loco) 0ce1455aac [FIX] theme_test_custo: adapt design themes to the new website builder
Since [this commit], the website builder has been rewritten. Due to it,
`we-` options are deprecated. This commit adapts all the `xpath` to old
options into the new way of doing. This commit also adapts the
`theme_menu_hierarchies` tour for it to work with the new builder.

[this commit]: https://github.com/odoo/odoo/commit/9fe45e2b7ddbbfd0445ffe25a859e67a316d02b2

Related to task-4367641
runbot-223813
runbot-223815

closes odoo/design-themes#1087

Related: odoo/odoo#211725
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2025-06-04 14:49:05 +00: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
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