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:
<openerp>
<data>
<!--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">
<group>
</group>
</form>
</field>
</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'/>
</record>
<!-- top level menu: no parent -->
<menuitem id="main_button_menu" name="Leistungserfassung"/>
<menuitem id="button_menu" name="button demo"
parent="main_button_menu"/>
<menuitem id="menu_detail_logging"
action="leistungserfassung_action" parent="button_menu"
sequence="20"/>
</data>
</openerp>
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.