Search code examples
templateswebodoofooterodoo-website

Odoo 14 : element '<xpath expr="//*[hasclass('o_footer_copyright_name')]">' cannot be located in the parent view


I migrate from odoo 13 to odoo 14, but when I import all this; My website has an error like :

load could not load template
ValueError: The element '<xpath expr="//*[hasclass('o_footer_copyright_name')]">' could not be located in the parent view

View name: Footer Language Selector
Error context:
 view: ir.ui.view(3822,)
 view.parent: ir.ui.view(2094,)

Template: 1816
Path: /t/t
An error occurred while rendering template 1816

I didn't edited this view btw.

If anyone has a solution I'm interested!

Thanks by advance !


Solution

  • I experienced the same issue while upgrading from Odoo Enterprise 13 to 14.

    Note the following points:

    • The Release Notes (https://www.odoo.com/odoo-14-release-notes) state: "Add the language selector in the header and customize the layout."
    • There is a new view added called 'Footer Language Selector' (Key: portal.footer_language_selector). This appears to be added while running the Odoo DB upgrade 13 > 14.
    • The 'Footer Language Selector' view is not created when setting up a new Odoo 14 database!

    To resolve your issue, you need to disable the 'Footer Language Selector' view. This can be done in one of two ways:

    1. If you are logged in to your Odoo instance, enable Developer Mode, and go to Settings > Technical > User Interface > Views and search for 'Footer Language Selector'. Select the view, and then select the menu option to 'Archive'
    2. If you are not logged in/not able to log in, you need to disable the view in the database directly. Here is the command that will disable the view: UPDATE public.ir_ui_view SET active = false WHERE id = 3822; NOTE: the 'id = 3822' value must match the view number in the error: ir.ui.view(3822,)

    I hope this helps you resolve the issue which appears to be a bug introduced by the Odoo DB update tool.