枢轴视图在odoo 8中不显示

时间:2018-07-21 12:58:52

标签: python-2.7 odoo-8

我已经在odoo 8中创建了一个自定义模块,该模块允许我添加一个sub_menu“约定”,我想显示一个枢轴视图以显示用作表的约定编号。我的问题是如何显示枢轴视图,因为我发现了在odoo版本8中显示枢轴视图的问题。我在odoo版本9中尝试了该模块,并且效果很好,但在版本8中,即使枢轴视图的图标也未显示。有任何帮助的想法吗?

enter image description here

convention.xml

<?xml version="1.0" encoding="UTF-8"?>

<openerp>
<data>
  <record id="convention_table_tree_view" model="ir.ui.view">
    <field name="name">Convention Table Tree View</field>
    <field name="model">hr.convention</field>
    <field name="arch" type="xml">
        <tree>
            <field name="Degree"/>
            <field name="Categorie_11"/>
            <field name="Categorie_12"/>
            <field name="Categorie_13"/>
            <field name="Categorie_21"/>
            <field name="Categorie_22"/>
            <field name="Categorie_23"/>
            <field name="Categorie_31"/>
            <field name="Categorie_32"/>
            <field name="Categorie_33"/>
            <field name="Categorie_41"/>
            <field name="Categorie_42"/>
            <field name="Categorie_43"/>
        </tree>
    </field>
</record>
<!-- salary_table graph view -->
<record id="convention_table_graph_view" model="ir.ui.view">
    <field name="name">Convention Table Graph View</field>
    <field name="model">hr.convention</field>
    <field name="arch" type="xml">
        <graph>              
            <field name="Degree" type="row"/>
        </graph>
    </field>
</record>
<!-- salary_table Pivot view -->
<record id="convention_table_pivot_view" model="ir.ui.view">
    <field name="name">Salary Table Pivot View</field>
    <field name="model">hr.convention</field>
    <field name="arch" type="xml">
        <graph string="pivot" type="pivot">
            <field name="Categorie_11" type="measure"/>
            <field name="Categorie_12" type="measure"/>
            <field name="Categorie_13" type="measure"/>
            <field name="Categorie_21" type="measure"/>
            <field name="Categorie_22" type="measure"/>
            <field name="Categorie_23" type="measure"/>
            <field name="Categorie_31" type="measure"/>
            <field name="Categorie_32" type="measure"/>
            <field name="Categorie_33" type="measure"/>
            <field name="Categorie_41" type="measure"/>
            <field name="Categorie_42" type="measure"/>
            <field name="Categorie_43" type="measure"/>
            <field name="Degree" type="row"/>
        </graph>
    </field>
</record>

    <record model="hr.convention" id="five1">
    <field name="Categorie_11" >2.253</field>
    <field name="Categorie_12" >2.418</field>
    <field name="Categorie_13" >2.494</field>
    <field name="Categorie_21" >2.548</field>
    <field name="Categorie_22" >2.784</field>
    <field name="Categorie_23" >2.964</field>
    <field name="Categorie_31" >3.165</field>
    <field name="Categorie_32" >3.321</field>
    <field name="Categorie_33" >3.396</field>
    <field name="Categorie_41" >3.165</field>
    <field name="Categorie_42" >3.321</field>
    <field name="Categorie_43" >3.396</field>
    <field name="Degree" >Degree_1</field>
</record>

<!-- salary_table Action -->
<record model="ir.actions.act_window" id="action_convention">
    <field name="name">Salary Table</field>
    <field name="res_model">hr.convention</field>
    <field name="view_type">form</field>
    <field name="view_mode">tree,form,graph,pivot</field>
</record>


    <!-- convention menu item -->

     <menuitem action="action_convention" id="hr_menu_convention" parent="hr.menu_hr_configuration" name="Convention" sequence="0" groups="base.group_hr_manager"/>


</data>
</openerp> 

hr_convention.py

 from openerp.osv import fields, osv


 class Convention(osv.osv):
_name = 'hr.convention'
_columns = {

 "Degree" : fields.char(string="Degree"),
"Categorie_11"  : fields.float(string="Categorie_11"), 
"Categorie_12"  : fields.float(string="Categorie_12"),
"Categorie_13"  : fields.float(string="Categorie_13"),
"Categorie_21"  : fields.float(string="Categorie_21"),
"Categorie_22"  : fields.float(string="Categorie_22"),
"Categorie_23"  : fields.float(string="Categorie_23") ,
"Categorie_31"  : fields.float(string="Categorie_31"),
"Categorie_32"  : fields.float(string="Categorie_32"),
"Categorie_33"  : fields.float(string="Categorie_33"),
"Categorie_41"  : fields.float(string="Categorie_41"),
"Categorie_42"  : fields.float(string="Categorie_42"),
"Categorie_43"  : fields.float(string="Categorie_43"),

    }

0 个答案:

没有答案