Odoo Help

Welcome!

This community 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.

0

what is the different between _render() and render() method in openerp

By
Dasadiya Chaitanya
on 3/24/14, 10:00 AM 1,514 views

Below code from the website module in models dir contain website.py file

def _render(self, cr, uid, ids, template, values=None, context=None): # TODO: remove this. (just kept for backward api compatibility for saas-3) return self.pool['ir.ui.view'].render(cr, uid, template, values=values, context=context)

def render(self, cr, uid, ids, template, values=None, status_code=None, context=None):
    # TODO: remove this. (just kept for backward api compatibility for saas-3)
    return request.render(template, values, uid=uid)

Explain above two method and how it works in website module ..?? and website_mail module use this in controller and return the

return request.website.render("website_mail.designer_index", values) AND return request.website._render('website_mail.email_designer_snippets')

what is the difference for in website_mail module

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/24/14, 10:00 AM
Seen: 1514 times
Last updated: 3/16/15, 8:10 AM