Merge pull request #3493 from expsa/hr_traning_table

modify on official_mission_id2
This commit is contained in:
eslamtalaat744 2025-06-17 17:29:17 +03:00 committed by GitHub
commit 6ecb1314c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 184 additions and 183 deletions

View File

@ -287,12 +287,7 @@
<group>
<group>
<field name="employee_id" readonly="1"/>
<!-- <field name="official_mission_id" readonly="1"/>-->
<field name="official_mission_id"
readonly="1"
context="{'form_view_ref': 'exp_official_mission.employee_training_action'}"
/>
<!-- options="{'no_create': True}"&ndash;&gt;-->
<field name="official_mission_id" readonly="1"/>
<field name="days" readonly="1"/>
</group>
<group>

View File

@ -11,8 +11,8 @@
<menuitem name="Employee Training" id="employee_training_menu_item"
parent="employee_requests.employee_request_menu_item"
action="employee_training_action" />
parent="employee_requests.employee_request_menu_item"
action="employee_training_action" />
<record model="ir.ui.view" id="employee_training_form_view">
<field name="name">Employee Training</field>
@ -21,153 +21,153 @@
<form>
<header>
<button name="send_depart_manager" string="Submit" class="oe_highlight"
type="object"
states="draft" groups="base.group_user" />
type="object"
states="draft" groups="base.group_user" />
<button name="direct_manager" string="Direct Manager Approve"
class="oe_highlight" type="object"
states="send" groups="hr_base.group_division_manager" />
class="oe_highlight" type="object"
states="send" groups="hr_base.group_division_manager" />
<button name="direct_manager_refused" string="Refused" class="oe_highlight"
type="object"
states="send" groups="hr_base.group_division_manager" />
type="object"
states="send" groups="hr_base.group_division_manager" />
<button name="depart_manager" string="Department Manager"
class="oe_highlight" type="object"
states="direct_manager" groups="hr_base.group_department_manager" />
class="oe_highlight" type="object"
states="direct_manager" groups="hr_base.group_department_manager" />
<button name="dep_manager_refused" string="Refused" class="oe_highlight"
type="object"
states="direct_manager" groups="hr_base.group_department_manager" />
type="object"
states="direct_manager" groups="hr_base.group_department_manager" />
<button name="hr_aaproval" string="HR Approval" class="oe_highlight"
type="object"
states="depart_manager"
groups="exp_official_mission.group_hr_training_user" />
type="object"
states="depart_manager"
groups="exp_official_mission.group_hr_training_user" />
<button name="refused" string="Refused" class="oe_highlight" type="object"
states="depart_manager"
groups="exp_official_mission.group_hr_training_user" />
states="depart_manager"
groups="exp_official_mission.group_hr_training_user" />
<button name="approve" string="Approve" class="oe_highlight" type="object"
states="hr_aaproval"
groups="exp_official_mission.group_hr_training_manager" />
states="hr_aaproval"
groups="exp_official_mission.group_hr_training_manager" />
<button name="refused" string="Refused" class="oe_highlight" type="object"
states="hr_aaproval"
groups="exp_official_mission.group_hr_training_manager" />
states="hr_aaproval"
groups="exp_official_mission.group_hr_training_manager" />
<button name="draft_state" string="RE-Draft" class="oe_highlight"
type="object"
states="approve,refused" groups="hr.group_hr_user"
confirm="Are you sure to Reset To Draft This Record?" />
type="object"
states="approve,refused" groups="hr.group_hr_user"
confirm="Are you sure to Reset To Draft This Record?" />
<button name="action_training_appraisal" string="Training Course Appraisal"
type="object" class="oe_highlight"
icon="fa-users"
attrs="{'invisible':['|',('state','in',('draft','refused')),('appraisal_found','=',True)]}" />
type="object" class="oe_highlight"
icon="fa-users"
attrs="{'invisible':['|',('state','in',('draft','refused')),('appraisal_found','=',True)]}" />
<field name="state" widget="statusbar"
statusbar_visible="draft,send,direct_manager,depart_manager,hr_aaproval,approve,refused" />
statusbar_visible="draft,send,direct_manager,depart_manager,hr_aaproval,approve,refused" />
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_get_attachment_view" class="oe_stat_button"
icon="fa-file-text-o"
type="object">
icon="fa-file-text-o"
type="object">
<field name="attachment_count" widget="statinfo"
string="Attachments"
options="{'reload_on_button': true}" />
string="Attachments"
options="{'reload_on_button': true}" />
</button>
<button name="action_employees_appraisal" class="oe_stat_button"
icon="fa-file-text-o"
type="object">
icon="fa-file-text-o"
type="object">
<field name="appraisal_count" widget="statinfo"
string="Employees Appraisal"
options="{'reload_on_button': true}" />
string="Employees Appraisal"
options="{'reload_on_button': true}" />
</button>
</div>
<group>
<group>
<field name="hr_nomination"
attrs="{'readonly': [('state', '!=', 'draft')]}"
groups="hr.group_hr_user" />
attrs="{'readonly': [('state', '!=', 'draft')]}"
groups="hr.group_hr_user" />
<field name="process_type" invisible="1" />
<field name="mission_type" string="Mission Type" required="1"
domain="[('work_state', '=', 'training'),('special_hours', '!=', True)]"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
domain="[('work_state', '=', 'training'),('special_hours', '!=', True)]"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<field name="course_name" string="Course Name" required="1"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<field name="train_category" string="Category" required="1"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<!--when
Duration type in mission type is days-->
<field name="duration_type" string="Duration Type" invisible="1" />
<field name="date_from" string="Date From" required="1"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<field name="date_to" string="Date To" required="1"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<!--when
Duration type in mission type is hours-->
<field name="hour_from" string="Hour From" widget="float_time"
attrs="{'required': [('state', '=', 'depart_manager')],
attrs="{'required': [('state', '=', 'depart_manager')],
'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<field name="hour_to" string="Hour To" widget="float_time"
attrs="{'required': [('state', '=', 'depart_manager')],
attrs="{'required': [('state', '=', 'depart_manager')],
'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<field name="hour_duration" string="Duration Hours" readonly="1"
force_save="1"
widget="float_time"
attrs="{'required':[('duration_type','=','hours')]}" />
force_save="1"
widget="float_time"
attrs="{'required':[('duration_type','=','hours')]}" />
<field name="date_duration" string="Duration Days" readonly="1"
force_save="1"
attrs="{'required':[('duration_type','=','days')]}" />
force_save="1"
attrs="{'required':[('duration_type','=','days')]}" />
<field name="total_hours" string="Total Hours" readonly="1" force_save="1"
/>
/>
</group>
<group>
<field name="company_id" groups="base.group_multi_company"
readonly="1" />
readonly="1" />
<field name="employee_id" string="Responsible" required="1"
attrs="{'readonly':[('state','!=','draft')]}" />
attrs="{'readonly':[('state','!=','draft')]}" />
<field name="employee_no" string="Employee Number" readonly="1" />
<field name="department_id2" string="Department" readonly="1" />
<field name="date" string="Date Request"
attrs="{'readonly':[('state','!=','draft')]}"
required="1" />
attrs="{'readonly':[('state','!=','draft')]}"
required="1" />
<field name="department_id" string="Department"
widget="many2many_tags"
attrs="{'readonly':[('state','=','approve')]}" />
widget="many2many_tags"
attrs="{'readonly':[('state','=','approve')]}" />
<field name="country_id" string="Country"
attrs="{'readonly':[('state','!=','draft')]}" />
attrs="{'readonly':[('state','!=','draft')]}" />
<field name="destination" string="Destination" widget="selection"
domain="[('country_id','=',country_id),('destination_type','in',('training','all'))]"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
domain="[('country_id','=',country_id),('destination_type','in',('training','all'))]"
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }" />
<field name="partner_id" string="Organiser" required="1"
attrs="{'readonly':[('state','=','approve')]}" />
attrs="{'readonly':[('state','=','approve')]}" />
<field name="trainer_id"
domain="[('is_company','=',False)]"
attrs="{'readonly':[('state','=','approve')]}" />
domain="[('is_company','=',False)]"
attrs="{'readonly':[('state','=','approve')]}" />
<field name="move_type" string="Move type"
attrs="{'readonly':[('state','!=','depart_manager')], 'required': [('state', '=', 'depart_manager')],'invisible':[('related_with_financial','=',False)]}" />
attrs="{'readonly':[('state','!=','depart_manager')], 'required': [('state', '=', 'depart_manager')],'invisible':[('related_with_financial','=',False)]}" />
<field name="official_mission" string="Allowance Name"
attrs="{'readonly':[('state','!=','depart_manager')],
attrs="{'readonly':[('state','!=','depart_manager')],
'invisible':['|',('related_with_financial','=',False),('move_type','!=','payroll')],
'required':[('move_type','=','payroll'),('state', '=', 'depart_manager'),('related_with_financial','=',True)]}" />
<field name="Training_cost" string="Training Cost"
attrs="{'readonly':[('state','=','approve')]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
attrs="{'readonly':[('state','=','approve')]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
<field name="Tra_cost_invo_id" string="Training Cost Invoice"
attrs="{'invisible':['|',('state','!=','approve'),('Tra_cost_invo_id','=',False)]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
attrs="{'invisible':['|',('state','!=','approve'),('Tra_cost_invo_id','=',False)]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
<field name="min_of_employee" string="Min Trainees"
attrs="{'readonly':[('state','=','approve')]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
attrs="{'readonly':[('state','=','approve')]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
<field name="max_of_employee" string="Max Trainees"
attrs="{'readonly':[('state','=','approve')]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
attrs="{'readonly':[('state','=','approve')]}"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
<field name="appraisal_check" invisible="1" />
<field name="appraisal_found" invisible="1" />
@ -183,15 +183,15 @@
<field name="related_with_financial" invisible="1" />
<div style="display: inline-block;margin-right: 2px;">
<button name="action_add_employees" string=" Add Employees "
type="object" class="oe_highlight"
icon="fa-users" />
type="object" class="oe_highlight"
icon="fa-users" />
<button name="re_compute" string=" Re-Compute " type="object"
class="oe_highlight"
icon="fa-cogs" style="margin-right: 20px;"
attrs="{'invisible':[('state','in',('approve','refused','send'))]}" />
class="oe_highlight"
icon="fa-cogs" style="margin-right: 20px;"
attrs="{'invisible':[('state','in',('approve','refused','send'))]}" />
</div>
<field name="employee_ids"
attrs="{'readonly':[('state','not in',('depart_manager','direct_manager','send','draft'))]}">
attrs="{'readonly':[('state','not in',('depart_manager','direct_manager','send','draft'))]}">
<tree editable="bottom">
<field name="employee_id" string="Employee" required="1" />
<field name="date_from" string="Date from" />
@ -199,54 +199,54 @@
<field name="days" string="Days" readonly="0" />
<field name="day_price" string="Day price"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','days'),
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','days'),
('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
readonly="1" force_save="1" />
<field name="hour_from" string="Hour from"
widget="float_time"
widget="float_time"
/>
<field name="hour_to" string="Hour to" widget="float_time"
/>
<field name="hours" string="Hours" readonly="0"
widget="float_time" />
widget="float_time" />
<field name="total_hours" string="Total Hours" readonly="0"
widget="float_time" />
widget="float_time" />
<field name="hour_price" string="Hour price"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','hours'),
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','hours'),
('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
readonly="1" force_save="1" />
<field name="fees_amount" string="Fees Amount"
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="0" />
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="0" />
<field name="train_cost_emp" string="Training Cost"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
<field name="appraisal_id" string="Appraisal" readonly="1"
force_save="1" invisible="1" />
force_save="1" invisible="1" />
<field name="appraisal_result" string="Appraisal Result"
readonly="1"
force_save="1"
attrs="{'column_invisible':[('parent.appraisal_check','=',False)]}" />
readonly="1"
force_save="1"
attrs="{'column_invisible':[('parent.appraisal_check','=',False)]}" />
<field name="amount" string="Amount"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
<field name="account_move_id" string="Account move"
readonly="1" force_save="1"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.related_with_financial','=',False),
readonly="1" force_save="1"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.related_with_financial','=',False),
('parent.move_type','!=','accounting')]}" />
<field name="status" string="Employee Status" />
<field name="attachment_count" invisible="1" />
<button name="action_get_attachment_view"
string="Attachments" type="object"
icon="fa-paperclip"
attrs="{'invisible': [('attachment_count', '=', 0)]}" />
string="Attachments" type="object"
icon="fa-paperclip"
attrs="{'invisible': [('attachment_count', '=', 0)]}" />
</tree>
@ -254,60 +254,60 @@
<sheet>
<group col="4">
<field name="employee_id" string="Employee"
required="1" />
required="1" />
<field name="date_from" string="Date from" />
<field name="date_to" string="Date to" />
<field name="days" string="Days" readonly="0" />
<field name="day_price" string="Day price"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','days'),
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','days'),
('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
readonly="1" force_save="1" />
<field name="hour_from" string="Hour from"
widget="float_time"
widget="float_time"
/>
<field name="hour_to" string="Hour to"
widget="float_time"
widget="float_time"
/>
<field name="hours" string="Hours" readonly="0"
widget="float_time" />
widget="float_time" />
<field name="total_hours" string="Total Hours"
readonly="0"
widget="float_time" />
readonly="0"
widget="float_time" />
<field name="hour_price" string="Hour price"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','hours'),
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.duration_type','!=','hours'),
('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
readonly="1" force_save="1" />
<field name="fees_amount" string="Fees Amount"
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="0" />
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="0" />
<field name="train_cost_emp" string="Training Cost"
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
groups="hr_base.group_account_manager,hr.group_hr_user,hr_base.group_division_manager" />
<field name="appraisal_id" string="Appraisal"
readonly="1"
force_save="1"
invisible="1" />
readonly="1"
force_save="1"
invisible="1" />
<field name="appraisal_result"
string="Appraisal Result" readonly="1"
force_save="1"
attrs="{'column_invisible':[('parent.appraisal_check','=',False)]}" />
string="Appraisal Result" readonly="1"
force_save="1"
attrs="{'column_invisible':[('parent.appraisal_check','=',False)]}" />
<field name="amount" string="Amount"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':[('parent.related_with_financial','=',False)]}"
readonly="1" force_save="1" />
<field name="account_move_id" string="Account move"
readonly="1"
force_save="1"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.related_with_financial','=',False),
readonly="1"
force_save="1"
groups="hr_base.group_account_manager,hr.group_hr_user"
attrs="{'column_invisible':['|',('parent.related_with_financial','=',False),
('parent.move_type','!=','accounting')]}" />
</group>
@ -320,15 +320,15 @@
<group>
<group>
<field name="issuing_ticket" string="Issuing Ticket?"
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
<field name="ticket_cash_request_type"
string="Ticket/Cash Request Type"
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
string="Ticket/Cash Request Type"
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
<field name="ticket_cash_request_for"
string="Ticket/Cash Request For"
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
string="Ticket/Cash Request For"
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
</group>
<group>
@ -336,11 +336,11 @@
Insurance"-->
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
<field name="self_car" string="Self Car"
attrs="{'readonly':[('state','!=','draft')]}" />
attrs="{'readonly':[('state','!=','draft')]}" />
<field name="visa" string="Visa"
attrs="{'readonly':[('state','!=','draft')]}" />
attrs="{'readonly':[('state','!=','draft')]}" />
<field name="note" string="Other"
attrs="{'readonly':[('state','!=','draft')]}" />
attrs="{'readonly':[('state','!=','draft')]}" />
</group>
<!-- <group>-->
<!-- <field name="car_insurance" string="Car Insurance"-->
@ -357,23 +357,23 @@
<page string="Training Details">
<group>
<field name="training_details" string='Training Details'
required="1" attrs="{'readonly':[('state','=','approve')]}"
nolabel="1" />
required="1" attrs="{'readonly':[('state','=','approve')]}"
nolabel="1" />
</group>
</page>
<page string="Training Table">
<page string="Training Table">
<field name="table_ids">
<tree editable="bottom">
<field name="description" string="Description" />
<field name="date" string="Date Requestt"/>
<field name="hour_from" string="Hour from"
required="1" widget="float_time"/>
<field name="hour_from" string="Hour from"
required="1" widget="float_time"/>
<field name="hour_to" string="Hour to"
required="1" widget="float_time"/>
required="1" widget="float_time"/>
<field name="trainer_id" string="Trainer" readonly="0"/>
</tree>
</field>
@ -382,7 +382,7 @@
<page string="Attachments" name="attachments" invisible="1">
<field name="attach_ids" string="Attachments"
attrs="{'readonly':[('state','!=','draft')]}">
attrs="{'readonly':[('state','!=','draft')]}">
<tree editable="bottom">
<field name="name" string="attachment Name" />
<field name="datas" string="file content" />
@ -422,7 +422,7 @@
<field name="arch" type="xml">
<tree decoration-danger="state == 'refused'" decoration-info="state == 'draft'"
string="Employee Training">
string="Employee Training">
<field name="mission_type" string="Mission Type" />
<field name="employee_id" string="Responsible" />
<field name="date" string="Date Request" />
@ -434,8 +434,8 @@
<field name="destination" string="Destination" />
<field name="attachment_count" invisible="1" />
<button name="action_get_attachment_view" string="Attachments" type="object"
icon="fa-paperclip"
attrs="{'invisible': [('attachment_count', '=', 0)]}" />
icon="fa-paperclip"
attrs="{'invisible': [('attachment_count', '=', 0)]}" />
<field name="state" string="Status" />
@ -459,19 +459,19 @@
<field name="state" />
<group expand="0" string="Group By">
<filter name="group_employee" string="Responsible" domain="[]"
context="{'group_by': 'employee_id'}" />
context="{'group_by': 'employee_id'}" />
<filter name="group_type" string="Mission Type" domain="[]"
context="{'group_by': 'mission_type'}" />
context="{'group_by': 'mission_type'}" />
<filter name="group_department" string="Department" domain="[]"
context="{'group_by': 'department_id2'}" />
context="{'group_by': 'department_id2'}" />
<filter name="group_branch" string="Branch" domain="[]"
context="{'group_by': 'is_branch'}" />
context="{'group_by': 'is_branch'}" />
<filter name="group_state" string="State" domain="[]"
context="{'group_by': 'state'}" />
context="{'group_by': 'state'}" />
</group>
<separator />
<filter string="My Requests" name="my_request"
domain="[('employee_id.user_id', '=', uid)]" />
domain="[('employee_id.user_id', '=', uid)]" />
<separator />
</search>
@ -515,34 +515,39 @@
<form>
<header>
<button name="approve" string="Approve" class="oe_highlight" type="object"
attrs="{'invisible':[('status','!=','direct_manager')]}"
groups="hr_base.group_division_manager" />
attrs="{'invisible':[('status','!=','direct_manager')]}"
groups="hr_base.group_division_manager" />
<button name="refuse" string="Refuse" class="oe_highlight" type="object"
attrs="{'invisible':[('status','!=','direct_manager')]}"
groups="hr_base.group_division_manager" />
attrs="{'invisible':[('status','!=','direct_manager')]}"
groups="hr_base.group_division_manager" />
<button name="done" string="Done" class="oe_highlight" type="object"
attrs="{'invisible':[('status','!=','approved')]}" />
attrs="{'invisible':[('status','!=','approved')]}" />
<button name="set_to_draft" string="Set to Draft" class="oe_highlight"
type="object"
attrs="{'invisible':[('status','not in', ('done','refused'))]}" />
type="object"
attrs="{'invisible':[('status','not in', ('done','refused'))]}" />
<field name="status" widget="statusbar"
statusbar_visible="draft,direct_manager,approved,approved2,done,refused" />
statusbar_visible="draft,direct_manager,approved,approved2,done,refused" />
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_get_attachment_view" class="oe_stat_button"
icon="fa-file-text-o"
type="object">
icon="fa-file-text-o"
type="object">
<field name="attachment_count" widget="statinfo"
string="Attachments"
options="{'reload_on_button': true}" />
string="Attachments"
options="{'reload_on_button': true}" />
</button>
</div>
<group>
<group>
<field name="employee_id" readonly="1" />
<field name="official_mission_id" readonly="1" string='Mission Type' />
<!-- <field name="official_mission_id" readonly="1" string='Mission Type' />-->
<field name="official_mission_id"
readonly="1"
string='Mission Type'
context="{'form_view_ref': 'exp_official_mission.employee_training_action'}"
/>
<field name="days" readonly="1" />
<field name="hours" readonly="1" widget="float_time" />
</group>
@ -551,16 +556,16 @@
<field name="date_from" readonly="1" />
<field name="date_to" readonly="1" />
<field name="appraisal_id"
attrs="{'invisible':[('appraisal_id','=',False)]}" />
attrs="{'invisible':[('appraisal_id','=',False)]}" />
<field name="appraisal_result"
attrs="{'invisible':[('appraisal_id','=',False)]}" />
attrs="{'invisible':[('appraisal_id','=',False)]}" />
</group>
<group>
<field name="hour_from" readonly="1" widget="float_time" />
<field name="hour_to" readonly="1" widget="float_time" />
<field name="total_hours" string="Total Hours" readonly="0"
widget="float_time" />
widget="float_time" />
<field name="training_details" />
</group>
@ -584,7 +589,7 @@
<field name="model">hr.official.mission.employee</field>
<field name="arch" type="xml">
<tree string="Employee official mission Line" decoration-info="status == 'draft'"
decoration-danger="status == 'refused'" decoration-success="status=='approved'">
decoration-danger="status == 'refused'" decoration-success="status=='approved'">
<field name="employee_id" />
<field name="official_mission_id" string='Mission Type' />
<field name="course_name" />
@ -594,15 +599,16 @@
<field name="hour_from" widget="float_time" />
<field name="hour_to" widget="float_time" />
<field name="hours" widget="float_time" />
<field name="total_hours" widget="float_time" />
<field name="appraisal_id" invisible="1" />
<field name="appraisal_result"
attrs="{'invisible':[('appraisal_id','=',False)]}" />
attrs="{'invisible':[('appraisal_id','=',False)]}" />
<field name="status" string="Employee Status" />
<field name="state" string="Status" invisible="1" />
<field name="attachment_count" invisible="1" />
<button name="action_get_attachment_view" string="Attachments" type="object"
icon="fa-paperclip"
attrs="{'invisible': [('attachment_count', '=', 0)]}" />
icon="fa-paperclip"
attrs="{'invisible': [('attachment_count', '=', 0)]}" />
</tree>
</field>
</record>