跳至内容
菜单
此问题已终结

I try to add new fields in HR module like gender and Degree in my server  by using Studio. I add gender filed successfully but for Degree field with related field itself then it shows error below and I can not access my odoo anymore. 

Here is the error: 

Traceback (most recent call last):
  File "/cloudclusters/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/cloudclusters/odoo/odoo/http.py", line 806, in dispatch
    r = self._call_function(**self.params)
  File "/cloudclusters/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/cloudclusters/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/cloudclusters/odoo/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/cloudclusters/odoo/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/cloudclusters/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/cloudclusters/odoo/odoo/addons/website/controllers/main.py", line 79, in index
    website_page = request.env['ir.http']._serve_page()
  File "/cloudclusters/odoo/odoo/addons/website/models/ir_http.py", line 254, in _serve_page
    page = request.env['website.page'].sudo().search(published_domain, order='website_id asc', limit=1)
  File "/cloudclusters/odoo/odoo/models.py", line 1699, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/cloudclusters/odoo/odoo/models.py", line 4487, in _search
    query = self._where_calc(args)
  File "/cloudclusters/odoo/odoo/models.py", line 4243, in _where_calc
    return expression.expression(domain, self).query
  File "/cloudclusters/odoo/odoo/osv/expression.py", line 438, in __init__
    self.parse()
  File "/cloudclusters/odoo/odoo/osv/expression.py", line 643, in parse
    parent_model = model.env[field.related_field.model_name]
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/cloudclusters/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/cloudclusters/odoo/odoo/http.py", line 806, in dispatch
    r = self._call_function(**self.params)
  File "/cloudclusters/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/cloudclusters/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/cloudclusters/odoo/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/cloudclusters/odoo/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/cloudclusters/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/cloudclusters/odoo/odoo/addons/website/controllers/main.py", line 79, in index
    website_page = request.env['ir.http']._serve_page()
  File "/cloudclusters/odoo/odoo/addons/website/models/ir_http.py", line 254, in _serve_page
    page = request.env['website.page'].sudo().search(published_domain, order='website_id asc', limit=1)
  File "/cloudclusters/odoo/odoo/models.py", line 1699, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/cloudclusters/odoo/odoo/models.py", line 4487, in _search
    query = self._where_calc(args)
  File "/cloudclusters/odoo/odoo/models.py", line 4243, in _where_calc
    return expression.expression(domain, self).query
  File "/cloudclusters/odoo/odoo/osv/expression.py", line 438, in __init__
    self.parse()
  File "/cloudclusters/odoo/odoo/osv/expression.py", line 643, in parse
    parent_model = model.env[field.related_field.model_name]
AttributeError: 'NoneType' object has no attribute 'model_name'

How can I solve this problem?


形象
丢弃

Please share the code u wrote to add these fields

编写者

I use studio module to edit field on cloud or server directly and I don't know what to do to solve this problem steps by steps

相关帖文 回复 查看 活动
1
8月 25
311
1
7月 25
662
1
7月 25
990
2
5月 25
1585
1
7月 25
1321