Skip to content

#500 error on installing website module in odoo 18.0 enterprise #563

@davidszkl

Description

@davidszkl

Installing website on a fresh database v18.0 enterprise causes a crash and a #500 error for the user because xml files in the enterprise module fail XML validation.
enterprise/website_appointment/views/snippets/s_appointments.xml does not use a tag inside the tag.
This is however not the only file doing so and also running odoo 18 natively instead of through the container image is possible, I assume the version of LXML lib or the configuration has something to do with it, here is the complete error message:

odoo      | 2025-10-30 16:17:04,174 1 INFO odoo odoo.modules.loading: Loading module website_appointment (90/92)
odoo      | 2025-10-30 16:17:04,261 1 INFO odoo odoo.modules.registry: module website_appointment: creating or updating database tables
odoo      | 2025-10-30 16:17:04,421 1 INFO odoo odoo.modules.loading: loading website_appointment/data/website_data.xml
odoo      | 2025-10-30 16:17:04,436 1 INFO odoo odoo.modules.loading: loading website_appointment/data/website_snippet_data.xml
odoo      | 2025-10-30 16:17:04,443 1 INFO odoo odoo.modules.loading: loading website_appointment/views/appointment_type_views.xml
odoo      | 2025-10-30 16:17:04,485 1 INFO odoo odoo.modules.loading: loading website_appointment/views/appointment_invite_views.xml
odoo      | 2025-10-30 16:17:04,495 1 INFO odoo odoo.modules.loading: loading website_appointment/views/calendar_menus.xml
odoo      | 2025-10-30 16:17:04,502 1 INFO odoo odoo.modules.loading: loading website_appointment/views/appointment_templates_appointments.xml
odoo      | 2025-10-30 16:17:04,555 1 INFO odoo odoo.modules.loading: loading website_appointment/views/appointment_templates_registration.xml
odoo      | 2025-10-30 16:17:04,564 1 INFO odoo odoo.modules.loading: loading website_appointment/views/appointment_templates_validation.xml
odoo      | 2025-10-30 16:17:04,572 1 INFO odoo odoo.modules.loading: loading website_appointment/views/website_pages_views.xml
odoo      | 2025-10-30 16:17:04,594 1 INFO odoo odoo.modules.loading: loading website_appointment/views/snippets/s_appointments.xml
odoo      | 2025-10-30 16:17:04,596 1 ERROR odoo odoo.tools.convert: The XML file '/mnt/extra-addons/enterprise/website_appointment/views/snippets/s_appointments.xml' does not fit the required schema!
odoo      | Traceback (most recent call last):
odoo      |   File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 669, in convert_xml_import
odoo      |     relaxng.assert_(doc)
odoo      |   File "src/lxml/etree.pyx", line 3682, in lxml.etree._Validator.assert_
odoo      | AssertionError: Element odoo has extra content: template, line 4
odoo      | 2025-10-30 16:17:04,597 1 WARNING odoo odoo.tools.convert: /mnt/extra-addons/enterprise/website_appointment/views/snippets/s_appointments.xml:4:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element odoo has extra content: template
odoo      | 2025-10-30 16:17:04,597 1 INFO odoo odoo.tools.convert: Install 'jingtrang' for more precise and useful validation messages.
odoo      | 2025-10-30 16:17:04,600 1 WARNING odoo odoo.modules.loading: Transient module states were reset
odoo      | 2025-10-30 16:17:04,601 1 ERROR odoo odoo.modules.registry: Failed to load registry
odoo      | 2025-10-30 16:17:04,606 1 INFO odoo odoo.modules.loading: loading 1 modules...
odoo      | 2025-10-30 16:17:04,611 1 INFO odoo odoo.modules.loading: 1 modules loaded in 0.01s, 0 queries (+0 extra)
odoo      | 2025-10-30 16:17:04,622 1 INFO odoo odoo.modules.loading: loading 88 modules...
odoo      | 2025-10-30 16:17:04,669 1 INFO odoo odoo.modules.loading: 88 modules loaded in 0.05s, 0 queries (+0 extra)
odoo      | 2025-10-30 16:17:04,777 1 INFO odoo odoo.modules.loading: Modules loaded.
odoo      | 2025-10-30 16:17:04,781 1 INFO odoo odoo.modules.registry: Registry loaded in 0.180s
odoo      | 2025-10-30 16:17:04,785 1 INFO odoo odoo.addons.base.models.ir_http: Generating routing map for key 1
odoo      | 2025-10-30 16:17:04,813 1 ERROR odoo odoo.http: Exception during request handling.
odoo      | Traceback (most recent call last):
odoo      |   File "/usr/lib/python3/dist-packages/odoo/http.py", line 2576, in __call__
odoo      |     response = request._serve_db()
odoo      |                ^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/http.py", line 2103, in _serve_db
odoo      |     return self._transactioning(
odoo      |            ^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/http.py", line 2166, in _transactioning
odoo      |     return service_model.retrying(func, env=self.env)
odoo      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 156, in retrying
odoo      |     result = func()
odoo      |              ^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/http.py", line 2133, in _serve_ir_http
odoo      |     response = self.dispatcher.dispatch(rule.endpoint, args)
odoo      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/http.py", line 2381, in dispatch
odoo      |     result = self.request.registry['ir.http']._dispatch(endpoint)
odoo      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
odoo      |     result = endpoint(**request.params)
odoo      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/http.py", line 754, in route_wrapper
odoo      |     result = endpoint(self, *args, **params_ok)
odoo      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 42, in call_button
odoo      |     action = call_kw(request.env[model], method, args, kwargs)
odoo      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/api.py", line 535, in call_kw
odoo      |     result = getattr(recs, name)(*args, **kwargs)
odoo      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/decorator.py", line 232, in fun
odoo      |     return caller(func, *(extras + args), **kw)
odoo      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 75, in check_and_log
odoo      |     return method(self, *args, **kwargs)
odoo      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 487, in button_immediate_install
odoo      |     return self._button_immediate_function(self.env.registry[self._name].button_install)
odoo      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 611, in _button_immediate_function
odoo      |     registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
odoo      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/decorator.py", line 232, in fun
odoo      |     return caller(func, *(extras + args), **kw)
odoo      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 97, in locked
odoo      |     return func(inst, *args, **kwargs)
odoo      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 129, in new
odoo      |     odoo.modules.load_modules(registry, force_demo, status, update_module)
odoo      |   File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 489, in load_modules
odoo      |     processed_modules += load_marked_modules(env, graph,
odoo      |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 365, in load_marked_modules
odoo      |     loaded, processed = load_module_graph(
odoo      |                         ^^^^^^^^^^^^^^^^^^
odoo      |   File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 228, in load_module_graph
odoo      |     load_data(env, idref, mode, kind='data', package=package)
odoo      |   File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 72, in load_data
odoo      |     tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
odoo      |   File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 615, in convert_file
odoo      |     convert_xml_import(env, module, fp, idref, mode, noupdate)
odoo      |   File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 669, in convert_xml_import
odoo      |     relaxng.assert_(doc)
odoo      |   File "src/lxml/etree.pyx", line 3682, in lxml.etree._Validator.assert_
odoo      | AssertionError: Element odoo has extra content: template, line 4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions