[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:
@@ -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([])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user