i just built a sample employee module but not able to figure out how to add report and print button. help please?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi Ankur,
You will get the print button in the top of the form, by adding a report tag to that module, for getting the print button in your custom module, you just add a code like this, and you have to define a report template in the corresponding name.
Thank you
<template id="template_id">
<t t-call="report.html_container">
<t t-set="doc" t-value="doc.with_context()" />
<t t-call="report.internal_layout">
<div class="page" >
<t t-call="report.external_layout">
#add the body here
</t>
</div>
</t>
</t>
</template>
<report
id="report_id"
string="String to display"
model="model_name"
report_type="qweb-pdf"
file="module_name.template_id"
name="module_name.template_id"
/>
It only applies to inherited modules that have built-in print function, which method to create print button in new model?
You can try the above for the new report also
hi Niyas,
does this method works in odoo 11?
Yes
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Mar 15
|
2767 | ||
|
1
Jan 16
|
3244 | ||
|
1
Mar 15
|
4790 | ||
|
1
Mar 15
|
4684 | ||
|
0
Oct 24
|
183 |