Error context: View `n/a` [view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a]
-
在
sps_product
模块中继承product.template
,自定义了form,tree
视图,在sps_eco
模块引用自定义的form
视图,如下代码,报错如下,找不到对应的xml id
,而且报错字段不存在,这些不存在的字段,都是官方中已经定义了的。我的现在是
odoo11
环境,是哪里我忽略了导致错误的吗?<field name="product_template_id" context="{'form_view_ref': 'sps_product.product_template_form_view', 'tree_view_ref': 'sps_product.product_template_tree_view'}"/>
2018-06-19 02:43:04,866 6252 INFO 0607_v11 odoo.addons.base.ir.ir_ui_view: Field `state` does not exist Error context: View `n/a` [view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a] 2018-06-19 02:43:04,866 6252 ERROR 0607_v11 odoo.http: Exception during JSON request handling. Traceback (most recent call last): File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 650, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/tools/pycompat.py", line 87, in reraise raise value File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 692, in dispatch result = self._call_function(**self.params) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 342, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 335, in checked_call result = self.endpoint(*a, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 936, in __call__ return self.method(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/http.py", line 515, in response_wrap response = f(*args, **kw) File "/home/hui/odoo-dev/odoo11/odoo11/addons/web/controllers/main.py", line 931, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/addons/web/controllers/main.py", line 923, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/api.py", line 687, in call_kw return call_kw_model(method, model, args, kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/api.py", line 672, in call_kw_model result = method(recs, *args, **kwargs) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/models.py", line 1295, in load_views for [v_id, v_type] in views File "/home/hui/odoo-dev/odoo11/odoo11/odoo/models.py", line 1295, in <dictcomp> for [v_id, v_type] in views File "/home/hui/odoo-dev/odoo11/odoo11/odoo/models.py", line 1381, in fields_view_get xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/addons/base/ir/ir_ui_view.py", line 1042, in postprocess_and_fields self.raise_view_error(message, view_id) File "/home/hui/odoo-dev/odoo11/odoo11/odoo/addons/base/ir/ir_ui_view.py", line 503, in raise_view_error raise ValueError(message) ValueError: Field `state` does not exist Error context: View `n/a` [view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a]