odoo/odoo — pull request #480 by franckbret (2014-06-11 14:43:54+00:00)
Title: Unify website slugify method behavior with or without python-slugify 

When you create a new page a related slug is created.
The website slugify method takes some help from a dedicated python module named 'python-slugify'
Python-slugify is not for now a mandatory odoo dependency, so there is a case when it's not here to build a slug.
The problem is that this slug is not generated the same way depending on 'python-slugify' presence. These patch purpose a solution to address this.

Impacted versions:

7.0 and above

Steps to reproduce:

BE SURE TO NOT HAVE 'python-slugify' in your python project path
Create a page with a title containing caps and special chars, for example "Do YOU know 'Martine à la plage' ?"
Click continue

Current behavior:

The generated slug looks like "Do-YOU-know-Martine--la-plage-"
That's quite bad for an url slug pattern...

Expected behavior:
The result should be the same as with python-slugify
"do-you-know-martine-a-la-plage"

I've also add some unit tests in order to ensure that behavior are exactly the same with or without 'python-slugify'
Hope in a nearly future 'python-slugify' will be marked as mandatory dependency. It does the job quite well, so it's not necessary to mock it's behavior.