Before this commit, this was done:
1) Primary variables (app order):
(a) web_editor: define palettes (color + theme + gray), only 1 empty
one. Mark the first ones as the selected ones.
(b) website: fill all defined palettes with the website-related
color key and values (body, menu, logo-height, etc).
+ define "website values" palette.
2) Secondary variables (reverse app order):
(c) website: merge the user palettes on top of the selected palettes
(so user values overriding values added in (a) and (b)),
the resulting palettes are added in palettes lists and the
selected palette numbers are set to select those ones.
+ final selection of "website values" palette.
(d) web_editor: final selection of the selected color palette amongst
the color palettes.
--
The problem with all of this is that the definition of palettes
in themes (occuring between step (b) and (c)) never received the
website-related color key and values of step (b) and were thus forced
to redefine all of those by themself even if they wanted to use the
default website one.
This commit changes the system so that step (a) and (b) now define
"base" palettes (color, theme, gray, website values) and step (c) and
(d) now merge the final selected palettes with those "base" palettes.
This is in fact theoratically more efficient and allows to not force
themes to define every possible palette value we might introduce.
closesodoo/odoo#47097
Related: odoo/design-themes#216
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>