This question has been flagged

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





Avatar
Discard
Best Answer

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

Avatar
Discard
Author Best Answer

boss i need the solution in openERP 7

Avatar
Discard