Odoo Help


How to create homepage for every user?

on 2/10/14, 2:51 AM 1,190 views

I have a requirement that each time users log in to the server, they have to see some 'Home Page'

In my case, users have to see some announcement in HTML webpage.

Is it possible to create this?

I have tried some but it's not perfect.

My progress are :

  1. Able to view the announcement by HTML

  2. Got stuck in going back to normal OE view. (Since the method hides the topbar and sidebar)

Here is my method :

  1. Users first view is 'view_home_form'

    <record id="view_home_form" model="ir.ui.view">
        <field name="name">menu.home.form</field>
        <field name="model">menu.home</field>
        <field name="arch" type="xml">
        <form string="home" version="7.0">
                    <div class="oe_right oe_button_box" name="button_box">
                        <button name="method_name" string="Open Form" type="object"/>
                    <field name="name" widget="html" readonly="1" nolabel="1"/>
                        <style> .openerp .oe_view_manager table.oe_view_manager_header { display:none } </style>
                        <style> .openerp .oe_topbar { display: none;} </style>
                        <style> .openerp .oe_form_sheet_width { min-width: 950px;
                                max-width: 1560px; height:1000px background-color: #FFFF00} </style>
  2. Which is defined by the action

    <record id="action_menu_home_project2" model="ir.actions.act_window" >
        <field name="name">First Menu</field>
        <field name="res_model">menu.home</field>           
        <field name="context">{'search_default_mine':1}</field>
        <field name="view_type">form</field>
        <field name="view_mode">form</field>
  3. This is the function of button

    def method_name(self, cr, uid, ids, context=None): return { 'view_type': 'form', 'view_mode': 'form', 'context': context, 'res_model': 'hr.employee', 'nodestroy': False, }

The conclusion is : I have a problem that my OE view is not turning back to normal. The sidebar and topbar are hidden forever.

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 2/10/14, 2:51 AM
Seen: 1190 times
Last updated: 3/16/15, 8:10 AM