summaryrefslogtreecommitdiff
path: root/addons/website
diff options
context:
space:
mode:
authorCocographique <nmi@odoo.com>2020-07-30 15:34:59 +0000
committerXavier-Do <xdo@odoo.com>2020-08-27 17:07:34 +0000
commitb4866d192e6f4fdfba15b65fa2c209b35b7eb8c0 (patch)
tree42bd8a29d4cb3de59c6ee046d6309348081e8d01 /addons/website
parentc93bd93014685dd532d2244aece6bfeec9562b7a (diff)
[IMP] portal, website: review sign in templates
Move it in an external view to be able to place it at a different location depending on the header template. Part of https://github.com/odoo/odoo/pull/56427 task-2264627
Diffstat (limited to 'addons/website')
-rw-r--r--addons/website/tests/test_views.py8
-rw-r--r--addons/website/views/snippets/snippets.xml2
-rw-r--r--addons/website/views/website_templates.xml2
3 files changed, 6 insertions, 6 deletions
diff --git a/addons/website/tests/test_views.py b/addons/website/tests/test_views.py
index 2c0c1930bcc..f07dfa898ee 100644
--- a/addons/website/tests/test_views.py
+++ b/addons/website/tests/test_views.py
@@ -1024,7 +1024,7 @@ class Crawler(HttpCase):
})
self.inherit_view.write({'name': 'Main layout', 'key': '_website.layout'})
- self.inherit_view.copy({'name': 'Show Sign In', 'customize_show': True, 'key': '_portal.portal_show_sign_in'})
+ self.inherit_view.copy({'name': 'Sign In', 'customize_show': True, 'key': '_portal.user_sign_in'})
view_logo = self.inherit_view.copy({
'name': 'Show Logo',
'inherit_id': self.inherit_view.id,
@@ -1078,7 +1078,7 @@ class Crawler(HttpCase):
self.assertEqual(
[v['name'] for v in res],
- ['Show Sign In', 'Affix Top Menu', 'Show Logo', 'Filters', 'Photos', 'Quotes', 'Filter by Category', 'Filter by Country'],
+ ['Sign In', 'Affix Top Menu', 'Show Logo', 'Filters', 'Photos', 'Quotes', 'Filter by Category', 'Filter by Country'],
"Sequence should not be taken into account for customize menu",
)
self.assertEqual(
@@ -1117,7 +1117,7 @@ class Crawler(HttpCase):
res = response.json()['result']
self.assertEqual(
[v['name'] for v in res],
- ['Show Sign In', 'Affix Top Menu', 'Show Logo', 'Filters', 'Photos', 'Quotes', 'Filter by Category', 'Filter by Country'],
+ ['Sign In', 'Affix Top Menu', 'Show Logo', 'Filters', 'Photos', 'Quotes', 'Filter by Category', 'Filter by Country'],
"multi-website COW should not impact customize views order (COW view will have a bigger ID and should not be last)",
)
self.assertEqual(
@@ -1152,7 +1152,7 @@ class Crawler(HttpCase):
res = response.json()['result']
self.assertEqual(
[v['name'] for v in res],
- ['Show Sign In', 'Affix Top Menu', 'Show Logo', 'Filters', 'Photos', 'Quotes', 'Filter by Category', 'Filter by Country'],
+ ['Sign In', 'Affix Top Menu', 'Show Logo', 'Filters', 'Photos', 'Quotes', 'Filter by Category', 'Filter by Country'],
"multi-website COW should not impact customize views order (COW view will have a bigger ID and should not be last) (2)",
)
self.assertEqual(
diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml
index aca5e60ce5d..a0884d0d570 100644
--- a/addons/website/views/snippets/snippets.xml
+++ b/addons/website/views/snippets/snippets.xml
@@ -528,7 +528,7 @@
data-selector="#wrapwrap > header"
data-no-check="true"
groups="website.group_website_designer">
- <we-checkbox string="Sign In" data-customize-website-views="portal.portal_show_sign_in" data-reload="/"/>
+ <we-checkbox string="Sign In" data-customize-website-views="portal.user_sign_in" data-reload="/"/>
<we-colorpicker string="Colors"
data-customize-website-color="" data-color="menu"
data-with-combinations="true"/>
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index ae91cfa72ee..9ec0821635a 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -134,7 +134,7 @@
<xpath expr="//header//ul[@id='top_menu']" position="attributes">
<attribute name="class" separator=" " add="o_menu_loading" remove="text-right ml-auto"/>
</xpath>
- <xpath expr="//header//ul[@id='top_menu']/t[@t-call='portal.user_dropdown']" position="before">
+ <xpath expr="//header//ul[@id='top_menu']/t[@t-call='portal.placeholder_user_sign_in']" position="before">
<t t-foreach="website.menu_id.child_id" t-as="submenu">
<t t-call="website.submenu">
<t t-set="item_class" t-value="'nav-item'"/>