Odoo Help

Welcome!

This community 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.

0

How to Change TABLE Format in QWEB reports? With different table Border and Color.?

By
Chandni
on 10/22/15, 6:35 AM 3,408 views

Tables types are already there in ODOO, like Condensed, bordered, etc.

I want to design my own table. Let me know any possible CSS or other way to do it.

Thanks,

1

Yenthe

--Yenthe--
6721
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 10/22/15, 6:46 AM

Hi Chandni,

You can apply as much CSS as you want in Odoo. You can do this either inline (in the XML file) or by adding a new CSS file to your module.The inline code works just as if you write in HTML. A little example:

<table border="1" style="width:100%;"> 
  <tr style="font-weight:bold;">
    <td>Jill</td>
    <td>Smith</td>	
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>	
  </tr>
  <tr>
    <td>John</td>
    <td>Doe</td>	
  </tr>
</table> 

You can view a fiddle here: https://jsfiddle.net/cc72g35v/1/
If you want to work with a CSS file you can include it in your __openerp__py like this:

 { 
'css': ['static/src/css/my_css.css'], }

Yenthe

Thanks Yenthe. I refers your answers and questions often. You have a very good knowledge. Thanks again for answering. :)

Chandni
on 10/26/16, 6:53 AM
0
PankaJ_Joshi
On 10/22/15, 6:49 AM

odoo guide is available to style your pdf Reports

check this out :)

http://odoo.guide/?s=report 

Hello Pankaj, Already referred that page. Thanks for your time.

Chandni
on 10/22/15, 6:54 AM
0
Karthik Arumugam
On 10/22/15, 6:50 AM

Hi Chandi

       You can make use of all available table defined in the bootstrap.css

        If you want to use your own design , it is possible by defining the css inside the style tag of you template

        For example

       

<template id="student_test_report">
 <style type="text/css">
 .bb {
 font-weight: bold;
 }
 .brr{
 border: 5px solid green;
 }
 .tbt{
 border-top: 2px;
 border-color: black;
 border-width: thick;
 }
 </style>
.....
.....
.....
</template>

I think this will help you.

Your Answer

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/22/15, 6:35 AM
Seen: 3408 times
Last updated: 10/26/16, 6:52 AM