[FIX] account_analytic_tag: fix broken xpaths for Odoo 19 view structure#901
Open
digiter-tw wants to merge 1 commit into
Open
[FIX] account_analytic_tag: fix broken xpaths for Odoo 19 view structure#901digiter-tw wants to merge 1 commit into
digiter-tw wants to merge 1 commit into
Conversation
In Odoo 19, two breaking changes affect the account.move form view: - invoice_line_ids list element was given name="journal_items", so the xpath must match list[@name='journal_items'] instead of list - line_ids was renamed to journal_line_ids (Journal Items tab) Fixes installation on Odoo 19 Community.
Member
|
I don't get the changes. They were correct AFAIK. |
cristina-hidalgo-tecnativa
suggested changes
Apr 28, 2026
cristina-hidalgo-tecnativa
left a comment
There was a problem hiding this comment.
Hi @digiter-tw, thanks for the contribution!
After checking the Odoo 19 source code, the original xpaths are correct:
invoice_line_ids: XPathlist/field[...] matches any<list>regardless of its name attribute, so no fix is needed here. sourceline_ids: The view still usesline_ids, notjournal_line_ids. That field exists in the model but is marked as deprecated and unused in views. Changing the xpath actually breaks the installation — confirmed on runboat:
Element '<xpath expr="//field[@name='journal_line_ids']/list/field[@name='analytic_distribution']">' cannot be located in parent view
View error context:
{'file': '/mnt/data/odoo-addons-dir/account_analytic_tag/views/account_move_views.xml',
'line': 1,
'name': 'account.move.tag_ids.form.inherit',
'view': ir.ui.view(861,),
'view.model': 'account.move',
'view.parent': ir.ui.view(709,),
'xmlid': 'account_move_analytic_tag_ids_form'}
The changes are not necessary and the current code in 19 version is correct as-is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two breaking view structure changes in Odoo 19 prevent
account_analytic_tagfrom installing:1.
invoice_line_idslist element renamedThe
<list>insideinvoice_line_idswas givenname="journal_items"in Odoo 19.The xpath must match
list[@name='journal_items']instead of barelist.2.
line_idsrenamed tojournal_line_idsThe Journal Items tab field was renamed from
line_idstojournal_line_idsin Odoo 19.Changes
account_analytic_tag/views/account_move_views.xml: update two xpaths to match Odoo 19 view structureTest
Verified on Odoo 19.0 Community — module installs and
analytic_tag_idscolumn appears correctly in both Invoice Lines and Journal Items tabs.