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

Login required for some web pages

any ideas?

For example: http://www.site.com/page/contactus

Avatar
Discard
Best Answer

You can use these apps (search apps in odoo apps by names provided below) to change the whole login page style.

Moreover, these apps provide the ability to define your own favicon and logo as you wish.

Apps Name:

Minimalist Login Form

Creative Login Form

Advanced Login Form


Avatar
Discard
Author Best Answer

Thanks Alex,

I do not know how to program a controller. Review the documentation to get an idea. Any suggestions to start?

Avatar
Discard
Best Answer

You just need to have a controller for that URL route with auth="user", like:

import openerp
from openerp.addons.web import http
from openerp.addons.website.controllers.main import Website
class ContactController(openerp.http.Controller):
    @http.route(['/page/contactus'], type='http', auth="user", website=True)
    def contact(self, **kw):
        return Website().page(**kw)

Hope that help you

Interesting Note: website=True makes a redirect to attach the lang value to the url when your website allow and have multiple langs setted

Avatar
Discard