Odoo 错误异常("Cannot update missing record %r" % xid)
Odoo error Exception("Cannot update missing record %r" % xid)
helo 我正在尝试在没有 odoo 的网站构建器的情况下修改 odoo12 中的网站页脚
我收到错误:
Odoo 服务器错误
Traceback (most recent call last):
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 736, in _tag_template
return self._tag_record(record, data_node)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 613, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'website.layout_footer'
这也是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="website.layout_footer" inherit_id="website.footer_default">
<xpath expr="//div[@id='connect']" position="replace">
<div class="container">
<div class="row" style="margin-top : 40px">
<div class="col-sm-6 col-md-4">
<div class="wow fadeInDown" data-wow-delay="0.1s">
<div class="widget">
<h5>Quick Navigation</h5>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Event</a></li>
<li><a href="#">Join US</a></li>
</ul>
</div>
</div>
<div class="widget">
<h5>Follow us</h5>
<ul class="company-social">
<li class="social-facebook"><a href="http://www.facebook.com/samplelink/"><i class="fa fa-facebook"></i></a></li>
<li class="social-vimeo"><a href="https://www.linkedin.com/sample-company"><i class="fa fa-linkedin-square"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</xpath>
</template>
</data>
</odoo>
我也遇到了其他错误,原因似乎相同
Traceback (most recent call last):
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/api.py", line 759, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/api.py", line 746, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-61>", line 2, in button_immediate_install
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 421, in load_modules
loaded_modules, update_module, models_to_check)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 802, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 865, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 755, in parse
self.parse(rec, mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 764, in parse
exc_info[2]
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 736, in _tag_template
return self._tag_record(record, data_node)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 613, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
odoo.tools.convert.ParseError: "Cannot update missing record 'website.layout_footer'" while parsing None:4, near
<data inherit_id="website.footer_default">
<xpath expr="//div[@id='connect']" position="replace">
<div class="container">
<div class="row" style="margin-top : 40px">
<div class="col-sm-6 col-md-4">
<div class="wow fadeInDown" data-wow-delay="0.1s">
<div class="widget">
<h5>Quick Navigation</h5>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Event</a></li>
<li><a href="#">Join US</a></li>
</ul>
</div>
</div>
<div class="widget">
<h5>Follow us</h5>
<ul class="company-social">
<li class="social-facebook"><a href="http://www.facebook.com/sample/"><i class="fa fa-facebook"/></a></li>
<li class="social-vimeo"><a href="https://www.linkedin.com/company-sample/"><i class="fa fa-linkedin-square"/></a></li>
</ul>
</div>
</div>
</div>
</div>
</xpath>
</data>
除了使用 odoo 网站构建器之外,我没有使用 odoo 对网站进行定制的经验,所以我想学习制作可以为我的投资组合定制网站的模块,请帮助我
您只需要将 id="website.layout_footer" 更改为 id="layout_footer".
如果你这样做 id="website.layout_footer"。 Odoo 认为您尝试从模块网站调用并覆盖记录 layout_footer。但是 layout_footer 不存在于网站中。
helo 我正在尝试在没有 odoo 的网站构建器的情况下修改 odoo12 中的网站页脚 我收到错误: Odoo 服务器错误
Traceback (most recent call last):
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 736, in _tag_template
return self._tag_record(record, data_node)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 613, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
Exception: Cannot update missing record 'website.layout_footer'
这也是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="website.layout_footer" inherit_id="website.footer_default">
<xpath expr="//div[@id='connect']" position="replace">
<div class="container">
<div class="row" style="margin-top : 40px">
<div class="col-sm-6 col-md-4">
<div class="wow fadeInDown" data-wow-delay="0.1s">
<div class="widget">
<h5>Quick Navigation</h5>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Event</a></li>
<li><a href="#">Join US</a></li>
</ul>
</div>
</div>
<div class="widget">
<h5>Follow us</h5>
<ul class="company-social">
<li class="social-facebook"><a href="http://www.facebook.com/samplelink/"><i class="fa fa-facebook"></i></a></li>
<li class="social-vimeo"><a href="https://www.linkedin.com/sample-company"><i class="fa fa-linkedin-square"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</xpath>
</template>
</data>
</odoo>
我也遇到了其他错误,原因似乎相同
Traceback (most recent call last):
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 941, in __call__
return self.method(*args, **kw)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/api.py", line 759, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/api.py", line 746, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-61>", line 2, in button_immediate_install
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 421, in load_modules
loaded_modules, update_module, models_to_check)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 802, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 865, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 755, in parse
self.parse(rec, mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 764, in parse
exc_info[2]
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 736, in _tag_template
return self._tag_record(record, data_node)
File "/media/renokurnia/8C2E74FE2E74E31E/Archives/Blue Print/RENODEV/odoo12/odoo/tools/convert.py", line 613, in _tag_record
raise Exception("Cannot update missing record %r" % xid)
odoo.tools.convert.ParseError: "Cannot update missing record 'website.layout_footer'" while parsing None:4, near
<data inherit_id="website.footer_default">
<xpath expr="//div[@id='connect']" position="replace">
<div class="container">
<div class="row" style="margin-top : 40px">
<div class="col-sm-6 col-md-4">
<div class="wow fadeInDown" data-wow-delay="0.1s">
<div class="widget">
<h5>Quick Navigation</h5>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Event</a></li>
<li><a href="#">Join US</a></li>
</ul>
</div>
</div>
<div class="widget">
<h5>Follow us</h5>
<ul class="company-social">
<li class="social-facebook"><a href="http://www.facebook.com/sample/"><i class="fa fa-facebook"/></a></li>
<li class="social-vimeo"><a href="https://www.linkedin.com/company-sample/"><i class="fa fa-linkedin-square"/></a></li>
</ul>
</div>
</div>
</div>
</div>
</xpath>
</data>
除了使用 odoo 网站构建器之外,我没有使用 odoo 对网站进行定制的经验,所以我想学习制作可以为我的投资组合定制网站的模块,请帮助我
您只需要将 id="website.layout_footer" 更改为 id="layout_footer".
如果你这样做 id="website.layout_footer"。 Odoo 认为您尝试从模块网站调用并覆盖记录 layout_footer。但是 layout_footer 不存在于网站中。