The website_url field determines the URL of each Blog Post.
It is defined in the model website.published.mixin as a functional field using the function _website_url to get the value.
Functional fields are managed by Odoo, and not designed to be edited by users.
The blog.post model overrides _website_url and provides a new function:
def _website_url(self, cr, uid, ids, field_name, arg, context=None):
res = super(BlogPost, self)._website_url(cr, uid, ids, field_name, arg, context=context)
for blog_post in self.browse(cr, uid, ids, context=context):
res[blog_post.id] = "/blog/%s/post/%s" % (slug(blog_post.blog_id), slug(blog_post))
So you are unable to change the Blog Post URL without overriding this function.
Note: slug is a Python function that "slugifies" strings (returns a safe unicode human readable version of string suitable for forming a URL)
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/17/16, 6:27 PM|
|Seen: 578 times|
|Last updated: 3/18/16, 3:59 PM|