Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error when many2one widget used in tree view #3

Open
Animal-Machine opened this issue Sep 20, 2021 · 2 comments
Open

Comments

@Animal-Machine
Copy link

Animal-Machine commented Sep 20, 2021

I wanted to make an editable tree and it didn't work, neither with a normal tree. Apparently my view is "invalid" but I don't know why, there is a parse error near the tree tag in the xml file. In fact, there is no crash with the "widget" attribute alone (the field only stays blank), it occurs when there is also "model_field".

I work with the 14.0 version of generic_m2o module.

If you are unable to reproduce, I can provide more details (I don't do this now because I think it will require some editing as I'm not sure my employer is OK to share details about the database)

@Animal-Machine Animal-Machine changed the title Internal server error when widget used in tree view Internal server error when many2one widget used in tree view Sep 20, 2021
@ohplz
Copy link

ohplz commented Apr 24, 2022

I got it too, and my logs tell me this:
odoo.tools.view_validation: :4:0:ERROR:RELAXNGV:RELAXNG_ERR_NOELEM: Expecting an element data, got nothing
odoo.tools.view_validation: :4:0:ERROR:RELAXNGV:RELAXNG_ERR_INVALIDATTR: Invalid attribute model_field for element field
odoo.tools.view_validation: :2:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element tree has extra content: field

@katyukha
Copy link
Contributor

Hi,

Thanks for reporting this issue.

Currently generic_m2o does not work for tree view. This is because in recent versions of Odoo try have strict xml-scheme for tree view, that do not allow to use additional attributes. Theoretically, it have sense to rewrite this widget to use options param, instead of model_field, but not sure when we will have time for this refactoring. And we have to keep in mind backward compatability.

But if you can make pull request, we will review it and possibly accept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants