Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to use my own template?

Jon Wong
on 9/16/15, 2:05 AM 450 views

I create a new theme module, extended 'web.main.Home' controller, and tried to render my own template:

<template id="theme.login" name="my_login">

I get error: Template 'theme.login' not found.

Is there something I must do to register my template with Odoo?


What about this tutorial (http://odoo-80.readthedocs.org/en/latest/guides/themes.html) that uses id of "website.hello"?


Axel Mendoza

--Axel Mendoza--
| 6 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 9/16/15, 2:19 AM

Your template need to be like this:

<template id="theme_login" name="my_login" inherit_id="web.main.Home">

remove the '.' in the template id

Jon Wong
On 9/16/15, 3:09 AM


What about this tutorial (http://odoo-80.readthedocs.org/en/latest/guides/themes.html) that uses id of "website.hello"?

when you put a '.' in an template or record Odoo will split the string to get the first part as the module and the second part as the id that you want to use for your template/record to change that template/record and that id need to exist registered in ir.model.data to be found and the id 'website.hello' is something created for that example, it's not part of Odoo as neither 'theme.login', if this is a template defined in a module named 'theme' with the name 'login' then you need to be sure that the module it's installed and put a depend with that module, otherwise change the id of your template accordingly

Axel Mendoza
on 9/16/15, 4:08 AM

@Axel: I tried what you suggested, id of "theme_login", name of "my_login", inherit_id of "web.main.Home". The new error is "Invalid template id: 'theme_login'". The reason I don't want to inherit "web.login" is because I want to completely override that template.

Jon Wong
on 9/16/15, 4:28 AM

@Axel: Sorry, my mistake. The error is actually: "ParseError: "External ID not found in the system: web.main.Home" while parsing".

Jon Wong
on 9/16/15, 4:41 AM

@Axel: What works is this: id of "web.theme_login", no inherit_id attribute. Can you explain to me why that works and why your suggestion didn't work? I just hope to understand Odoo more. I'll mark your explanation as the answer to this question. Thanks!

Jon Wong
on 9/16/15, 4:44 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 9/16/15, 2:05 AM
Seen: 450 times
Last updated: 9/16/15, 3:09 AM