Help

6

How To redirect from front end to backend.??

Avatar
Annadurai

if i click a button in odoo web then it should be able to redirect to backend (eg:sale.order)

<template id="authorize_s2s_form_1" inherit_id="payment_authorize.authorize_s2s_form"> <xpath expr="//button[@t-att-class='submit_class']" position="before"> <button name="back_method_sale" type="submit" > <a class="btn btn-danger btn-xs" t-att-href="'/web#id=%s&amp;view_type=form&amp;model=sale.order&amp;menu_id=%s&amp;action=%s&amp;' % (partner_id, %(sale.menu_sale_order)d, %(sale.action_orders)d, ) ">Back to SO</a> </button> </xpath> </template>


Actually, the above code works fine in Chrome, but its not works in firefox.. 

Avatar
Discard
1 Answer
4
Avatar
Annadurai
Best Answer

I Found the solution for my case

<a class="btn btn-danger"

                            t-att-href="'/web#return_label=Website&amp;model=%s&amp;id=%s&amp;action=%s&amp;view_type=form' % (model, id, action)">

                            <span class="fa fa-long-arrow-left" />

                            Back

                        </a>

Avatar
Discard