Community mailing list archives

community@mail.odoo.com

Re: How to override a qweb template

by
houssem
- 07/16/2015 04:30:56
Good morning, 

thank you for your answer, I know already that and It's not about the reports or inheritance, It's about timesheet that I want to customize the interfaces like the picture I attached (photoshoped)

best regards,

2015-07-16 9:12 GMT+02:00 Jay Vora <vora.jay@serpentcs.com>:
Ghandri,

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.

Thanks.

On Thu, Jul 16, 2015 at 1:57 AM, ghandri houssem <ghandri.houssem@gmail.com> wrote:
Hello,

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;
  position:fixed;
  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' + (Date.compare(date, Date.today()) === 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

--
Houssem GHANDRI

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
The Splendid journey of 2 years in Numbers
---
Regards,
Jay Vora,
Managing Director,
<img src="cid:part1.09000700.05080805@serpentcs.com" 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 : http://www.serpentcs.com
Mobile : 91 - 9879354457
Twitter: jaynvora
Skype: jaynvora
Blog : http://jayvora.blogspot.com

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Houssem GHANDRI