From fe5fa6973cc8ae3dc4d2779ba619b3bf76a2ca7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Fri, 11 Aug 2017 11:58:49 +0200 Subject: [PATCH] [IMP] http_routing: use converter defined in the module Otherwise, the slug part of route can be used only when website is installed. --- addons/http_routing/models/ir_http.py | 10 ++++++++++ addons/portal/models/mail_message.py | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/addons/http_routing/models/ir_http.py b/addons/http_routing/models/ir_http.py index 93015232b54..f9e6959e8d7 100644 --- a/addons/http_routing/models/ir_http.py +++ b/addons/http_routing/models/ir_http.py @@ -178,6 +178,16 @@ class IrHttp(models.AbstractModel): rerouting_limit = 10 + @classmethod + def _get_converters(cls): + """ Get the converters list for custom url pattern werkzeug need to + match Rule. This override adds the website ones. + """ + return dict( + super(IrHttp, cls)._get_converters(), + model=ModelConverter, + ) + @classmethod def _get_languages(cls): return request.env['res.lang'].search([]) diff --git a/addons/portal/models/mail_message.py b/addons/portal/models/mail_message.py index 6a242609d14..4a5d1f804d9 100644 --- a/addons/portal/models/mail_message.py +++ b/addons/portal/models/mail_message.py @@ -13,7 +13,6 @@ class MailMessage(models.Model): 'id', 'body', 'date', 'author_id', 'email_from', # base message fields 'message_type', 'subtype_id', 'subject', # message specific 'model', 'res_id', 'record_name', # document related - 'website_published', ]) @api.multi