[IMP] http_routing: use converter defined in the module

Otherwise, the slug part of route can be used only when website is installed.
This commit is contained in:
Jérome Maes
2017-08-16 14:56:43 +02:00
parent f9827cb5b4
commit fe5fa6973c
2 changed files with 10 additions and 1 deletions
+10
View File
@@ -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([])
-1
View File
@@ -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