Skip to content
Permalink
Browse files

[FIX] hr_holidays: fix kanban view date format

Issue

	- Install Time Off & Studio
	- Set up your language to English with format date
	  to %d/%m/%y instead of %m/%d/%y
	- Enable Kanban view in Time Off dashboard with Studio
	- Compare Kanban and List view

	The list view dates is correctly formatted but not
	the kanban view dates

Cause

	We use momentjs which doesn't take the user date format
	in account, only the locale.

Solution

	Use a field with datetime widget which handle this case.

OPW-2195584

closes #45267

X-original-commit: 69b3578
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information
jvm-odoo committed Feb 13, 2020
1 parent 1bcd13d commit a7f9e3df506cd3d45038ee93b7f4b53d7eb312bf
Showing with 2 additions and 2 deletions.
  1. +2 −2 addons/hr_holidays/views/hr_leave_views.xml
@@ -133,9 +133,9 @@
<div class="col-2"/>
<div class="col-10">
<span class="text-muted">from </span>
<t t-esc="moment(record.date_from.raw_value).format('L')"/>
<field name="date_from" widget="date"/>
<span class="text-muted">to </span>
<t t-esc="moment(record.date_to.raw_value).format('L')"/>
<field name="date_to" widget="date"/>
</div>
</div>
<div class="row no-gutters" t-if="['validate', 'refuse'].includes(record.state.raw_value)">

0 comments on commit a7f9e3d

Please sign in to comment.
You can’t perform that action at this time.