[FIX] website_blog: content post process: forgotten the unicity of paragraph tagging

bzr revid: tde@openerp.com-20140403115122-wuk65a5ua7ewqzz7
This commit is contained in:
Thibault Delavallée 2014-04-03 13:51:22 +02:00
parent 8f105b6624
commit 271e43c3ed
1 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,9 @@ class BlogPost(osv.Model):
if not node.tag in tags:
continue
ancestor_tags = [parent.tag for parent in node.iterancestors()]
ancestor_tags.pop()
if ancestor_tags:
ancestor_tags.pop()
ancestor_tags.append('counter_%s' % counter)
new_attribute = '/'.join(reversed(ancestor_tags))
old_attribute = node.get(attribute)
node.set(attribute, new_attribute)