콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5183 화면

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

아바타
취소
작성자 베스트 답변

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>

아바타
취소