Community mailing list archives

community@mail.odoo.com

Re: How to override a qweb template

by
OpusVL, Nuria Arranz-Velazquez
- 07/17/2015 07:27:37
Hi Ghandri,

This could be related to an issue we found a while back. One of my colleagues reported it here:

https://github.com/odoo/odoo/issues/1105

And basically there are two things needed:

  1.  Create a new parameter:
        Go to settings > Technical > Parameters > System parameters and create a new one with this details:

        Name: web.base.url.freeze
        Value: True

  2.  Edit existing parameter
        Open up parameter web.base.url and change value to:

        Value: http://0.0.0.0:8069

All the best with it,
Nuria




On 15/07/15 21:27, ghandri houssem wrote:
<blockquote cite="mid:CABr+_RE3nNNre9WHykTQPw=TBWexHQWmFN1K5S7AQ4bJjZ4Vwg@mail.gmail.com" type="cite">
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



-- 
N. Arranz-Velazquez
OpusVL Odoo Specialist Team (OOST)
Product Owner

OpusVL
Drury House
Drury Lane
Rugby
CV21 3DE

T: 01788 298 450
W: www.opusvl.com