Hi I have created a website of two pages one page is the home page and other page is form page. Home page i have devloped form the snippets, drag and drop from the website while the other form page i have developed it from the code, template in xml and the controllers. When i access the databse to login like when i opned the login page the login in not appearing its just showing the two pages.
tell me how to resolve it?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
I see exactly why your login page is being overridden — it’s because of this line in your template:
xml
CopierModifier
<t t-if="request.httprequest.path != '/web/login'">
You’ve wrapped the entire website.layout call (and therefore the whole page rendering) inside a condition.
If the request path is /web/login, your template skips everything, and because you registered this template as the view_id for your /book-now page but didn’t isolate it properly, it’s essentially replacing the normal /web/login page view.
In Odoo, website views and web views share the same QWeb environment, so if your template isn’t scoped to a specific route or page, it can unintentionally override default views.
How to fix
1️⃣ Remove the t-if check entirely
You don’t need:
xml
CopierModifier
<t t-if="request.httprequest.path != '/web/login'">
Odoo won’t call your /book-now page template when rendering /web/login, unless you’ve forced it via an override.
2️⃣ Scope your template only to /book-now
Right now your template is a standalone <template> without inherit_id, which means Odoo treats it as a full page view and can override other routes.
You can fix it by using the page option in your record definition:
xml
CopierModifier
<record id="custom_contact_us_page" model="website.page"> <field name="name">Book Now</field> <field name="url">/book-now</field> <field name="view_id" ref="task_extension.book_now_template"/> <field name="is_published">True</field> </record>
Make sure book_now_template does not run for other routes.
3️⃣ If you want logic to hide things on /web/login
Do that inside your page content, not wrapping the whole layout:
xml
CopierModifier
<t t-call="website.layout"> <t t-if="request.httprequest.path != '/web/login'"> <!-- Your custom sections --> </t> </t>
This way, the /web/login view still works normally.
4️⃣ Clear cache and re-install the module
Odoo caches QWeb templates in memory, so after you fix the XML:
bash
CopierModifier
./odoo-bin -u your_module_name -d your_database_name
or restart Odoo entirely.
No, I havent ry to uninstall and reinstall it was installed at start, this is the problem
http://localhost:8069/web/login
when i use this link it is not showing the login page, I want to know is their any problem with my code i.e controllers or xml template that is blockng anything to reach the login page, template where i login to the database....
@Lyaazale Mouad
I have followed all your instructions
BY running this ./odoo-bin -u task_extension -d nova_plumbers
the login appears
but by running this python3 /odoo/odoo18/src/odoo-bin --xmlrpc-port=8069 --addons-path="/odoo/odoo18/src/addons,/home/arsam/odoo/odoo18/src/enterprise,/odoo/odoo18/env/nova_plumbers_uk" -u task_extension -d nova_plumbers
login not appears
i have uninstalled the module and again installed
without the module when it is in installed form it is showng the login page but when i installed the module the page of login is not showing
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati
What does "its just showing the two pages" mean? What is the source code of that "page i have developed it from the code, template in xml and the controllers"?
Its showing this page when i try to login to the databse and this page page which is showng is for the public users (which i developed form drag n drop feature on the odoo website) and the other page which sis book now page is hidden for public usrs only for internal users(i devloped that page from the scratch). Now tell what i have to do that to login page for databse could appear?
Again, what is the source code of that page you've developed? /web/login can't just vanish on it's own.
Any solution?
Unfortunately, this doesn't give a better picture of what you're actually asking.
Running you module, this is the result:
- http://localhost:8069/ --> shows home page
- http://localhost:8069/web/login --> shows login screen
- http://localhost:8069/submit/task/logged_in --> if not logged in, redirects to http://localhost:8069/web/login
- http://localhost:8069/submit/task/logged_in --> if logged in, redirects to http://localhost:8069/book-now
- http://localhost:8069/submit/task/logged_out --> if not logged in, redirects to http://localhost:8069/book-now
- http://localhost:8069/submit/task/logged_out --> if logged in, redirects to http://localhost:8069/book-now
'<t t-if="request.httprequest.path != '/web/login'">' - this doesn't make any sense since your template isn't called when that controller route is used anyways.
You may however have any issue with previous developments. Did you try to uninstall and re-install your custom module?