Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2438 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you Niyas Raphy for you help.

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 23
2914
0
thg 3 25
759
1
thg 12 23
7061
1
thg 3 20
2787
2
thg 5 19
5772