Community mailing list archives

How to override a qweb template

- 07/15/2015 16:26:11

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