在 Odoo 14 Enterprise 上创建用户时出错
Error on create user on Odoo 14 Enterprise
正如标题所说,我在 Odoo 14 Enterprise 上创建用户时遇到问题。在创建合作伙伴时错误不显示,仅在创建用户时显示。
控制台错误:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo/odoo-server/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 360, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 913, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 532, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1389, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 394, in call_kw
result = _call_kw_model_create(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "<decorator-gen-296>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 323, in _model_create_single
return create(self, arg)
File "/odoo/odoo-server/addons/website_slides/models/res_users.py", line 13, in create
user = super(Users, self).create(values)
File "<decorator-gen-198>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 344, in _model_create_multi
return create(self, [arg])
File "/odoo/odoo-server/addons/digest/models/res_users.py", line 12, in create
users = super(ResUsers, self).create(vals_list)
File "<decorator-gen-165>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/note/models/res_users.py", line 17, in create
users = super().create(vals_list)
File "<decorator-gen-157>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/gamification/models/res_users.py", line 44, in create
res = super(Users, self).create(values_list)
File "<decorator-gen-146>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/auth_signup/models/res_users.py", line 241, in create
users = super(ResUsers, self).create(vals_list)
File "<decorator-gen-144>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/mail/models/res_users.py", line 82, in create
users = super(Users, self).create(vals_list)
File "<decorator-gen-120>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 326, in _model_create_single
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/odoo/odoo-server/odoo/api.py", line 326, in <genexpr>
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/odoo/odoo-server/addons/generic_security_restriction/models/res_users.py", line 17, in create
return super(ResUsers, self).create(values)
File "<decorator-gen-107>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 344, in _model_create_multi
return create(self, [arg])
File "/odoo/odoo-server/odoo/addons/base/models/res_users.py", line 1321, in create
users = super(UsersView, self).create(new_vals_list)
File "<decorator-gen-105>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/res_users.py", line 1078, in create
return super(UsersImplied, self).create(vals_list)
File "<decorator-gen-99>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/res_users.py", line 543, in create
users = super(Users, self).create(vals_list)
File "<decorator-gen-65>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "<decorator-gen-13>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/models.py", line 3861, in create
parents = self.env[model_name].create([
File "<decorator-gen-257>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/base_vat/models/res_partner.py", line 554, in create
return super(ResPartner, self).create(vals_list)
File "<decorator-gen-210>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/account/models/partner.py", line 493, in create
return super().create(vals_list)
File "<decorator-gen-185>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/partner_autocomplete/models/res_partner.py", line 183, in create
partners = super(ResPartner, self).create(vals_list)
File "<decorator-gen-95>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/res_partner.py", line 569, in create
partners = super(Partner, self).create(vals_list)
File "<decorator-gen-138>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 264, in create
threads = super(MailThread, self).create(vals_list)
File "<decorator-gen-241>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/website/models/mixins.py", line 169, in create
records = super(WebsitePublishedMixin, self).create(vals_list)
File "<decorator-gen-65>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "<decorator-gen-13>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/models.py", line 3900, in create
record._update_cache(vals)
File "/odoo/odoo-server/odoo/models.py", line 5153, in _update_cache
cache.set(self, field, field.convert_to_cache(value, self, validate))
File "/odoo/odoo-server/odoo/fields.py", line 2416, in convert_to_cache
raise ValueError("Wrong value for %s: %r" % (self, value))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 316, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Wrong value for res.partner.company_type: '0'
我已经升级了基础模块,我已经禁用了自动操作,在模块上搜索相关的东西但没有。
有什么解决办法吗?
提前致谢
显然,之前的 Odoo 开发人员在 User-defined Defaults
菜单的 company_type
上分配了默认值。
正如标题所说,我在 Odoo 14 Enterprise 上创建用户时遇到问题。在创建合作伙伴时错误不显示,仅在创建用户时显示。
控制台错误:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo/odoo-server/odoo/http.py", line 684, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 360, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 913, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 532, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1389, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 394, in call_kw
result = _call_kw_model_create(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "<decorator-gen-296>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 323, in _model_create_single
return create(self, arg)
File "/odoo/odoo-server/addons/website_slides/models/res_users.py", line 13, in create
user = super(Users, self).create(values)
File "<decorator-gen-198>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 344, in _model_create_multi
return create(self, [arg])
File "/odoo/odoo-server/addons/digest/models/res_users.py", line 12, in create
users = super(ResUsers, self).create(vals_list)
File "<decorator-gen-165>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/note/models/res_users.py", line 17, in create
users = super().create(vals_list)
File "<decorator-gen-157>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/gamification/models/res_users.py", line 44, in create
res = super(Users, self).create(values_list)
File "<decorator-gen-146>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/auth_signup/models/res_users.py", line 241, in create
users = super(ResUsers, self).create(vals_list)
File "<decorator-gen-144>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/mail/models/res_users.py", line 82, in create
users = super(Users, self).create(vals_list)
File "<decorator-gen-120>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 326, in _model_create_single
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/odoo/odoo-server/odoo/api.py", line 326, in <genexpr>
return self.browse().concat(*(create(self, vals) for vals in arg))
File "/odoo/odoo-server/addons/generic_security_restriction/models/res_users.py", line 17, in create
return super(ResUsers, self).create(values)
File "<decorator-gen-107>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 344, in _model_create_multi
return create(self, [arg])
File "/odoo/odoo-server/odoo/addons/base/models/res_users.py", line 1321, in create
users = super(UsersView, self).create(new_vals_list)
File "<decorator-gen-105>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/res_users.py", line 1078, in create
return super(UsersImplied, self).create(vals_list)
File "<decorator-gen-99>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/res_users.py", line 543, in create
users = super(Users, self).create(vals_list)
File "<decorator-gen-65>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "<decorator-gen-13>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/models.py", line 3861, in create
parents = self.env[model_name].create([
File "<decorator-gen-257>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/base_vat/models/res_partner.py", line 554, in create
return super(ResPartner, self).create(vals_list)
File "<decorator-gen-210>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/account/models/partner.py", line 493, in create
return super().create(vals_list)
File "<decorator-gen-185>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/partner_autocomplete/models/res_partner.py", line 183, in create
partners = super(ResPartner, self).create(vals_list)
File "<decorator-gen-95>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/res_partner.py", line 569, in create
partners = super(Partner, self).create(vals_list)
File "<decorator-gen-138>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 264, in create
threads = super(MailThread, self).create(vals_list)
File "<decorator-gen-241>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/addons/website/models/mixins.py", line 169, in create
records = super(WebsitePublishedMixin, self).create(vals_list)
File "<decorator-gen-65>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/addons/base/models/ir_fields.py", line 534, in create
recs = super().create(vals_list)
File "<decorator-gen-13>", line 2, in create
File "/odoo/odoo-server/odoo/api.py", line 345, in _model_create_multi
return create(self, arg)
File "/odoo/odoo-server/odoo/models.py", line 3900, in create
record._update_cache(vals)
File "/odoo/odoo-server/odoo/models.py", line 5153, in _update_cache
cache.set(self, field, field.convert_to_cache(value, self, validate))
File "/odoo/odoo-server/odoo/fields.py", line 2416, in convert_to_cache
raise ValueError("Wrong value for %s: %r" % (self, value))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 316, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Wrong value for res.partner.company_type: '0'
我已经升级了基础模块,我已经禁用了自动操作,在模块上搜索相关的东西但没有。
有什么解决办法吗?
提前致谢
显然,之前的 Odoo 开发人员在 User-defined Defaults
菜单的 company_type
上分配了默认值。