Odoo Help

0

how to render a template from a controller in open ERP7

By
krishna
on 9/8/17, 8:44 AM 150 views

This is my requirement "onclick on some external url(for eg http:\\localhost:8069\referral\appl)  it has to open application screen."I am doing this in openErp7

i am trying with controllers,

but how to call/render/redirect to a application template(.xml) in controller?

fill the application and how to submit it back to the controller?

Is there any better way, please provide your solutions.

Thank you





0
Annadurai
On 9/8/17, 9:07 AM

Hello!

Below code is a layout   

 in py

from werkzeug import url_encode

       final_url = "/render/redirect"

         return {

            'type': 'ir.actions.act_url',

            'url': final_url,

            'nodestroy': True,

            'target': 'self'

        }

in controller
from odoo import http
from odoo.http import request

    @http.route(['/render/redirect'], type='http', auth='public')
    def test(self, **post):
    # Your functions here
    post.values({'name':''})
    return request.render("module_name.xml_id", values)    


The xml id calls templates. 
for more info refer website_sale module in odoo addons

0
krishna
On 9/8/17, 9:12 AM

boss i need the solution in openERP 7

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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 9/8/17, 8:44 AM
Seen: 150 times
Last updated: 9/11/17, 1:48 AM