Skip to Content
Menu
This question has been flagged
3 Replies
9927 Views

Theme tutorial v12 example raising an error on URL http://localhost:8071/services

<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<!-- === Services Page === -->
<template id="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>
</template>
<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="view_id" ref="services_page_template"/>
</record>

</odoo>

Error:
node = et.find(exception.path.replace('/templates/t/', './'))
AttributeError: 'NoneType' object has no attribute 'replace' - - -



But when we create a menu it created sucessfully the menu .By using theme tutorial example code.
But when we clicks the menu: service in navigation bar It show internal error.

<record id="services_page_link" model="website.menu">
<field name="name">Services</field>
<field name="page_id" ref="services_page"/>
<field name="parent_id" ref="website.main_menu" />
<field name="sequence" type="int">99</field>
</record>

Same here also how to create a separate menu for multiple website via code.Any idea?
Avatar
Discard
Best Answer
You need to add the module name in ref="module_name.services_page_template" in that code. Thanks.
<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="view_id" ref="services_page_template"/>
</record>
like that.
<field name="view_id" ref="module_name.services_page_template"/>
Avatar
Discard
Best Answer

Hi,

You can create two separate web pages for the websites by giving the website id while creating the website page.

See the sample,

<record id="home_option_10_demo_page" model="website.page">
<field name="name">Home Option 10</field>
<field name="url">/home-option-10</field>
<field name="view_id" ref="alan_customize.Home_Option_10_view"/>
<field name="website_indexed">True</field>
<field name="website_published">True</field>
<field name="website_id" ref="website.default_website"/>
</record>


Thanks

Avatar
Discard
Author

After these changes also. Still facing the error template not found. Have u tried by clicking the URL it shows page?

Any examples further to proceed.

Error message:

None

Traceback (most recent call last):

File "/opt/odoo/12.0-LS/12.0/odoo/tools/cache.py", line 88, in lookup

r = d[key]

File "/opt/odoo/12.0-LS/12.0/odoo/tools/func.py", line 69, in wrapper

return func(self, *args, **kwargs)

File "/opt/odoo/12.0-LS/12.0/odoo/tools/lru.py", line 44, in __getitem__

a = self.d[obj].me

KeyError: ('ir.qweb', <function IrQWeb.compile at 0x7fb38f3c3400>, 4, ('en_US', True, None, None, False, 1))

Template not found

Template: 4

Related Posts Replies Views Activity
1
Nov 22
1209
3
May 22
4368
1
Aug 19
3440
1
Sep 21
3843
1
Nov 16
5369