Contributors mailing list archives
Re: XML errors when upgrading modules, because of fields in unrelated modulesby
I encountered a similar issue lately when developing a module in OCA/sale-workflow, everything was working fine locally, but the XML error you described was raised on the CI:
- my module was adding a field in the embedded tree view of sale order line in the SO form, which by default is in editable mode (no form)
- another module from OCA/sale-workflow disabled this editable
mode so the form view of the SO line was open, on which my field
wasn't added, so during tests when opening the form, the "field
not found" error was triggered. Adding the field also on the
embedded SO line form view fixed the issue.
Could it be the same kind of issue you are facing?
I've been finding this weird issue for a while, but decided to take some tome to write about it.
I've seen frequently the case where:
1. A custom module adds a field to a model and view. For example. to res.company.
2. Later, another (unrelated) custom module also adds a new field to that same model (model and view).
When installing or upgrading that second module, I see errors loading the XML with the form view.
The error says that the field added by module 1 is missing in the view.
But a) module 1 is installed an the field exists and b) the XML for the view in module 2 doesn't have any reference to that "missing" field!
I found this frequently in Odoo 14.
Honestly I'm not sure if it if also happens in other versions.
Has anyone else experienced this?
M: +351 919 991 307
A: Avenida da República 3000, Estoril Office B, #34
-- Sébastien Alix Business Solutions Odoo Developer Camptocamp France SA https://www.camptocamp.com/
ClosingAp Open Source Integrators Europe, LDA, Daniel Reis