我正在Windows上运行odoo v12.0。遵循有关如何"Create a specific page layout"的教程时,出现错误:
"Element '<t t-name="theme_tutorial.services_page_template">' cannot be located in parent view"
您能帮我解决该错误吗?
Error:
Odoo Server Error
Traceback (most recent call last):
File "D:\NS Works\Code\Odoo\odoo\models.py", line 1108, in _validate_fields
check(self)
File "d:\ns works\code\odoo\odoo\addons\base\models\ir_ui_view.py", line 345, in _check_xml
view_def = view.read_combined(['arch'])
File "d:\ns works\code\odoo\odoo\addons\base\models\ir_ui_view.py", line 791, in read_combined
arch_tree = self.apply_inheritance_specs(arch_tree, view_arch, parent_view['id'])
File "d:\ns works\code\odoo\odoo\addons\base\models\ir_ui_view.py", line 720, in apply_inheritance_specs
self.raise_view_error(_("Element '%s' cannot be located in parent view") % tag, inherit_id)
File "d:\ns works\code\odoo\odoo\addons\base\models\ir_ui_view.py", line 548, in raise_view_error
raise ValueError(message)
ValueError: Element '`<t t-name="theme_tutorial.services_page_template">'`" cannot be located in parent view
...
<record id="services_page" model="website.page">
<field name="name">Services page</field>
<field name="website_published">True</field>
<field name="url">/services</field>
<field name="type">qweb</field>
<field name="key">theme_tutorial.services_page</field>
<field name="arch" type="xml">
<t t-name="theme_tutorial.services_page_template">
<t t-call="website.layout">
<div id="wrap">
<div class="container">
<h1>Our Services</h1>
<ul class="services">
<li>Cloud Hosting</li>
<li>Support</li>
<li>Unlimited space</li>
</ul>
<!-- === Snippets' area === -->
<div class="oe_structure"/>
</div>
</div>
</t>
</t>
</field>
</record>
感谢和问候。