[FIX] l10n_be_hr_payroll_fleet: fallback for no language

If the context is lang=None, it crashed as called babel with a None locale.

Closes #18403
opw-756026
This commit is contained in:
Axay Javiya
2017-09-26 16:16:50 +02:00
committed by Martin Trigaux
parent 28a2ba00ac
commit ede29e6d31
@@ -69,7 +69,7 @@ class FleetVehicle(models.Model):
return babel.dates.format_date(
date=Datetime.from_string(self.acquisition_date),
format='MMMM y',
locale=self._context.get('lang', 'en_US')
locale=self._context.get('lang') or 'en_US'
)
def _get_car_atn(self, acquisition_date, car_value, fuel_type, co2):