Odoo Help


_inherits = "hr_timesheet_sheet" question , how to import in a new navigation button at the top bar.

on 6/7/16, 10:30 AM 542 views

I'm making a new modul, in this modul I want to import the hr_timesheet stuff from the standard modul from odoo8.

I read that with _inherits = I can use the same for example "fields" from the standard hr_timesheet modul in my new modul.

I want to add those fields in a new view at a new navigation button in odoo.

How can I do that view in a simple way.

In the topbar in odoo I have make a button with this:



<!--Gets triggered by the record with id 'buttons_example_action'. Which in turn is triggered on click. -->

<record model="ir.ui.view" id="ir.ui.view">

<field name="name">Buttons</field>

<field name="model">button.demo</field>


<field name="type">form</field>

<field name="arch" type="xml">

<form string="Button record">






<!--The action -->

<record model="ir.actions.act_window" id="leistungserfassung_action">

<field name="name">meine Leistungserfassung</field>

<field name="res_model">button.demo</field>

<field name="view_type">form</field>

<field name="view_mode">form,tree</field>

<field name='view_id' ref='view_buttons_form'/>


<!-- top level menu: no parent -->

<menuitem id="main_button_menu" name="Leistungserfassung"/>

<menuitem id="button_menu" name="button demo"


<menuitem id="menu_detail_logging"

action="leistungserfassung_action" parent="button_menu"




How can I inherit the hr_timesheet view in this new button?

I try that with making a class like this:

from openerp import models, fields, api

#Non-odoo library

import random

from random import randint

import string

class button_action_demo(models.Model):

_inherits = "hr_timesheet_sheet.sheet"

but this is not working.

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

1 follower(s)


Asked: 6/7/16, 10:30 AM
Seen: 542 times
Last updated: 6/7/16, 10:32 AM