From 1efdb96227dab8f1b3bcb8e8854dbad5dd874e69 Mon Sep 17 00:00:00 2001 From: "Antoine (anso)" Date: Fri, 20 Jan 2023 14:30:19 +0000 Subject: [PATCH] [IMP] website_customer: layout improvements The structure of this module was adapted as it was broken and not appealing: - Text alignments and font sizes were improved - Card structure instead of a list - Filters and search are now grouped on top and take less space in the page A specific mobile view for the filters was implemented off canvas as the current one was not optimized. All these changes were made to make this module more consistent with the rest of the front-end modules. The option to show the map is now visible/not visible depending on if the database contains a google maps API task-3083706 Part-of: odoo/odoo#109752 --- addons/website_customer/models/res_partner.py | 4 +- addons/website_customer/views/snippets.xml | 12 +- .../views/website_customer_templates.xml | 374 +++++++++++------- 3 files changed, 243 insertions(+), 147 deletions(-) diff --git a/addons/website_customer/models/res_partner.py b/addons/website_customer/models/res_partner.py index 24592b3965b..61a5556fc19 100644 --- a/addons/website_customer/models/res_partner.py +++ b/addons/website_customer/models/res_partner.py @@ -22,12 +22,12 @@ class Tags(models.Model): @api.model def get_selection_class(self): - classname = ['default', 'primary', 'success', 'warning', 'danger'] + classname = ['light', 'primary', 'success', 'warning', 'danger'] return [(x, str.title(x)) for x in classname] name = fields.Char('Category Name', required=True, translate=True) partner_ids = fields.Many2many('res.partner', 'res_partner_res_partner_tag_rel', 'tag_id', 'partner_id', string='Partners') - classname = fields.Selection('get_selection_class', 'Class', default='default', help="Bootstrap class to customize the color", required=True) + classname = fields.Selection('get_selection_class', 'Class', default='light', help="Bootstrap class to customize the color", required=True) active = fields.Boolean('Active', default=True) def _default_is_published(self): diff --git a/addons/website_customer/views/snippets.xml b/addons/website_customer/views/snippets.xml index c21fd8955e6..a524999ab69 100644 --- a/addons/website_customer/views/snippets.xml +++ b/addons/website_customer/views/snippets.xml @@ -3,7 +3,7 @@ diff --git a/addons/website_customer/views/website_customer_templates.xml b/addons/website_customer/views/website_customer_templates.xml index ee5310d7e46..4dc17b59071 100644 --- a/addons/website_customer/views/website_customer_templates.xml +++ b/addons/website_customer/views/website_customer_templates.xml @@ -4,66 +4,163 @@ - + @@ -146,18 +249,12 @@
-
+
-
- + - -
-
@@ -177,38 +274,31 @@