Update __init__.py

This commit is contained in:
zainab2097 2024-08-05 16:57:35 +03:00 committed by GitHub
parent d19548e525
commit 607050bb10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ def format_date(env, value, lang_code=False, date_format=False):
lang = env['res.lang']._lang_get(lang_code or env.context.get('lang') or 'en_US') lang = env['res.lang']._lang_get(lang_code or env.context.get('lang') or 'en_US')
locale = babel.Locale.parse(lang.code) locale = babel.Locale.parse(lang.code)
locale=str(locale)
if locale.lower().startswith('ar'): if locale.lower().startswith('ar'):
locale = "ar" locale = "ar"
if not date_format: if not date_format: