Hi all,
I use Odoo v8.0. I want to add custom css to modify report template "sale.report_saleorder_document". So, I create a forder in addons forder with name "modify_company". In this, I create some file as below :
__init__.py (empty)
__openerp__
{
'name' : "Modify report template",
'description' : """Modify report template for Quotation/Sale report""",
'author' : "Nhu Van Tran",
'category' : "Tools",
'depends' : ['sale'],
'data' : ['modify_report_quotation.xml'],
'css': ['static/css/content.css'],
'demo' : [],
'installable' : True,
}
modify_report_quotation.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="my_report_quotation" inherit_id="sale.report_saleorder_document">
<xpath expr="//div[@class='page']" position="replace">
<link rel="stylesheet" href="/modify_company/static/css/content.css"/>
<div class = "page">
<div class="nhuvantran">
<h2 >HERE IS DEMO DIV</h2>
</div></div><!-- end div page -->
</xpath>
</template>
</data>
</openerp>
and in forder "modify_company", I create .css file "modify_company/static/css/content.css" as below
.nhuvantran{
width:800px;
height:500px;
background-color:red;
}
Unluckly, It's not work. Please help me
Thank all you so much.
--------------------
SOLVE : Add .CSS directly into the .xml file
I think it is not possible for now, refer : https://github.com/odoo/odoo/issues/4359