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

Hi every one, 

how can i add new custom external layout that i will call it on reports  like we use web.external_layout ? is this possible ?

아바타
취소
베스트 답변

Hi,

Yes it is possible, just copy the web.external_layout from the web module, by searching id="external_layout", you can get the layout, paste it inside your custom module, do the changes you need and the new layout is ready.

Now to call this layout in reports, just use module_name.id_of_new_layout


Thanks

아바타
취소
작성자

Thank you Niyas Raphy for you help.

베스트 답변

Hi if you need to change the current custom layout of the odoo. You can inherit the current external layout template in your custom module, replace the main div, and add the customization inside it 

example:

<odoo>
    <template id="inherit_external_layout"
inherit_id="web.external_layout">
        <xpath expr="//div"
               position="replace">

               

               // Add your custom codes here

            

       </xpath>

    </template>

</odoo>


Hope it helps

아바타
취소
작성자

What i want is to create new one and call it as we use web.external_layout ,
I create new one but i got always duplication of the template. I want to replace the external_layout with new one without calling the default one. Thanks

관련 게시물 답글 화면 활동
1
4월 23
3017
0
3월 25
842
1
12월 23
7150
1
3월 20
2886
2
5월 19
5870