apply changement on respartner
This commit is contained in:
parent
d1a9460d5f
commit
fffe872d83
|
|
@ -25,6 +25,7 @@
|
|||
'views/ticket_view.xml',
|
||||
'views/course_view.xml',
|
||||
'views/appraisal_view.xml',
|
||||
'views/res_partner_form_view.xml',
|
||||
'views/training_menus.xml',
|
||||
'wizard/employee_selection_wizard.xml',
|
||||
'wizard/training_appraisal.xml',
|
||||
|
|
|
|||
|
|
@ -2754,3 +2754,12 @@ msgstr "الموارد البشرية"
|
|||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_official_mission_type_form_view
|
||||
msgid "Analytic Account"
|
||||
msgstr "الحساب التحليلي"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#. module: exp_official_mission
|
||||
#: model:ir.model.fields,field_description:exp_official_mission.field_res_partner_training
|
||||
msgid "Training"
|
||||
msgstr "تدريب"
|
||||
|
|
|
|||
|
|
@ -8,3 +8,10 @@ class AttendanceTransactions(models.Model):
|
|||
official_id = fields.Many2one('hr.official.mission', string='Mission Request')
|
||||
total_mission_hours = fields.Float()
|
||||
mission_name = fields.Many2one(related='official_id.mission_type', string='Mission Type', store=True)
|
||||
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
training = fields.Boolean(string="Training",default=True)
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_partner_form_inherit_training" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.inherit.training</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="training" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -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>
|
||||
|
|
@ -20,242 +20,291 @@
|
|||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="send_depart_manager" string="Submit" class="oe_highlight" 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"/>
|
||||
<button name="direct_manager_refused" string="Refused" class="oe_highlight" type="object"
|
||||
states="send" groups="hr_base.group_division_manager"/>
|
||||
<button name="send_depart_manager" string="Submit" class="oe_highlight"
|
||||
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" />
|
||||
<button name="direct_manager_refused" string="Refused" class="oe_highlight"
|
||||
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"/>
|
||||
<button name="dep_manager_refused" string="Refused" class="oe_highlight" type="object"
|
||||
states="direct_manager" groups="hr_base.group_department_manager"/>
|
||||
<button name="depart_manager" string="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" />
|
||||
|
||||
<button name="hr_aaproval" string="HR Approval" class="oe_highlight" type="object"
|
||||
states="depart_manager"
|
||||
groups="exp_official_mission.group_hr_training_user"/>
|
||||
<button name="hr_aaproval" string="HR Approval" class="oe_highlight"
|
||||
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?"/>
|
||||
<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)]}"/>
|
||||
<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?" />
|
||||
<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)]}" />
|
||||
<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">
|
||||
<field name="attachment_count" widget="statinfo" string="Attachments"
|
||||
options="{'reload_on_button': true}"/>
|
||||
<button name="action_get_attachment_view" class="oe_stat_button"
|
||||
icon="fa-file-text-o"
|
||||
type="object">
|
||||
<field name="attachment_count" widget="statinfo"
|
||||
string="Attachments"
|
||||
options="{'reload_on_button': true}" />
|
||||
</button>
|
||||
|
||||
<button name="action_employees_appraisal" class="oe_stat_button" icon="fa-file-text-o"
|
||||
type="object">
|
||||
<field name="appraisal_count" widget="statinfo" string="Employees Appraisal"
|
||||
options="{'reload_on_button': true}"/>
|
||||
<button name="action_employees_appraisal" class="oe_stat_button"
|
||||
icon="fa-file-text-o"
|
||||
type="object">
|
||||
<field name="appraisal_count" widget="statinfo"
|
||||
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"/>
|
||||
<field name="process_type" invisible="1"/>
|
||||
<field name="hr_nomination"
|
||||
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'))] }"/>
|
||||
<!--when Duration type in mission type is days-->
|
||||
<field name="duration_type" string="Duration Type" invisible="1"/>
|
||||
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'))] }"/>
|
||||
<!--when Duration type in mission type is hours-->
|
||||
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')],
|
||||
'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }"/>
|
||||
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')],
|
||||
'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')]}"/>
|
||||
<field name="date_duration" string="Duration Days" readonly="1" force_save="1"
|
||||
attrs="{'required':[('duration_type','=','days')]}"/>
|
||||
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')]}" />
|
||||
<field name="date_duration" string="Duration Days" readonly="1"
|
||||
force_save="1"
|
||||
attrs="{'required':[('duration_type','=','days')]}" />
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"
|
||||
readonly="1" />
|
||||
<field name="employee_id" string="Responsible" required="1"
|
||||
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"/>
|
||||
<field name="department_id" string="Department" widget="many2many_tags" attrs="{'readonly':[('state','=','approve')]}"/>
|
||||
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" />
|
||||
<field name="department_id" string="Department"
|
||||
widget="many2many_tags"
|
||||
attrs="{'readonly':[('state','=','approve')]}" />
|
||||
<field name="country_id" string="Country"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="destination" string="Destination" required="1" widget="selection"
|
||||
domain="[('country_id','=',country_id),('destination_type','in',('training','all'))]"
|
||||
attrs="{'readonly':[('state','not in',('draft','direct_manager','depart_manager','send'))] }"/>
|
||||
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'))] }" />
|
||||
|
||||
<field name="partner_id" string="Organiser" required="1" attrs="{'readonly':[('state','=','approve')]}"/>
|
||||
<field name="trainer_id" attrs="{'readonly':[('state','=','approve')]}"/>
|
||||
<field name="partner_id" string="Organiser" required="1"
|
||||
domain="[('training','=',True)]"
|
||||
attrs="{'readonly':[('state','=','approve')]}" />
|
||||
<field name="trainer_id"
|
||||
domain="[('training','=',True), ('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"/>
|
||||
'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" />
|
||||
|
||||
<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"/>
|
||||
<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" />
|
||||
|
||||
<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"/>
|
||||
<field name="appraisal_check" invisible="1"/>
|
||||
<field name="appraisal_found" invisible="1"/>
|
||||
<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" />
|
||||
<field name="appraisal_check" invisible="1" />
|
||||
<field name="appraisal_found" invisible="1" />
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<!--group string="Mission Purpose">
|
||||
<!--group
|
||||
string="Mission Purpose">
|
||||
<field name="mission_purpose" nolabel="1"
|
||||
attrs="{'readonly':[('state','!=','draft')]}" required="1"/>
|
||||
</group-->
|
||||
<notebook>
|
||||
<page string="Employees" name="employees">
|
||||
<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"/>
|
||||
<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'))]}"/>
|
||||
</div>
|
||||
<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" />
|
||||
<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'))]}" />
|
||||
</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"/>
|
||||
<field name="date_to" string="Date to"/>
|
||||
<field name="days" string="Days" readonly="0"/>
|
||||
<field name="employee_id" string="Employee" 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"/>
|
||||
<field name="hour_from" string="Hour from" widget="float_time"
|
||||
readonly="1" force_save="1" />
|
||||
<field name="hour_from" string="Hour from"
|
||||
widget="float_time"
|
||||
/>
|
||||
<field name="hour_to" string="Hour to" widget="float_time"
|
||||
/>
|
||||
<field name="hours" string="Hours" readonly="0" widget="float_time"/>
|
||||
<field name="hours" string="Hours" readonly="0"
|
||||
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"/>
|
||||
<field name="appraisal_id" string="Appraisal" 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)]}"/>
|
||||
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" />
|
||||
<field name="appraisal_result" 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"/>
|
||||
<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),
|
||||
('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)]}"/>
|
||||
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),
|
||||
('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)]}" />
|
||||
|
||||
</tree>
|
||||
|
||||
<form string="Employee Training Course Day">
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<field name="employee_id" string="Employee" 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="employee_id" string="Employee"
|
||||
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"/>
|
||||
<field name="hour_from" string="Hour from" widget="float_time"
|
||||
readonly="1" force_save="1" />
|
||||
<field name="hour_from" string="Hour from"
|
||||
widget="float_time"
|
||||
/>
|
||||
<field name="hour_to" string="Hour to" widget="float_time"
|
||||
<field name="hour_to" string="Hour to"
|
||||
widget="float_time"
|
||||
/>
|
||||
<field name="hours" string="Hours" readonly="0" widget="float_time"/>
|
||||
<field name="total_hours" string="Total Hours" readonly="0"
|
||||
widget="float_time"/>
|
||||
<field name="hours" string="Hours" readonly="0"
|
||||
widget="float_time" />
|
||||
<field name="total_hours" string="Total Hours"
|
||||
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"/>
|
||||
<field name="appraisal_id" string="Appraisal" 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)]}"/>
|
||||
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" />
|
||||
<field name="appraisal_result"
|
||||
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"/>
|
||||
<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),
|
||||
('parent.move_type','!=','accounting')]}"/>
|
||||
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),
|
||||
('parent.move_type','!=','accounting')]}" />
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
|
|
@ -267,23 +316,27 @@
|
|||
<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')]}"/>
|
||||
<field name="ticket_cash_request_type"
|
||||
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')]}"/>
|
||||
<field name="ticket_cash_request_for"
|
||||
string="Ticket/Cash Request For"
|
||||
attrs="{'readonly':[('state','not in',('draft','depart_manager','send'))],'required':[('issuing_ticket','=','yes')]}" />
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<!-- <field name="ticket_insurance" string="Ticket Insurance"-->
|
||||
<!-- <field name="ticket_insurance" string="Ticket
|
||||
Insurance"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<field name="self_car" string="Self Car"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="visa" string="Visa" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
attrs="{'readonly':[('state','!=','draft')]}" />
|
||||
<field name="visa" string="Visa"
|
||||
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"-->
|
||||
|
|
@ -299,21 +352,24 @@
|
|||
</page>
|
||||
<page string="Training Details">
|
||||
<group>
|
||||
<field name="training_details" string='Training Details' required="1" attrs="{'readonly':[('state','=','approve')]}" nolabel="1"/>
|
||||
<field name="training_details" string='Training Details'
|
||||
required="1" attrs="{'readonly':[('state','=','approve')]}"
|
||||
nolabel="1" />
|
||||
</group>
|
||||
|
||||
</page>
|
||||
|
||||
<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"/>
|
||||
<field name="name" string="attachment Name" />
|
||||
<field name="datas" string="file content" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<!--page string="Information" name="information">
|
||||
<!--page
|
||||
string="Information" name="information">
|
||||
<group>
|
||||
<group>
|
||||
<field name="approved_by" string="Approved By"
|
||||
|
|
@ -327,11 +383,11 @@
|
|||
</page-->
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="o_attachment_preview"/>
|
||||
<div class="o_attachment_preview" />
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="activity_ids" widget="mail_activity" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
@ -342,19 +398,20 @@
|
|||
<field name="model">hr.official.mission</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree decoration-danger="state == 'refused'" decoration-info="state == 'draft'"
|
||||
string="Employee Training">
|
||||
<field name="mission_type" string="Mission Type"/>
|
||||
<field name="employee_id" string="Responsible"/>
|
||||
<field name="date" string="Date Request"/>
|
||||
<field name="course_name" string="Course Name"/>
|
||||
<field name="train_category" string="Category"/>
|
||||
<field name="date_from" string="Date From"/>
|
||||
<field name="date_to" string="Date To"/>
|
||||
<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)]}"/>
|
||||
<field name="state" string="Status"/>
|
||||
string="Employee Training">
|
||||
<field name="mission_type" string="Mission Type" />
|
||||
<field name="employee_id" string="Responsible" />
|
||||
<field name="date" string="Date Request" />
|
||||
<field name="course_name" string="Course Name" />
|
||||
<field name="train_category" string="Category" />
|
||||
<field name="date_from" string="Date From" />
|
||||
<field name="date_to" string="Date To" />
|
||||
<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)]}" />
|
||||
<field name="state" string="Status" />
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
|
|
@ -367,26 +424,29 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="course_name"/>
|
||||
<field name="mission_type"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="employee_no"/>
|
||||
<field name="destination"/>
|
||||
<field name="train_category"/>
|
||||
<field name="state"/>
|
||||
<field name="course_name" />
|
||||
<field name="mission_type" />
|
||||
<field name="employee_id" />
|
||||
<field name="employee_no" />
|
||||
<field name="destination" />
|
||||
<field name="train_category" />
|
||||
<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'}"/>
|
||||
<filter name="group_branch" string="Branch" domain="[]" context="{'group_by': 'is_branch'}"/>
|
||||
<filter name="group_state" string="State" domain="[]" context="{'group_by': 'state'}"/>
|
||||
context="{'group_by': 'department_id2'}" />
|
||||
<filter name="group_branch" string="Branch" domain="[]"
|
||||
context="{'group_by': 'is_branch'}" />
|
||||
<filter name="group_state" string="State" domain="[]"
|
||||
context="{'group_by': 'state'}" />
|
||||
</group>
|
||||
<separator/>
|
||||
<filter string="My Requests" name="my_request" domain="[('employee_id.user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
<separator />
|
||||
<filter string="My Requests" name="my_request"
|
||||
domain="[('employee_id.user_id', '=', uid)]" />
|
||||
<separator />
|
||||
</search>
|
||||
|
||||
</field>
|
||||
|
|
@ -394,29 +454,29 @@
|
|||
|
||||
|
||||
<record id="action_tagwaarden_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field eval="1" name="sequence" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="employee_training_tree_view"/>
|
||||
<field name="act_window_id" ref="employee_training_action"/>
|
||||
<field name="view_id" ref="employee_training_tree_view" />
|
||||
<field name="act_window_id" ref="employee_training_action" />
|
||||
</record>
|
||||
|
||||
<record id="action_tagwaarden_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field eval="2" name="sequence" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="employee_training_form_view"/>
|
||||
<field name="act_window_id" ref="employee_training_action"/>
|
||||
<field name="view_id" ref="employee_training_form_view" />
|
||||
<field name="act_window_id" ref="employee_training_action" />
|
||||
</record>
|
||||
|
||||
<!-- hr_job_inherit -->
|
||||
<record id="view_hr_job_cours_form_inherit" model="ir.ui.view">
|
||||
<field name="name">hr.job.form.cours.inherit</field>
|
||||
<field name="model">hr.job</field>
|
||||
<field name="priority" eval="16"/>
|
||||
<field name="inherit_id" ref="hr.view_hr_job_form"/>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="inherit_id" ref="hr.view_hr_job_form" />
|
||||
<field name="arch" type="xml">
|
||||
<notebook>
|
||||
<page string="Courses">
|
||||
<field name="course_ids" widget="many2many"/>
|
||||
<field name="course_ids" widget="many2many" />
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
|
|
@ -429,55 +489,64 @@
|
|||
<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')]}"/>
|
||||
<button name="set_to_draft" string="Set to Draft" class="oe_highlight" type="object"
|
||||
attrs="{'invisible':[('status','not in', ('done','refused'))]}"/>
|
||||
<field name="status" widget="statusbar" statusbar_visible="draft,direct_manager,approved,approved2,done,refused"/>
|
||||
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'))]}" />
|
||||
<field name="status" widget="statusbar"
|
||||
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">
|
||||
<field name="attachment_count" widget="statinfo" string="Attachments"
|
||||
options="{'reload_on_button': true}"/>
|
||||
<button name="action_get_attachment_view" class="oe_stat_button"
|
||||
icon="fa-file-text-o"
|
||||
type="object">
|
||||
<field name="attachment_count" widget="statinfo"
|
||||
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="days" readonly="1"/>
|
||||
<field name="hours" readonly="1" widget="float_time"/>
|
||||
<field name="employee_id" readonly="1" />
|
||||
<field name="official_mission_id" readonly="1" string='Mission Type' />
|
||||
<field name="days" readonly="1" />
|
||||
<field name="hours" readonly="1" widget="float_time" />
|
||||
</group>
|
||||
<group>
|
||||
|
||||
<field name="date_from" readonly="1"/>
|
||||
<field name="date_to" readonly="1"/>
|
||||
<field name="appraisal_id" attrs="{'invisible':[('appraisal_id','=',False)]}"/>
|
||||
<field name="appraisal_result" attrs="{'invisible':[('appraisal_id','=',False)]}"/>
|
||||
<field name="date_from" readonly="1" />
|
||||
<field name="date_to" readonly="1" />
|
||||
<field name="appraisal_id"
|
||||
attrs="{'invisible':[('appraisal_id','=',False)]}" />
|
||||
<field name="appraisal_result"
|
||||
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"/>
|
||||
<field name="training_details"/>
|
||||
<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" />
|
||||
<field name="training_details" />
|
||||
|
||||
</group>
|
||||
|
||||
</group>
|
||||
|
||||
</sheet>
|
||||
<div class="o_attachment_preview"/>
|
||||
<div class="o_attachment_preview" />
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_follower_ids" widget="mail_followers" />
|
||||
<field name="activity_ids" widget="mail_activity" />
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
|
@ -488,23 +557,26 @@
|
|||
<field name="name">Employee Training Course</field>
|
||||
<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'">
|
||||
<field name="employee_id"/>
|
||||
<field name="official_mission_id" string='Mission Type'/>
|
||||
<field name="course_name"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="days"/>
|
||||
<field name="hour_from" widget="float_time"/>
|
||||
<field name="hour_to" widget="float_time"/>
|
||||
<field name="hours" widget="float_time"/>
|
||||
<field name="appraisal_id" invisible="1"/>
|
||||
<field name="appraisal_result" 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)]}"/>
|
||||
<tree string="Employee official mission Line" decoration-info="status == 'draft'"
|
||||
decoration-danger="status == 'refused'" decoration-success="status=='approved'">
|
||||
<field name="employee_id" />
|
||||
<field name="official_mission_id" string='Mission Type' />
|
||||
<field name="course_name" />
|
||||
<field name="date_from" />
|
||||
<field name="date_to" />
|
||||
<field name="days" />
|
||||
<field name="hour_from" widget="float_time" />
|
||||
<field name="hour_to" widget="float_time" />
|
||||
<field name="hours" widget="float_time" />
|
||||
<field name="appraisal_id" invisible="1" />
|
||||
<field name="appraisal_result"
|
||||
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)]}" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -521,23 +593,21 @@
|
|||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_employees_training_lines_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<record id="action_employees_training_lines_form" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="hr_employees_training_lines_form"/>
|
||||
<field name="act_window_id" ref="hr_employees_training_lines_action"/>
|
||||
<field name="view_id" ref="hr_employees_training_lines_form" />
|
||||
<field name="act_window_id" ref="hr_employees_training_lines_action" />
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="action_employees_training_lines_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field eval="1" name="sequence" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="hr_employees_training_lines_tree"/>
|
||||
<field name="act_window_id" ref="hr_employees_training_lines_action"/>
|
||||
<field name="view_id" ref="hr_employees_training_lines_tree" />
|
||||
<field name="act_window_id" ref="hr_employees_training_lines_action" />
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
</odoo>
|
||||
Loading…
Reference in New Issue