You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

128 lines
6.0 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!--This record is used to create form view for the hr lawsuit-->
<record id='hr_lawsuit_view_form' model='ir.ui.view'>
<field name="name">hr.lawsuit.view.form</field>
<field name="model">hr.lawsuit</field>
<field name="arch" type="xml">
<form string="Legal Actions">
<header>
<button name="action_process" string="Process" type="object"
invisible="state != 'draft'"/>
<button name="action_won" string="Won" type="object"
invisible="state != 'running'"/>
<button name="action_loss" string="Loss" type="object"
invisible="state != 'running'"/>
<button name="action_cancel" string="Cancel" type="object"
invisible="state not in ['running','draft']"/>
<field name="state" widget="statusbar"
statusbar_visible="draft,running,won"/>
</header>
<sheet>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" readonly="1"/>
</h1>
<group>
<group>
<field name="ref_no" readonly="state != 'draft'"/>
<field name="first_party_id"
readonly="state != 'draft'"/>
<field name="party2_name" invisible="1"/>
<field name="party2" readonly="state != 'draft'"/>
<field name="employee_id"
invisible="party2 != 'employee'"
readonly="state != 'draft'"
required="party2 == 'employee'"/>
<field name="partner_id"
invisible="party2 != 'partner'"
readonly="state != 'draft'"
required="party2 == 'partner'"/>
<field name="other_name"
invisible="party2 != 'other'"
readonly="state != 'draft'"
required="party2 == 'other'"/>
<field name="court_name"
readonly="state != 'draft'"/>
<field name="judge" readonly="state != 'draft'"/>
<field name="lawyer_id"
readonly="state != 'draft'"/>
<field name="company_id" readonly="state != 'draft'"
options="{'no_create': True}"
groups="base.group_multi_company"/>
</group>
<group>
<field name="requested_date"
readonly="state != 'draft'"/>
<field name="hearing_date"
readonly="state != 'draft'"/>
</group>
</group>
<notebook>
<page name="case_desc" string="Case Details">
<field name="case_details"
readonly="state != 'draft'"/>
</page>
</notebook>
</sheet>
<chatter/>
</form>
</field>
</record>
<!--This is used for create the list view of the hr lawsuit-->
<record id='hr_lawsuit_view_list' model='ir.ui.view'>
<field name="name">hr.lawsuit.view.list</field>
<field name="model">hr.lawsuit</field>
<field name="arch" type="xml">
<list>
<field name="name"/>
<field name="first_party_id"/>
<field name="party2"/>
<field name="party2_name"/>
<field name="court_name"/>
<field name="judge"/>
<field name="lawyer_id"/>
<field name="requested_date"/>
<field name="state"/>
</list>
</field>
</record>
<!--Search view for the hr lawsuit-->
<record id='hr_lawsuit_view_search' model='ir.ui.view'>
<field name="name">hr.lawsuit.view.search</field>
<field name="model">hr.lawsuit</field>
<field name="arch" type="xml">
<search string="Legal Actions">
<field name="name"/>
<field name="first_party_id"/>
<field name="party2"/>
<field name="court_name"/>
<field name="judge"/>
<field name="lawyer_id"/>
<field name="requested_date"/>
<field name="state"/>
<group expand="0" string="Group By">
<filter string="Status" name="Status"
context="{'group_by':'state'}"/>
<filter string="Employee" name="Employee"
context="{'group_by':'employee_id'}"/>
</group>
</search>
</field>
</record>
<!--Windows action for the model hr.lawsuit-->
<record id="hr_lawsuit_action" model="ir.actions.act_window">
<field name="name">Legal Management</field>
<field name="res_model">hr.lawsuit</field>
<field name="search_view_id" ref="hr_lawsuit_view_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to Create a New Record.
</p>
</field>
</record>
<!--Menuitem for the model hr.lawsuit-->
<menuitem id="hr_lawsuit_menu_sub" parent="hr.menu_hr_root"
action="hr_lawsuit_action"
name="Legal Actions" sequence="10"/>
</odoo>