summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Shekha <msh@openerp.com>2015-01-05 19:46:27 +0530
committerRichard Mathot <rim@odoo.com>2015-01-08 17:41:37 +0100
commit0d1fba08e52e3ec2590cebb137c50fc4bad33efa (patch)
tree4a931e0ca3f2f5260dd61b7a80fc3738c9f23e65
parent6d54b0690746ebfca9452f51c8525029c0761440 (diff)
[FIX] hr_timesheet_sheet: correct highlighting of "today"
-rw-r--r--addons/hr_timesheet_sheet/static/src/xml/timesheet.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml b/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml
index 276a2bdb0f9..90d6c858232 100644
--- a/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml
+++ b/addons/hr_timesheet_sheet/static/src/xml/timesheet.xml
@@ -7,9 +7,9 @@
<tr>
<th class="oe_timesheet_first_col"> </th>
<t t-foreach="widget.dates" t-as="date">
- <th t-att-class="'oe_timesheet_weekly_date_head' + (Date.compare(date, Date.today()) === 0 ? ' oe_timesheet_weekly_today' : '')">
+ <th t-att-class="'oe_timesheet_weekly_date_head' + (moment().format('DD-MM-YYYY') === moment(date).format('DD-MM-YYYY') ? ' oe_timesheet_weekly_today' : '')">
<t t-esc="moment(date).format('ddd')"/><br />
- <t t-esc="moment(date).format('MMM d')"/>
+ <t t-esc="moment(date).format('MMM DD')"/>
</th>
</t>
<th class="oe_timesheet_weekly_date_head">Total</th>
@@ -18,7 +18,7 @@
<td class="oe_timesheet_weekly_account"><a href="javascript:void(0)" t-att-data-id="JSON.stringify(account.account)"><t t-esc="widget.account_names[account.account]"/></a></td>
<t t-set="day_count" t-value="0"/>
<t t-foreach="account.days" t-as="day">
- <td t-att-class="(Date.compare(day.day, Date.today()) === 0 ? 'oe_timesheet_weekly_today' : '')">
+ <td t-att-class="moment().format('DD-MM-YYYY') === moment(day.day).format('DD-MM-YYYY') ? 'oe_timesheet_weekly_today' : ''">
<input t-if="!widget.get('effective_readonly')" class="oe_timesheet_weekly_input" t-att-data-account="account.account"
t-att-data-day-count="day_count" type="text"/>
<span t-if="widget.get('effective_readonly')" t-att-data-account="account.account"