콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
667 화면

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'



아바타
취소
베스트 답변

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.

아바타
취소
작성자 베스트 답변

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} }


아바타
취소