How to add css in print report odoo


1). Create a new xml file

11

2). add the below lines to that xml

22

<?xml version=”1.0″ encoding=”utf-8″?>
<openerp>
<data>
<template id=”report_saleorder_style” inherit_id=”report.layout”>
<xpath expr=”//style” position=”after”>
<style type=”text/css”>
.bgcolor{
background-color:#ccc !important;
}
</style>
</xpath>
</template>
</data>
</openerp>

3). add xml fiile to __openerp__.py

33

4). report template

<report
id=”report_sale_order”
string=”Quotation / Order”
model=”sale.order”
report_type=”qweb-pdf”
file=”epsale.report_saleorder”
name=”epsale.report_saleorder”
/>

5).when you are making a copy of sales report from sales module please chnage resource path in your template file.

123

6). now you can call your new css class to your xml template for report.

44

Download Files

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s