Merge pull request #3548 from expsa/hr_traning_table
add hr.classification model
This commit is contained in:
commit
4583eb45e5
|
|
@ -396,6 +396,54 @@ msgstr "بند الصرف"
|
|||
msgid "Accounting"
|
||||
msgstr "الحسابات"
|
||||
|
||||
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name
|
||||
#: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form
|
||||
msgid "Name"
|
||||
msgstr "الاسم "
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active
|
||||
#: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form
|
||||
msgid "Active"
|
||||
msgstr "نشط "
|
||||
|
||||
|
||||
#. module: employee_requests
|
||||
#: model_terms:ir.ui.view,arch_db:employee_requests.view_hr_classification_form
|
||||
msgid "HR Classification"
|
||||
msgstr "التصنيف"
|
||||
|
||||
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name
|
||||
msgid "Classification"
|
||||
msgstr "التصنيف"
|
||||
|
||||
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__name
|
||||
msgid "Name"
|
||||
msgstr "الاسم "
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_hr_classification__active
|
||||
msgid "Active"
|
||||
msgstr "نشط "
|
||||
|
||||
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.actions.act_window,name:employee_requests.employee_hr_classification_actionn
|
||||
#: model:ir.ui.menu,name:employee_requests.hr_classification_menu_item
|
||||
msgid "HR Classifications"
|
||||
msgstr "إعداد التصنيف"
|
||||
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_employee_department_jobs__message_needaction
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_employee_effective_form__message_needaction
|
||||
|
|
@ -964,6 +1012,11 @@ msgstr "المعالين"
|
|||
msgid "Destination"
|
||||
msgstr "الجهــــه"
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_employee_other_request__classification_id
|
||||
msgid "Classification"
|
||||
msgstr "التصنيف"
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields,field_description:employee_requests.field_salary_destination__english_name
|
||||
msgid "English Name"
|
||||
|
|
@ -3989,3 +4042,7 @@ msgstr "يجب إدخال إسم دفتر اليومية لإعدادات الع
|
|||
msgid "Employee %s, has no Overtime Account Setting Base On Employee Type."
|
||||
msgstr "الموظف %s, ليس لديه إعدادات حساب بند صرف للأجر الإضافي حسب نوع الموظف."
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class EmployeeOtherRequest(models.Model):
|
|||
|
||||
is_branch = fields.Many2one(related='department_id.branch_name', store=True, readonly=True)
|
||||
|
||||
classification_id = fields.Many2one('hr.classification',string ='Classification')
|
||||
def print_with_details(self):
|
||||
return self.env.ref('employee_requests.action_report_employee_identification').report_action(self)
|
||||
|
||||
|
|
@ -91,36 +92,46 @@ class EmployeeOtherRequest(models.Model):
|
|||
if item.request_type == 'dependent':
|
||||
if not item.employee_dependant:
|
||||
raise exceptions.Warning(_('Please The dependents were not Included'))
|
||||
|
||||
#if item.employee_id.contract_id.contract_status == 'single':
|
||||
#raise exceptions.Warning(_('You can not Add Fimaly record Because Employee is Single'))
|
||||
else:
|
||||
for rec in item.employee_dependant:
|
||||
if not rec.attachment:
|
||||
raise exceptions.Warning(_('Please Insert dependents Attachments Files Below!'))
|
||||
item.state = "submit"
|
||||
|
||||
if item.request_type in ['suggestion','complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
|
||||
|
||||
if item.request_type == 'qualification':
|
||||
if not item.qualification_employee:
|
||||
raise exceptions.Warning(_('Please The qualification or certification were not Insert Below!'))
|
||||
|
||||
for rec in item.qualification_employee:
|
||||
if not rec.attachment:
|
||||
raise exceptions.Warning(_('Please Insert Attachments Files Below!'))
|
||||
else:
|
||||
item.state = "submit"
|
||||
|
||||
if item.request_type in ['suggestion', 'complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
if item.request_type == 'certification':
|
||||
if not item.certification_employee:
|
||||
raise exceptions.Warning(_('Please The qualification or certification were not Insert Below!'))
|
||||
|
||||
for rec in item.certification_employee:
|
||||
if not rec.attachment:
|
||||
raise exceptions.Warning(_('Please Insert Attachments Files Below!'))
|
||||
else:
|
||||
item.state = "submit"
|
||||
if item.request_type in ['suggestion', 'complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
else:
|
||||
item.state = "submit"
|
||||
if item.request_type in ['suggestion', 'complaint']:
|
||||
item.state = "submit"
|
||||
else:
|
||||
item.state = "confirm"
|
||||
|
||||
def confirm(self):
|
||||
#self.state = 'confirm'
|
||||
|
|
@ -252,7 +263,14 @@ class Qualification(models.Model):
|
|||
|
||||
|
||||
# Hr_Employee_Certification
|
||||
class HrCertification(models.Model):
|
||||
class HrCerti(models.Model):
|
||||
_inherit = 'hr.certification'
|
||||
|
||||
request_id = fields.Many2one('employee.other.request')
|
||||
|
||||
class HrCclassification(models.Model):
|
||||
_name = 'hr.classification'
|
||||
_rec_name = 'name'
|
||||
|
||||
name = fields.Char(string='Name') # Translatable
|
||||
active = fields.Boolean(default=True, string='Active')
|
||||
|
|
|
|||
|
|
@ -19,3 +19,5 @@ access_degree_medical_issuance_hr,degree_medical_issuance_hr,model_degree_medica
|
|||
access_degree_medical_issuance_emp,degree_medical_issuance_emp,model_degree_medical_issuance,base.group_user,1,0,0,0
|
||||
access_salary_destination_hr,salary_destination_hr,model_salary_destination,hr.group_hr_user,1,1,1,1
|
||||
access_salary_destination_emp,salary_destination_emp,model_salary_destination,base.group_user,1,0,0,0
|
||||
|
||||
access_hr_classification,hr_classification,model_hr_classification,base.group_user,1,1,1,1
|
||||
|
|
|
|||
|
|
|
@ -49,6 +49,7 @@
|
|||
<button name="draft_state" string="RE-Draft" class="oe_highlight" type="object"
|
||||
states="refused,done"
|
||||
groups="hr.group_hr_user" confirm="Are you sure to Reset To Draft This Record?"/>
|
||||
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">employee.other.request</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name= "context">{"search_default_my_request":1}</field>
|
||||
<field name= "context">{"search_default_my_request":1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Employee Other Request
|
||||
|
|
@ -68,7 +68,9 @@
|
|||
id="with_details2"
|
||||
attrs="{'invisible': ['|',('request_type', '!=', 'salary_fixing'),('state', '!=', 'approved')]}"
|
||||
class="oe_highlight" groups="base.group_user"/>
|
||||
<field name="state" widget="statusbar" statusbar_colors="{'KEY_IS_STATE':'VALUE_IS_COLOR'}"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,confirm,approved,refuse"
|
||||
statusbar_colors="{'KEY_IS_STATE':'VALUE_IS_COLOR'}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
|
|
@ -104,6 +106,11 @@
|
|||
|
||||
|
||||
|
||||
<field name="classification_id" string="Classification" required="1"/>
|
||||
<field name="classification_id" required="1"/>
|
||||
|
||||
|
||||
|
||||
<field name="print_type" attrs="{'invisible': [('request_type', '!=', 'salary_define')], 'required': [('request_type', '=', 'salary_define')],
|
||||
'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<!--field name="new_department_id" string="New department"
|
||||
|
|
@ -237,9 +244,9 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="employee_id"/>
|
||||
<field name="employee_no"/>
|
||||
<field name="department_id" />
|
||||
<field name="employee_id"/>
|
||||
<field name="employee_no"/>
|
||||
<field name="department_id" />
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_employee" string="Employee" domain="[]" context="{'group_by': 'employee_id'}"/>
|
||||
<filter name="group_department" string="Department" domain="[]" context="{'group_by': 'department_id'}"/>
|
||||
|
|
@ -247,11 +254,41 @@
|
|||
<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)]"/>
|
||||
<filter string="My Requests" name="my_request" domain="[('employee_id.user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="view_hr_classification_form" model="ir.ui.view">
|
||||
<field name="name">hr.classification.form</field>
|
||||
<field name="model">hr.classification</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="HR Classification">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" string="Name"/>
|
||||
<field name="active" string="Active"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="employee_hr_classification_actionn">
|
||||
<field name="name">HR Classifications</field>
|
||||
<field name="res_model">hr.classification</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<menuitem name="HR Classifications" id="hr_classification_menu_item"
|
||||
parent="hr.hr_menu_configuration"
|
||||
action="employee_hr_classification_actionn"
|
||||
/>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Reference in New Issue