[FIX] hr_holidays: allocation name

When creating an allocation request by employee tag, the name contains
'False on...'.

opw-703893
This commit is contained in:
Nicolas Martinelli
2017-01-12 15:16:30 +01:00
parent 1382c0884d
commit a93632df91
+1 -1
View File
@@ -330,7 +330,7 @@ class Holidays(models.Model):
def name_get(self):
res = []
for leave in self:
res.append((leave.id, _("%s on %s : %.2f day(s)") % (leave.employee_id.name, leave.holiday_status_id.name, leave.number_of_days_temp)))
res.append((leave.id, _("%s on %s : %.2f day(s)") % (leave.employee_id.name or leave.category_id.name, leave.holiday_status_id.name, leave.number_of_days_temp)))
return res
def _check_state_access_right(self, vals):