In ubuntu noble, some timezone where removed leading to errors when trying to assign/access them. This was partially fixed in the code by removing all references to old timezones but one issue remains: if a database contains timezones that are not defined in the os, the resolution will fail and break at runtime This patches proposes to alter timezone to fallback on the new canonical timezone if the timezone was removed. This list was generated by checking all symlink in /usr/share/zoneinfo in ubuntu 22.04 that disapeared in ubuntu 24.04 This solutions will work when moving a database from one server to another, even without migration. The all_timezone is not modified on purpose to avoid breaking existing logic. This list may be used to define if a timezone is known by postgress, define selection fiels, .... we don"t want to increase the list in those case. Some other logic using all_timezone may need to be updated but This will be done in master. Part-of: odoo/odoo#160842
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
from . import _monkeypatches
|
|
from . import _monkeypatches_pytz
|
|
|
|
from werkzeug import urls
|
|
if not hasattr(urls, 'url_join'):
|
|
# see https://github.com/pallets/werkzeug/compare/2.3.0..3.0.0
|
|
# see https://github.com/pallets/werkzeug/blob/2.3.0/src/werkzeug/urls.py for replacement
|
|
from . import _monkeypatches_urls
|
|
|
|
from . import appdirs
|
|
from . import cloc
|
|
from . import constants
|
|
from . import pdf
|
|
from . import pycompat
|
|
from . import win32
|
|
from .barcode import *
|
|
from .config import config
|
|
from .date_utils import *
|
|
from .float_utils import *
|
|
from .func import *
|
|
from .image import *
|
|
from .mail import *
|
|
from .misc import *
|
|
from .query import Query, _generate_table_alias
|
|
from .sql import *
|
|
from .template_inheritance import *
|
|
from .translate import *
|
|
from .xml_utils import *
|
|
from .convert import *
|
|
from . import osutil
|
|
from .js_transpiler import transpile_javascript, is_odoo_module, URL_RE, ODOO_MODULE_RE
|
|
from .sourcemap_generator import SourceMapGenerator
|