summaryrefslogtreecommitdiff
path: root/addons/website/models/theme_models.py
AgeCommit message (Collapse)Author
2020-12-31[FIX] website_theme_install: not copy fields for theme record templatesqsm-odoo
Themes define records which are used as templates for the creation of base model records on theme installation on a website. E.g. a "theme.ir.attachment" record's purpose is to be a template for an "ir.attachment" record creation on theme installation on a website. Those final records have extra fields to indicate from which theme template they come from. If those records are ever to be duplicated, they should not duplicate those links to the theme templates otherwise it may cause issues when uninstalling/updating a theme (you want the records linked to the theme to be deleted/updated but not the duplicated ones, which do not act differently from user created ones). Duplicate ones will be linked to the website anyway (just like "normal" user created ones) and should only be automatically removed if that website is deleted. The issue is more visible from 14.0 where applying some modifications to images via the editor (crop / filter / optimization / ...) will duplicate the original image before modifying it. closes odoo/odoo#63948 X-original-commit: 890935bbdf924b06b7dabd89802f6dd824159a4b Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: Samuel Degueldre <sad@odoo.com>
2020-08-27[IMP] website: make it easier to enable off-canvas menu in themesqsm-odoo
Part of https://github.com/odoo/odoo/pull/56427 task-2264627
2020-08-27[IMP] website, *: add 'magazine' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627
2020-08-27[IMP] website, *: add 'hamburger full' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'image' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'centered logo' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'boxed' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'minimalist' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'contact' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'slogan' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: add 'sidebar' header templateCocographique
*: website_sale, website_sale_wishlist Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website, *: review existing navbar templates and templates systemCocographique
*: portal, website_sale, website_sale_wishlist Portal-without-website header is now more basic, without the need of a collapsed element. It is then entirely replaced when website is installed with header templates, t-calling all the main parts. Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website: review and improve footer template choicesCocographique
Part of https://github.com/odoo/odoo/pull/56427 task-2264627
2020-08-27[IMP] website, *: add off-canvas and other hamburger menu optionsstefanorigano (SRI)
*: web, portal Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-27[IMP] website: add footer "scroll-to-top" button optionqsm-odoo
Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: stefanorigano (SRI) <sri@odoo.com> Co-authored-by: Cocographique <nmi@odoo.com>
2020-08-27[IMP] website: add ripple effect option for buttonsstefanorigano (SRI)
Part of https://github.com/odoo/odoo/pull/56427 task-2264627 Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-09[REF] website, *: review how available fonts are defined in scssqsm-odoo
*: 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-06-26[FIX] website: fix footer disappearing when switching themeqsm-odoo
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[FIX] website_theme_install: properly reset config on theme changeqsm-odoo
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-02[IMP] website, *: allow color palette selectionqsm-odoo
*: 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-05-19[FIX] website_theme_install, base: fix theme updatefja-odoo
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-03-31[IMP] website: add templates for footerBenjamin Vray
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[IMP] website, *: add templates for headerBenjamin Vray
*: portal Part of https://github.com/odoo/odoo/pull/38950 task-2087641 Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-12-30[FIX] website_theme_install: use correct values for new menu creationDavid Tran
closes odoo/odoo#42486 X-original-commit: 0db925b4ecb63360fa764bc596fb3c0a4c0a63d1 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-12-05[REF] website: call _post_copy with website in the context directlyqsm-odoo
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-11-12[REF] website, *: merge website_theme_install into websiteqsm-odoo
* theme_bootswatch, theme_default, website_theme_install