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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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...
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 2 21
|
11105 | ||
|
4
thg 5 16
|
7691 | ||
|
0
thg 3 15
|
3254 | ||
|
1
thg 3 15
|
3756 | ||
|
1
thg 3 15
|
7586 |