无法在项目模块中继承视图,它显示以下错误。
回溯(最后一次调用):文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\tools\convert.py”,第 680 行,在 _tag_root f(rec) 文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\tools\convert.py”,第 583 行,在 _tag_record 记录 = model._load_records([data], self.mode == 'update') 文件“C:\Program Files\Odoo 15.0. 20211022\server\odoo\models.py",第 4431 行,在 _load_records 记录 = self._load_records_create([data['values'] for data in to_create]) 文件“C:\Program Files\Odoo 15.0.20211022\server\ odoo\models.py”,第 4360 行,在 _load_records_create 中返回 self.create(values) 文件“”,第 2 行,在创建文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\api.py”中,第 410 行,在 _model_create_multi 返回 create(self, arg) File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_ui_view.py",第 539 行,在创建结果 = super(View, self.with_context(ir_ui_view_partial_validation=True)).create(vals_list) 文件“”,第 2 行,在在 _model_create_multi 中创建文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\api.py”,第 410 行 return create(self, arg) File “C:\Program Files\Odoo 15.0.20211022\server\ odoo\addons\base\models\ir_fields.py”,第 613 行,在创建 recs = super().create(vals_list) 文件“”中,第 2 行,在创建文件“C:\Program Files\Odoo 15.0.20211022\ server\odoo\api.py”,第 410 行,在 _model_create_multi 返回 create(self, arg) 文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\models.py”,第 4096 行,在创建记录中 = self._create(data_list) 文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\models.py”,第 4261 行,在 _create 记录中。_validate_fields(data_list 中数据的名称,data['stored'] 中的名称)文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\models.py”,行1383,在 _validate_fields check(self) 文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_ui_view.py”,第 460 行,在 _check_xml 中引发 err.with_traceback(e.traceback ) 来自无文件 "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_ui_view.py",第 434 行,在 _check_xml view._validate_view(combined_arch, view.model) 文件 "C :\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_ui_view.py”,第 1293 行,在 _validate_view 验证器(节点,name_manager,node_info)文件“C:\Program Files\Odoo 15.0.20211022 \server\odoo\addons\base\models\ir_ui_view.py",第 1402 行,在 _validate_tag_field self._raise_view_error(msg, node) 文件“C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\ models\ir_ui_view.py",第 739 行,在 _raise_view_error 中从 from_exception odoo.exceptions.ValidationError 引发错误:验证附近视图时出错:
<field name="allow_subtasks" invisible="1"/>
<field name="is_closed" invisible="1"/>
<field name="allow_recurring_tasks" invisible="1"/>
<field name="repeat_show_dow" invisible="1"/>
<field name="repeat_show_day" invisible="1"/>
Field "x_level1_qc" does not exist in model "project.task"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 916, in __call__
return self.method(*args, **kw)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 535, in response_wrap
response = f(*args, **kw)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\web\controllers\main.py", line 1336, in call_button
action = self._call_kw(model, method, args, kwargs)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\web\controllers\main.py", line 1324, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-74>", line 2, in button_immediate_install
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_module.py", line 483, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\addons\base\models\ir_module.py", line 600, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\modules\registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\modules\loading.py", line 476, in load_modules
loaded_modules, update_module, models_to_check)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\modules\loading.py", line 365, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\modules\loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\modules\loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\tools\convert.py", line 745, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\tools\convert.py", line 811, in convert_xml_import
obj.parse(doc.getroot())
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\tools\convert.py", line 731, in parse
self._tag_root(de)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\tools\convert.py", line 691, in _tag_root
raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Program Files\Odoo 15.0.20211022\server\odoo\http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing file:/c:/program%20files/odoo%2015.0.20211022/server/odoo/addons/custom/view24.xml:3
Error while validating view near:
<field name="allow_subtasks" invisible="1"/>
<field name="is_closed" invisible="1"/>
<field name="allow_recurring_tasks" invisible="1"/>
<field name="repeat_show_dow" invisible="1"/>
<field name="repeat_show_day" invisible="1"/>
Field "x_level1_qc" does not exist in model "project.task"
View error context:
{'file': 'c:\\program files\\odoo '
'15.0.20211022\\server\\odoo\\addons\\custom\\view24.xml',
'line': 4,
'name': 'task.inherit.form',
'view': ir.ui.view(991,),
'view.model': 'project.task',
'view.parent': ir.ui.view(508,),
'xmlid': 'task_inherit_form'}