Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

[11.0][muk_utils] Bug handling user permissions #4

Closed
SalahAdDin opened this issue Jul 13, 2018 · 4 comments
Closed

[11.0][muk_utils] Bug handling user permissions #4

SalahAdDin opened this issue Jul 13, 2018 · 4 comments

Comments

@SalahAdDin
Copy link

I'm trying handling work order permissions for my user, when I try to save the permissions I get this issue:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 650, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 692, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 936, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 931, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 923, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/var/lib/odoo/addons/11.0/server-auth/password_security/models/res_users.py", line 44, in write
    return super(ResUsers, self).write(vals)
  File "/usr/lib/python3/dist-packages/odoo/addons/hr/models/res_users.py", line 17, in write
    result = super(User, self).write(vals)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/res_users.py", line 67, in write
    write_res = super(Users, self).write(vals)
  File "/var/lib/odoo/addons/11.0/muk_base/muk_utils/models/res_users.py", line 67, in write
    model_recs[model_name] = model.search([['groups', 'in', group_ids]])
  File "/var/lib/odoo/addons/11.0/muk_base/muk_utils/models/model.py", line 100, in search
    result = super(BaseModelExtension, self).search(args, offset, limit, order, count)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1480, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3787, in _search
    self._cr.execute(query_str, where_clause_params)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 155, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 232, in execute
    res = self._obj.execute(query, params)
psycopg2.ProgrammingError: operator does not exist: integer = boolean
LINE 1: ...FROM "muk_security_groups_groups_rel" WHERE "rid" IN (3, 72,...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

As you can see, this issue is related to this module and no other.

Thank you

@keshrath
Copy link
Member

Can you give me more information so I can reproduce the bug: What exactly were your steps before the error occurred?

@SalahAdDin
Copy link
Author

Ok:

After installing all muk_dms modules i went to Manufacturing module and i could not see Work center's option, so:

  1. I go to Settings / User / MyUser.
  2. I edit my profile.
  3. I enable Manage Work Order Operations (checked).
  4. I save my profile.

And i get this bug and report. All time i'm working as developer mode.

@keshrath
Copy link
Member

Hey,

Ok I was able to reproduce the bug can you please test if that fixes the bug for you too?

fb7cbab

@SalahAdDin
Copy link
Author

I tested it, and yes, it works fine now.

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

No branches or pull requests

2 participants