[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:
Xavier Morel
2013-11-19 10:50:59 +01:00
parent 4ba5cad0e3
commit bc313dc6ee
+1 -1
View File
@@ -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()