Document Management System prevents new created users (after install of module) from creating projects.
Flectra 2 alpha & Flectra 2 beta on docker compose
Summary
After installing several modules (including project, accounting, attendance, expenses, time logs, time off, contacts, documents and dashboards) pop-up of error occurs after logging in with new user created after installing the modules. Note - if modules are not installed, and users are created first, error does not occur.
Steps to reproduce
Install flectra 2 beta, install modules first. (i have not pinpointed the specific one yet, but it is an error that occurs with the project module my guess is.
What is the current bug behavior?
- Error pops up upon login of new user
- New created user cannot create a new project after being given privileges.
- Could affect other modules, however, have not run into them yet.
What is the expected correct behavior?
User should be able to create new projects
Relevant logs and/or screenshots
Error: Flectra Server Error
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flectra/addons/base/models/ir_http.py", line 237, in _dispatch result = request.dispatch() File "/usr/lib/python3/dist-packages/flectra/http.py", line 683, in dispatch result = self._call_function(**self.params) File "/usr/lib/python3/dist-packages/flectra/http.py", line 359, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python3/dist-packages/flectra/service/model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python3/dist-packages/flectra/http.py", line 347, in checked_call result = self.endpoint(*a, **kw) File "/usr/lib/python3/dist-packages/flectra/http.py", line 912, in call return self.method(*args, **kw) File "/usr/lib/python3/dist-packages/flectra/http.py", line 531, in response_wrap response = f(args, **kw) File "/usr/lib/python3/dist-packages/flectra/addons/web/controllers/main.py", line 1377, in call_kw return self._call_kw(model, method, args, kwargs) File "/usr/lib/python3/dist-packages/flectra/addons/web/controllers/main.py", line 1369, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/usr/lib/python3/dist-packages/flectra/api.py", line 394, in call_kw result = _call_kw_model_create(method, model, args, kwargs) File "/usr/lib/python3/dist-packages/flectra/api.py", line 374, in _call_kw_model_create result = method(recs, args, **kwargs) File "", line 2, in create File "/usr/lib/python3/dist-packages/flectra/api.py", line 344, in _model_create_multi return create(self, [arg]) File "/usr/lib/python3/dist-packages/flectra/addons/hr_timesheet/models/project.py", line 69, in create return super(Project, self).create(vals_list) File "", line 2, in create File "/usr/lib/python3/dist-packages/flectra/api.py", line 326, in _model_create_single return self.browse().concat((create(self, vals) for vals in arg)) File "/usr/lib/python3/dist-packages/flectra/api.py", line 326, in return self.browse().concat((create(self, vals) for vals in arg)) File "/usr/lib/python3/dist-packages/flectra/addons/project/models/project.py", line 352, in create project = super(Project, self).create(vals) File "", line 2, in create File "/usr/lib/python3/dist-packages/flectra/api.py", line 344, in _model_create_multi return create(self, [arg]) File "/usr/lib/python3/dist-packages/flectra/addons/mail/models/mail_alias_mixin.py", line 45, in create record.alias_id.sudo().write(record._alias_get_creation_values()) File "/usr/lib/python3/dist-packages/flectra/addons/mail/models/mail_alias.py", line 122, in write return super(Alias, self).write(vals) File "/usr/lib/python3/dist-packages/flectra/models.py", line 3637, in write self.modified(relational_names, before=True) File "/usr/lib/python3/dist-packages/flectra/models.py", line 5778, in modified tocompute = list(tocompute) File "/usr/lib/python3/dist-packages/flectra/models.py", line 5851, in _modified_triggers records |= model.search([(key.name, 'in', real_records.ids)], order='id') File "/usr/lib/python3/dist-packages/flectra/models.py", line 1698, in search res = self._search(args, offset=offset, limit=limit, order=order, count=count) File "/usr/lib/python3/dist-packages/flectra/addons/dms/models/directory.py", line 396, in _search if result: File "/usr/lib/python3/dist-packages/flectra/osv/query.py", line 156, in bool return bool(self._result) File "/usr/lib/python3/dist-packages/flectra/tools/func.py", line 26, in get value = self.fget(obj) File "/usr/lib/python3/dist-packages/flectra/osv/query.py", line 149, in _result self._cr.execute(query_str, params) File "", line 2, in execute File "/usr/lib/python3/dist-packages/flectra/sql_db.py", line 101, in check return f(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/flectra/sql_db.py", line 298, in execute res = self._obj.execute(query, params) Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flectra/http.py", line 639, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/flectra/http.py", line 315, in _handle_exception raise exception.with_traceback(None) from new_cause TypeError: not all arguments converted during string formatting
Possible fixes
After going into developer mode, uninstalling document management system, it seems to solve the problem. Will reconfirm after retesting.