From fe8680941ad4855f0b81bb6ea8391fb26583fab3 Mon Sep 17 00:00:00 2001 From: Thomas Pot Date: Wed, 3 Jun 2026 15:32:18 +0200 Subject: [PATCH] [NEW] Automatic install mailhog. Mailhog integration in Odoo --- mailcatcher_menu/controllers/controllers.py | 9 ++------- mailcatcher_menu/security/ir.model.access.csv | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mailcatcher_menu/controllers/controllers.py b/mailcatcher_menu/controllers/controllers.py index c633bfa..4d06ad4 100644 --- a/mailcatcher_menu/controllers/controllers.py +++ b/mailcatcher_menu/controllers/controllers.py @@ -14,13 +14,8 @@ MAILHOG_BASE = "http://localhost:8025" class MailcatcherProxy(http.Controller): - @http.route('/mailcatcher', type='http', auth='user', website=False) - def mailcatcher_index(self, **kw): - """Redirect to the MailHog UI index page.""" - return request.redirect('/mailcatcher/') - - @http.route('/mailcatcher/', type='http', auth='user', - website=False, csrf=False) + @http.route(['/mailcatcher', '/mailcatcher/'], + type='http', auth='user', website=False, csrf=False) def mailcatcher_proxy(self, subpath='', **kw): """Proxy requests to the local MailHog instance.""" target_url = f"{MAILHOG_BASE}/{subpath}" diff --git a/mailcatcher_menu/security/ir.model.access.csv b/mailcatcher_menu/security/ir.model.access.csv index 9b588f7..1849ee3 100644 --- a/mailcatcher_menu/security/ir.model.access.csv +++ b/mailcatcher_menu/security/ir.model.access.csv @@ -1,3 +1,2 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_mailcatcher_menu_mailcatcher_menu","mailcatcher_menu.mailcatcher_menu","model_mailcatcher_menu_mailcatcher_menu","base.group_user",1,1,1,1 "access_mailcatcher_install_warning_wizard","mailcatcher.install.warning.wizard","model_mailcatcher_install_warning_wizard","base.group_user",1,1,1,1