Skip to content

Commit

Permalink
[FIX] hr_holidays: fix kanban view date format
Browse files Browse the repository at this point in the history
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 14, 2020
1 parent 1bcd13d commit a7f9e3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/hr_holidays/views/hr_leave_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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)">
Expand Down

0 comments on commit a7f9e3d

Please sign in to comment.