I'm having a problem with the create button appearing in tree view. Neither does the next or previous buttons appear in the form view. However, the data is being retrieved from the database.
Tree form with missing buttons
The module I'm trying to make is an extended module of the human resource module, like the included HR attendance module. The extended module doesn't inherit anything and security hasn't been added yet. Only a menu item is added to the main module.
A module I previously created by inheriting the main HR module created the buttons as expected.
Expected outcome(different module)
training.py:
from openerp import fields, models, api
class ew_training(models.Model):
_name = 'hr.training'
var = fields.Char( string='variable')
training_view.xml:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Main Submenu -->
<menuitem id="menu_training_tree" action="action_view_training"
parent="hr.menu_hr_main" sequence="6"/>
<record id="action_view_training" model="ir.actions.act_window">
<field name="name">Training</field>
<field name="res_model">hr.training</field>
<field name="view_type">tree</field>
<field name="view_mode">tree,form</field>
</record>
<record id="view_training_tree" model="ir.ui.view">
<field name="name">hr.training.tree</field>
<field name="model">hr.training</field>
<field name="arch" type="xml">
<tree>
<field name="var"/>
</tree>
</field>
</record>
<record id="view_training_form" model="ir.ui.view">
...
</record>
</data>
</openerp>
Please try avoid using the old API