<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_resarcher_member_wizard_form" model="ir.ui.view">
            <field name="name">researcher.member.wizard.form</field>
            <field name="model">researcher.member.wizard</field>
            <field name="arch" type="xml">
                <form>
                    <sheet>
                        <group>
                            <!--                            <field name="selector"/>-->
                            <field name="member_id"/>
                            <!--                            <field name="researcher_id" attrs="{'invisible':[('selector','=','researcher_team')]}"/>-->
                            <field name="researcher_team"/>
                        </group>
                        <footer>
                            <button name="submit_member" type="object" string="Submit" class="oe_highlight"
                                    attrs="{'invisible':[('member_id','=',False)]}"/>
                            or
                            <button special="cancel" string="Cancel"/>
                        </footer>
                    </sheet>
                </form>

            </field>
        </record>
        <record id="view_resarcher_family_wizard_form" model="ir.ui.view">
            <field name="name">researcher.family.wizard.form</field>
            <field name="model">researcher.family.wizard</field>
            <field name="arch" type="xml">
                <form>
                    <sheet>
                        <group>
                            <field name="benefit_ids" widget="many2many_tags" invisible="1"/>
                            <field name="is_submitted" invisible="1"/>
                            <field name="branch_custom_id" attrs="{'invisible':[('branch_has_employees','=',True)]}"/>
                            <field name="branch_has_employees" invisible="1"/>
                            <field name="researcher_team" domain="[('branch_custom_id', '=',branch_custom_id)]"
                                   required="1"
                                   options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
                        </group>
                        <footer>
                            <button name="submit_family" type="object" string="Submit" class="oe_highlight"
                                    attrs="{'invisible':['|',('benefit_ids','=',False),('is_submitted','=',True)]}"/>
                            <button special="cancel" string="Return to Record" class="btn-secondary"/>
                        </footer>
                    </sheet>
                </form>

            </field>
        </record>
        <record id="view_assigned_researcher_family_wizard_form" model="ir.ui.view">
            <field name="name">researcher.family.wizard.form</field>
            <field name="model">researcher.family.wizard</field>
            <field name="arch" type="xml">
                <form>
                    <sheet>
                        <group>
                            <field name="benefit_ids" widget="many2many_tags" invisible="1"/>
                            <field name="is_submitted" invisible="1"/>
                            <field name="branch_custom_id" invisible="1"
                                   attrs="{'invisible':[('branch_has_employees','=',True)]}"/>
                            <field name="branch_has_employees" invisible="1"/>
                            <field name="assignment_type" required="1"/>
                            <field name="researcher_team" required="1"
                                   domain="[('branch_custom_id', '=',branch_custom_id)]"
                                   attrs="{'required': [('assignment_type', '!=', 'end_assignment')],'invisible': [('assignment_type', '=', 'end_assignment')]}"
                                   options="{'no_create': True, 'no_create_edit': True,'no_quick_create': True, 'no_open': True}"/>
                        </group>
                        <footer>
                            <button name="submit_family" type="object" string="Submit" class="oe_highlight"
                                    attrs="{'invisible':['|',('benefit_ids','=',False),('is_submitted','=',True)]}"/>
                            <button special="cancel" string="Return to Record" class="btn-secondary"/>
                        </footer>
                    </sheet>
                </form>

            </field>
        </record>
    </data>
</odoo>
