Skip to Content
Menu
This question has been flagged
1 Reply
1423 Views

Hi, Everyone
I'm newbee and i'm having a problem about Report in Odoo. i created 2 files xml (patient_card.xml and footer_layout.xml).

*patient_card.xml:

<template id="report_list">    

<t t-call="web.html_container">    

<t t-call="Equipment_Management.external_layout_footer">    

<div class="page"> 

 <style type="text/css"> 

 .table { 

 font-size: 15px; 

 } 

 .table, th, td { 

 border: 1px solid black !important; 

 }
 </style>       

 <table class="table">            

<tr>                

<th>Equipment ID</th>                

<th>Equipment Name</th>                

<th>Category</th>                

<th>Amount</th>                

<th>Assign Date</th>               

 <th>Center Name</th>                

<th>Serial_Number</th>            

</tr>           

 <t t-foreach="docs" t-as="o">             

 <tr>                

<td><t t-esc="o.equipment_id" /></td>                

<td><t t-esc="o.name" /></td>                

<td><t t-esc="o.category_id.name" /></td>                

<td><t t-esc="o.amount" /></td>               

 <td><t t-esc="o.assign_date" /></td>                

<td><t t-esc="o.center.name" /></td>                

<td><t t-esc="o.serial_number" /> </td>           

 </tr>            

</t>        

</table>        

</div>       

 </t>    

</t>

</template>


*footer_layout.xml:

<template id="external_layout_footer">        

<div class="header">            

<div class="row">                

<div class="col-4">                   

 <img src="/Equipment_Management/static/src/images/logo.png"></img>               

 </div>                

<div class="col-7">                    

<h2>DANH SACH</h2>               

 </div>                

<div class="col-1"> </div>            

</div> 

 </div> 

 <div class="footer"> 

 <div class="row"> 

 <div class="col-12"> 

 <p>@ 2019 Công Ty TNHH ISpeaking</p>

 <p>Địa chỉ: Tầng 14, Số 195 Đội Cấn, Quận Ba Đình, Hà Nội</p> 

 <p>Hotline: 024 6651 6595 | Email: marketing@ispeaking.edu.vn | Website: https://ispeaking.org</p> 

 </div> 

 </div> 

 </div> 

 </template>

When I print i just see Header and Footer active but Body is no active. So,  Someone can tell me why? and How can i fix this?.

Thank u so much guys !!!

Avatar
Discard
Best Answer

please call 

<t t-call="web.external_layout"> or internal layout after html container
Avatar
Discard