Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
43886 Представления

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,

Аватар
Отменить
Лучший ответ

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. :)

Лучший ответ

Hey there,

To add styling modifications to your report tables, you'll have to add the specifications over in the table class while designing the report.

Let's say, you're designing a report with a table in the studio mode. 
Step - 1 : Click on "Edit sources" to find the qweb layout code
Step - 2 : Click on the table in your report to navigate over to the table class in your code.
Step - 3 : Add styling options to your table class. To eg, if you want to have a table with background colour as green, text in white and red border you'll have to specify it as -

<table class="table table-bordered" style="background-color:green; color:white; border-color:red;">

and 

<td style="background-color:green; color:white;">

Step - 4 Click save for changes to be applied to table. 
Hope it helps!

Аватар
Отменить
Лучший ответ

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.

Лучший ответ

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
окт. 24
1181
0
окт. 24
5
1
мая 23
2674
5
мая 21
11190
5
авг. 20
31371