Community mailing list archives

Re: How to override a qweb template

Serpent Consulting Services Pvt. Ltd., Jay Vora
- 07/16/2015 03:09:51

Qweb reports follow the simple View inheritance concept. Use xpath tag in order to place your changes. Css can also be inherited.

You may check the video here. If you think you need even detailed understanding, you would prefer to take a look at the self-paced odoo training by SerpentCS on Udemy. Use coupon code 'SCS40' for 40% discount.


On Thu, Jul 16, 2015 at 1:57 AM, ghandri houssem <> wrote:

I was asked to change the behaviour of the "hr_timesheet_sheet.WeeklyTimesheet" template (the grid you see when you go to Human Resources/Time Tracking/My Current Timesheet).

I tested my changes directly in the original template(css file) and things worked but I got two problems :

1- when I want to  freez the first column and row it wasn't profesional like you can see it in the attached picture

The css part :

.openerp .oe_timesheet_weekly tbody tr:nth-child(odd) {
    background-color: #eeeeee;
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_account {
  text-align: left;
  font-size: 15px;
  background: #eeeeee;

2-when I that weekend days become higlighted.

I tried to change this line or doing the same :

<td t-att-class="'oe_timesheet_weekly_date_head' + (, === 0 ? ' oe_timesheet_weekly_today' : '')">

with :

<th t-att-class="'oe_timesheet_weekly_date_head' + ((date.toString('ddd') === 'Sat') || (date.toString('ddd') === 'Sun')  ? ' oe_timesheet_weekly_today' : '')">

But It doesn't work and Im blocked.

Thank you


Post to:

The Splendid journey of 2 years in Numbers
Jay Vora,
Managing Director,
<img src="" style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Serpent Consulting Services Pvt. Ltd.
Web :
Mobile : 91 - 9879354457
Twitter: jaynvora
Skype: jaynvora
Blog :