Odoo Help

Welcome!

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

0

how can i add a menu item to human resource?

By
mirko lazzarini
on 9/24/13, 6:40 AM 1,243 views

OpenErp 7, i must add e menu item under Human Resource - Human Resource - Employee (at the same level) i don't know to do, can anyone help me?

1
medhabib
On 9/24/13, 7:55 AM

<menuitem id="menu_hr_name_exemple" parent="hr.menu_hr_main" name="name_example"/>

1
 <menuitem name="Planned Task" id="base.plannedtask" parent="base.menu_main_pm" sequence="1"/>

 <record id="planned_task_line_tree" model="ir.ui.view">
        <field name="name">planned.task.line.tree</field>
        <field name="model">planned.task.line</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Planned Task Line">
                <field name="name"/>
                <field name="product_id" on_change="onchange(product_id)"/>
                <field name="uom_id"/>
                <field name="planned_qty"/>
                <field name="project_weight" />
                <field name="actual_weight" />
                <field name="completion" on_change="onchange_validation(completion)" invisible="1"/>
                <field name="prev_task_completion" invisible="1" />
                <field name="diff_task_completion" invisible="1" />
            </tree>
        </field>
    </record>


    <record id="planned_task_line_form" model="ir.ui.view">
        <field name="name">planned.task.line.form</field>
        <field name="model">planned.task.line</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Planned Task Line" version="7.0">
              <sheet string="Task">
                <h1>
                    <field name="product_id" placeholder="Product..." on_change="onchange(product_id)" domain="[('is_boq','=',True)]"/>
                </h1>
                    <group col="4">
                       <field name="standard_price" invisible="1"/>
                       <field name="qty" invisible="1"/>
                       <field name="actual_amount" invisible="1"/>
                       <field name="uom_id"/>
                       <field name="planned_qty"/>
                       <field name="validated"/>
                       <field name="amount_vatin" />
                       <field name="amount_vatex" />
                       <field name="project_weight" />
                       <field name="actual_weight" />
                       <field name="g_project_id"/>
                       <field name="g_task_id"/>
                       <field name="group_activity_id" />
                       <field name="activities_id" />
                    </group>
                    <group col="6">
                       <field name="completion" on_change="onchange_validation(completion)" invisible="1"/>
                       <field name="prev_task_completion" invisible="1" />
                       <field name="diff_task_completion" invisible="1" />
                    </group>

                </sheet>
            </form>
        </field>
   </record>

    <record model="ir.actions.act_window" id="act_open_planned_task_line">
       <field name="name">Planned Task Line</field>
       <field name="res_model">planned.task.line</field>
       <field name="view_type">form</field> 
       <field name="view_id" ref="planned_task_line_tree"/>
       <field name="context">{ 'tree_view_ref':'planned_task_line_tree'}</field>    
       <field name="view_mode">tree,form</field> 
    </record> 

    <menuitem action="act_open_planned_task_line" id="planned_task_line" name="Planned Task Line" parent="base.plannedtask" sequence="2"/>

This is my sample of creating menu.. hope it will help :D

0
mirko lazzarini
On 9/24/13, 8:47 AM

I'm trying this but don't function

<openerp>

<data>

   <record id="open_view_hr_extension_form" model="ir.actions.act_window">
        <field name="name">Assignment products</field>
        <field name="res_model">hr_extension</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
   </record>

<menuitem id="menu_hr_extension" parent="hr.menu_hr_main" name="Assign goods to Employee" action="open_view_hr_extension_form"/>

<record model="ir.ui.view" id="hr_extension_tree_view">
    <field name="name">hr_extension.tree</field>
    <field name="model">hr_extension</field>
    <field name="type">tree</field>
    <field name="arch" type="xml">
        <tree string="Assignment products">
            <field name="employee_id"/>
            <field name="name"/>
                        <field name="product_id"/>
            <field name="serialno"/>
            <field name="assignment_date"/>
                        <field name="restitution_date"/>
        </tree>
    </field>
</record>

<record model="ir.ui.view" id="hr_extension_form_view">
    <field name="name">hr_extension.form</field>
    <field name="model">hr_extension</field>
    <field name="type">form</field>
    <field name="arch" type="xml">
        <form string="Assignment products">
            <field name="employee_id"/>
            <field name="name"/>
                  <field name="product_id on_change="onchange_product_id(product_id)" />
            <field name="serialno"/>
            <field name="assignment_date"/>
                <field name="restitution_date" />
              </form>
       </field>
</record>
</data>

</openerp>

You can check a configuration menu then interface use -> menu and search the menu with assign key , if you see the menu i recommended the install a nex database , else you can try this <menuitem id="menu_hr_extension" parent="hr.menu_hr_main" name="Assign goods to Employee" sequence="4"/>

medhabib
on 9/24/13, 9:22 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/24/13, 6:40 AM
Seen: 1243 times
Last updated: 3/16/15, 8:10 AM