<odoo>
    <record id="view_edit_project_resource_lines" model="ir.ui.view">
        <field name="name">project.resource.wizard</field>
        <field name="model">project.resource.wizard</field>
        <field name="arch" type="xml">
            <form string="Project Resource Wizard">
                <group>
                    <group>
                        <field name="project_id" readonly="1"/>
                    </group>
                    <field name="add_project_resource" context="{'default_project_id': active_id}">
                        <tree editable="bottom">
                            <field name="employee_id"/>
                            <field name="role"/>
                            <field name="start_date"/>
                            <field name="end_date"/>
                            <field name="distribution_per" attrs="{'invisible': [('hour_distribution','!=','Percentage')], 'required': [('hour_distribution','=','Percentage')]}"/>
                            <field name="price_unit"/>
                            <field name="budgeted_qty"/>
                            <field name="cost"/>
                            <field name="employee_price"/>
                            <field name="project_id" invisible="1"/>
                            <field name="hour_distribution" invisible="1"/>
                        </tree>
                    </field>
                </group>
                <footer>
                    <button string="OK" type="object" name="action_add_project_lines" class="btn-primary"/>
                    <button string="Cancel" class="btn-default" special="cancel"/>
                </footer>
            </form>
        </field>
    </record>

    <record id="action_project_resource_wizard" model="ir.actions.act_window">
        <field name="name">Project Resource wizard</field>
        <field name="res_model">project.resource.wizard</field>
        <field name="view_id" ref="cor_custom.view_edit_project_resource_lines"/>
        <field name="target">new</field>
        <field name="context">{ 'default_project_id':active_id, 'project_id': active_id}</field>
    </record>
</odoo>