I want to update qweb code by py file. is it possible?
The Requirement is, I am creating web page for diffenrt uses like example-
i am creating blank web pages when user is creating in odoo.all users have personal web page.
if 1)Jiten puts head line in web page "welcome to my page" on http://localhost:8069/page/jiten-gmail-com
2)manali puts head line in web page "Coming soon" on http://localhost:8069/page/manalishah343-gmail-com
all this should be done by coding in py file, not by in xml code ,becuase user can change his message in odoos form textbox any time,user will not edit his webpage directly from odoo website editor.
it is possible to update tags in qweb by python py file coding?
You could have template pages(in xml) that you could copy to create the new ones and use a model field for those pages that allow you to edit the message in the backend and in the website frontend use the value of the model field as output for a tag. The thing is that you don't need to build the page using code, you just need to evaluate the template in the rendering fase using different values for each user own data. You need to create a controller to retrieve the user data for the page as pass it to the rendering of the template
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/13/16, 8:35 AM|
|Seen: 353 times|
|Last updated: 3/22/16, 1:55 PM|