[IMP] don't match numbers within the slug, only match numeric runs at the end of it
bzr revid: xmo@openerp.com-20131119095059-yuininxcy0kiz9qh
This commit is contained in:
@@ -26,7 +26,7 @@ class ir_http(orm.AbstractModel):
|
||||
class ModelConverter(ir.ir_http.ModelConverter):
|
||||
def __init__(self, url_map, model=False):
|
||||
super(ModelConverter, self).__init__(url_map, model)
|
||||
self.regex = r'[A-Za-z0-9-_]*?(\d+)'
|
||||
self.regex = r'(?:[A-Za-z0-9-_]+?-)(\d+)$'
|
||||
|
||||
def to_url(self, value):
|
||||
[(_, name)] = value.name_get()
|
||||
|
||||
Reference in New Issue
Block a user