Skip to content
Snippets Groups Projects
Unverified Commit ede29e6d authored by Axay Javiya's avatar Axay Javiya Committed by Martin Trigaux
Browse files

[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
parent 28a2ba00
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment