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

please help me , 

I am working on qweb report but i need to get name of my company to show the proper header and footer please help me this urgent issue 

thank you so much

아바타
취소
베스트 답변

I your xml, call the template for getting the company name by using the following method:

        <template id="report_session">
            <t t-call="report.html_container">
                <t t-foreach="docs" t-as="doc">
                    <t t-call="report.external_layout">

                         -------------------

                         ------------------------

                          ------------------
                    </t>
                </t>
            </t>
        </template>

In reports/views/layouts.xml:

<template id="external_layout">
    <!-- Multicompany -->
    <t t-if="o and 'company_id' in o">
        <t t-set="company" t-value="o.company_id"></t>
    </t>
    <t t-if="not o or not 'company_id' in o">
        <t t-set="company" t-value="res_company"></t>
    </t>

    <t t-call="report.external_layout_header" />
    <t t-raw="0" />
    <t t-call="report.external_layout_footer" />
</template>

아바타
취소

thanks @vasanth, this code fully work..give +1 vote from me.

ok.sounds good...

관련 게시물 답글 화면 활동
2
2월 21
11192
4
5월 16
7811
0
3월 15
3358
1
3월 15
3808
1
3월 15
7683