Commit Graph
10 Commits
Author SHA1 Message Date
qsm-odoo 7be1429656 [REF] website, *: review how available fonts are defined in scss
*: web, web_editor

Instead of three lists + one map to define font information and user
choices saved as the index of the related fonts in those lists, the
fonts are now stored in an unique map <font-name> -> <data> and the
user choices are saved as the font name. This allow to have a visually
better definition of the fonts and allows to reorder fonts in the UI
without losing user customization (and actually simplify some code).

Unfortunately any user font customization < 14.0 will be lost, but this
is a small price to pay (users can still rechoose the same font in the
editor UI where they will go anyway to discover all the new shiny
features we are introducing there).

Part of https://github.com/odoo/odoo/pull/54065
task-2291398

closes odoo/odoo#54065

Related: odoo/design-themes#269
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-09 18:09:59 +00:00
qsm-odoo 4e5c4ab9eb [FIX] website: fix footer disappearing when switching theme
When a theme was chosen, the footer disappeared if any footer template
different from the default one was previously selected. The related
code is actually meant to revert back to the default footer template
when switching theme (allowing the theme to set a different default one
if it chooses to), but it forgot to enable that default one... and was
only disabling all non-default footer templates.

closes odoo/odoo#53762

X-original-commit: 9f5c630768cbcf56aec97ba4296f90f3d7fbfa5b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-26 16:14:04 +00:00
qsm-odoo f7ff02b0fb [FIX] website_theme_install: properly reset config on theme change
Before this commit, some code was resetting some default website config
on theme change.

Problem 1:
This was not done when *removing* a theme. Thus when you wanted to go
back to a default website theme, you were not properly reset to the
default theme config. This could actually crash: some themes define
more fonts than others; so if you selected font 13 in one theme then
removed the theme, the default one would crash if not properly reset
as font 13 would not exist.

Problem 2:
It was done for every theme dependency, making theme change slower for
no reason.

Problem 3 (theorically, not tested):
The current code worked by chance as it called the website
'make_scss_customization' method without giving any website to it. It
actually worked by fallback on the right website in normal user cases
(user in the context of installing a theme on a specific website) but
may not be working when trying to install a theme on a different website
calling those functions from custom code.

Now, a dedicated method is there for config reset and is called at the
correct place with the right website in the context.

closes odoo/odoo#53743

X-original-commit: 7307d696449ea2b7a231b0b9087e64f6bbf65d26
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-26 14:00:44 +00:00
qsm-odoo e505ed2833 [IMP] website, *: allow color palette selection
*: web_editor

Note: on color palette change, all the colors of the user are reset and
he is warned about it.

Part of https://github.com/odoo/odoo/pull/52224
task-2197038
2020-06-02 15:29:33 +00:00
fja-odoo 1eb7c577ec [FIX] website_theme_install, base: fix theme update
When a theme module is updated the changes made on a view are considered
as user changes, prenventing the view from being updated in the future.

Fixed by comparing the arch being written with the arch of the original
view. If it is the same the record should not be noupdate.
Plus added a test to make sure the theme views receive theme updates
after being updated once.

Introduced by: https://github.com/odoo/odoo/commit/4acf177b4c55f3a16362cbeafea3d332ef4fe819

closes odoo/odoo#51557

X-original-commit: 221470ab9c9eda3f3a4e2da0fa1a7bb23d6288cc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-19 15:42:55 +00:00
Benjamin Vrayandqsm-odoo 5ba817c453 [IMP] website: add templates for footer
Also remove all t-fields from footers to have only static contents in
footers. For social links, a controller is added so that a "static url"
/website/social/xxx always redirect to the correct set URL for the given
xxx social network.

Part of https://github.com/odoo/odoo/pull/38950
task-2087641

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-03-31 18:16:08 +00:00
Benjamin Vrayandqsm-odoo cb20435069 [IMP] website, *: add templates for header
*: portal

Part of https://github.com/odoo/odoo/pull/38950
task-2087641

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-03-31 18:16:08 +00:00
David Tran f61ea1c38c [FIX] website_theme_install: use correct values for new menu creation
closes odoo/odoo#42486

X-original-commit: 0db925b4ecb63360fa764bc596fb3c0a4c0a63d1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-30 13:14:29 +00:00
qsm-odoo 322d5768a7 [REF] website: call _post_copy with website in the context directly
Before this commit, the website was given as a parameter of the
_post_copy function which is called after theme install. It was then
transfered through the context when calling the theme sub' post_copy
function.

It makes actually more sense to directly call the _post_copy function
with the right website in the context instead of a parameter. This will
also allow to call enable_view/disable_view in the default post_copy
common to all theme, with the right website.

closes odoo/odoo#41312

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-12-05 16:32:39 +00:00
qsm-odoo 88e910e187 [REF] website, *: merge website_theme_install into website
* theme_bootswatch, theme_default, website_theme_install
2019-11-12 15:53:13 +00:00