Odoo:ValueError:字段website_published不存在

时间:2019-02-11 02:08:56

标签: python odoo

我目前正在使用Odoo 12,并且已经安装了以下应用程序:CRM,网站,项目,发票,销售,便笺,购买,员工,费用,联系人,讨论和日历。

从今天早上开始,我一直无法打开联系人应用程序。它引发以下错误:

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 312, 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 696, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 344, 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 337, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 939, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 962, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 745, in call_kw
    return _call_kw_model(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 718, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1376, in load_views
    for [v_id, v_type] in views
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1376, in <dictcomp>
    for [v_id, v_type] in views
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 410, in fields_view_get
    res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1462, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1095, in postprocess_and_fields
    self.raise_view_error(message, view_id)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 548, in raise_view_error
    raise ValueError(message)
ValueError: Field `website_published` does not exist

Error context:
View `res.partner.form`
[view_id: 113, xml_id: base.view_partner_form, model: res.partner, parent_id: n/a]

有解决此问题的简便方法吗?

1 个答案:

答案 0 :(得分:0)

就我而言:

编辑视图:view.res.partner.form.website

删除按钮如下

<?xml version="1.0"?>
<data>
  <!--
                <button name="toggle_active" position="before">
                    <button class="oe_stat_button" name="website_publish_button" type="object" icon="fa-globe">
                        <field name="website_published" widget="website_button"/>
                    </button>
                </button>
                -->
            </data>