Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM
|
e-Commerce
|
Accounting
|
Inventory
|
PoS
|
Project management
|
MRP
|
etc.
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))
return res
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)
So you are unable to change the Blog Post URL without overriding this function...
Not really, the url is defined by routes! So if you change routes (used for dispatch) you need to change this function according to the new routes. This function is used usually to link the backend and the frontend.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 3/17/16, 6:27 PM |
Seen: 1349 times |
Last updated: 3/18/16, 3:59 PM |