diff --git a/addons/community_portal/controllers/portal.py b/addons/community_portal/controllers/portal.py index 23bb14f..452b0e6 100644 --- a/addons/community_portal/controllers/portal.py +++ b/addons/community_portal/controllers/portal.py @@ -48,6 +48,16 @@ class CommunityPortalDashboard(CustomerPortal): return values + @http.route(['/my', '/my/home'], type='http', auth='public', website=True) + def home(self, **kw): + # Core declares these auth='user', which on this Odoo build returns a + # 500 for anonymous visitors instead of redirecting to login (see + # community_classifieds' _redirect_to_login_if_public). "Member Login" + # links point here, so check auth ourselves. + if request.env.user._is_public(): + return request.redirect('/web/login?redirect=/my') + return super().home(**kw) + @http.route(['/my/school'], type='http', auth='public', website=True) def portal_my_school(self, **kwargs): if request.env.user._is_public(): diff --git a/addons/tncsc_deployment/__manifest__.py b/addons/tncsc_deployment/__manifest__.py index ac01fec..a62e4f9 100644 --- a/addons/tncsc_deployment/__manifest__.py +++ b/addons/tncsc_deployment/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'TNCSC Deployment', - 'version': '19.0.1.1.0', + 'version': '19.0.1.2.0', 'category': 'Hidden', 'summary': 'Tamil Nadu Cultural Society of Canada - client configuration for the Community OS suite', 'description': """ diff --git a/addons/tncsc_deployment/migrations/19.0.1.2.0/pre-migrate.py b/addons/tncsc_deployment/migrations/19.0.1.2.0/pre-migrate.py new file mode 100644 index 0000000..61fb7b4 --- /dev/null +++ b/addons/tncsc_deployment/migrations/19.0.1.2.0/pre-migrate.py @@ -0,0 +1,18 @@ +"""Reload the seeded website pages from views/website_pages.xml. + +That file is noupdate="1" so edits made in the website editor survive +upgrades, but it also means upgrades never deliver template fixes (here: +broken and placeholder links). Loading it once in 'init' mode rewrites the +existing page views. Any website-editor changes to these pages are +overwritten by this upgrade. + +Runs before the module's data is loaded so the header overrides in +views/website_header_overrides.xml are validated against current pages. +""" +from odoo import SUPERUSER_ID, api +from odoo.tools import convert_file + + +def migrate(cr, version): + env = api.Environment(cr, SUPERUSER_ID, {}) + convert_file(env, 'tncsc_deployment', 'views/website_pages.xml', {}, mode='init', noupdate=True) diff --git a/addons/tncsc_deployment/views/website_header_overrides.xml b/addons/tncsc_deployment/views/website_header_overrides.xml index e8315a5..cd05db0 100644 --- a/addons/tncsc_deployment/views/website_header_overrides.xml +++ b/addons/tncsc_deployment/views/website_header_overrides.xml @@ -129,5 +129,84 @@ + + + + + + diff --git a/addons/tncsc_deployment/views/website_pages.xml b/addons/tncsc_deployment/views/website_pages.xml index e61dff0..86b4c57 100644 --- a/addons/tncsc_deployment/views/website_pages.xml +++ b/addons/tncsc_deployment/views/website_pages.xml @@ -356,7 +356,7 @@ Tamil Class Contact - + View Event @@ -431,7 +431,8 @@ Unity & Pride
- + + Book Now
@@ -652,14 +653,14 @@
- All + All
- Event + Event
@@ -725,7 +726,8 @@
- + + Book Now
@@ -836,13 +838,13 @@
- - -
@@ -1168,7 +1170,7 @@ Tamil Class Contact - + View Event @@ -1226,7 +1228,7 @@

- Learn More + Contact Us
@@ -1342,13 +1344,13 @@
- - -
@@ -1655,7 +1657,7 @@ Tamil Class Contact - + View Event @@ -1759,13 +1761,13 @@
- - -
@@ -2105,7 +2107,7 @@ Tamil Class Contact - + View Event @@ -2202,13 +2204,13 @@
- - -
@@ -2540,7 +2542,7 @@ Tamil Class Contact - + View Event @@ -2618,13 +2620,13 @@
- - -
@@ -2948,7 +2950,7 @@ Tamil Class Contact - + View Event @@ -3062,7 +3064,7 @@
- + Become A Member
@@ -3096,13 +3098,13 @@
- - -
@@ -3464,7 +3466,7 @@ Tamil Class Contact - + View Event @@ -3651,13 +3653,13 @@
- - -
@@ -3996,7 +3998,7 @@ Tamil Class Contact - + View Event @@ -4033,7 +4035,8 @@ $0.00 – $30.00

- + + Register Event
@@ -4070,13 +4073,13 @@
- - -
@@ -4348,7 +4351,7 @@ Contact
- + View Event
@@ -4460,8 +4463,9 @@
- - Add To Cart + + + Register Now
@@ -4496,13 +4500,13 @@
- - -
@@ -4803,7 +4807,7 @@ Tamil Class Contact - + View Event @@ -4956,13 +4960,13 @@
- - -
@@ -5319,7 +5323,7 @@ Tamil Class Contact - + View Event @@ -5464,13 +5468,13 @@
- - -