Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
556 Vizualizări

I am using a connector provided by tmijail on github.

https://github.com/tmijail/Odoo-Power-BI-Connector

Our DB was upgraded to 18.2 last night and now none of my search read queries work.  Anyone have a similar issue and know how to fix it?  Thank you for any advice on this issue!


Odoo Server Error: Invalid field res.groups.users in condition ('users', '=', 16)
Details:
    Traceback (most recent call last):
  File "/home/odoo/src/odoo/saas-18.2/odoo/orm/domains.py", line 768, in __get_field
    field = model._fields[field_name]
            ~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'users'



Imagine profil
Abandonează
Cel mai bun răspuns

In the model res.groups the field users got refactored to user_ids - see https://github.com/odoo/odoo/blob/saas-18.2/odoo/addons/base/models/res_groups.py#L14 compared to https://github.com/odoo/odoo/blob/18.0/odoo/addons/base/models/res_users.py#L184. - in, what I would assume, an effort to unify field naming and applying commonly used conventions (i.e. a field related to another model is named *_id for a Many2one and *_ids for a One- or Many2many relationship).

To fix this, (at least) any occurrence of users in related to res.groups will have to be replaced with user_ids. Other changes might be there as well that are incompatible with 18.2.

There is a issue reported on github for this already: https://github.com/tmijail/Odoo-Power-BI-Connector/issues/40 - judging by the name I would assume that's from you.

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Thank you for the help and pointing that out.

In the Odoo.mez file I was able to update the odoo.pq and fix the line of code that was referencing the refactored field.  Once that was done all queries are back to normal in Power BI desktop and online via the Power BI service.


OLD CODE:

{"group_id.users", "=", _uid}, {"group_id", "=", false} }

NEW CODE:

{"group_id.user_ids", "=", _uid}, {"group_id.user_ids", "=", false} }


Imagine profil
Abandonează