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 | etc.
You could do it like this example for sale.order report generated as preview when pressing the preview button:
from openerp import models, fields, api
_inherit = 'sale.order'
preview = fields.Html('Report Preview')
html = self.env['report'].get_html(self, 'sale.report_saleorder')
And in the view
<?xml version="1.0" encoding="UTF-8"?>
<record model="ir.ui.view" id="solt_report_preview_form_view">
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//page" position="after">
<page string="Report Preview">
<button name="generate_preview" type="object" string="Preview"/>
The result is something like this:
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/21/15, 7:23 AM|
|Seen: 663 times|
|Last updated: 12/22/15, 11:13 PM|