training new notes
This commit is contained in:
parent
7e73dea7ef
commit
a87025e44e
|
|
@ -2587,5 +2587,20 @@ msgstr "إضافة موظفين للدورة التدريبية"
|
|||
msgid "You must Approve all Employees Line First."
|
||||
msgstr "يجب عمل تصديق لجميع الموظفين اولا"
|
||||
|
||||
#. module: exp_official_mission
|
||||
#: model:ir.model.fields,field_description:exp_official_mission.field_hr_official_mission__trainer_id
|
||||
msgid "Trainer"
|
||||
msgstr "المدرب"
|
||||
|
||||
#. module: exp_official_mission
|
||||
#: model:ir.model.fields,field_description:exp_official_mission.field_hr_official_mission__training_details
|
||||
#: model:ir.model.fields,field_description:exp_official_mission.field_hr_official_mission_employee__training_details
|
||||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_training_form_view
|
||||
msgid "Training Details"
|
||||
msgstr "تفاصيل الدورة التدريبية"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ class HrOfficialMission(models.Model):
|
|||
department_id2 = fields.Many2one(related='employee_id.department_id', readonly=True,store=True,string='Department')
|
||||
is_branch = fields.Many2one(related='department_id2.branch_name', store=True, readonly=True)
|
||||
attachment_count = fields.Integer(string="Attachments", compute="_compute_attachment_count")
|
||||
training_details = fields.Html('Training Details')
|
||||
trainer_id = fields.Many2one('res.partner', string="Trainer")
|
||||
|
||||
|
||||
|
||||
'''@api.constrains('employee_ids')
|
||||
|
|
@ -701,7 +704,7 @@ class EmployeeCourseName(models.Model):
|
|||
|
||||
name = fields.Char(translate=True)
|
||||
code = fields.Char()
|
||||
job_ids = fields.One2many('hr.job', 'course_ids', string='Jobs', readonly=True)
|
||||
job_ids = fields.One2many('hr.job', 'course_ids', string='Jobs', readonly=False)
|
||||
company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.user.company_id)
|
||||
|
||||
def unlink(self):
|
||||
|
|
@ -894,6 +897,8 @@ class HrOfficialMissionEmployee(models.Model):
|
|||
('done', _('Done')),
|
||||
('refused', _('Refused')),
|
||||
], default="draft", tracking=True)
|
||||
training_details = fields.Html('Training Details', related="official_mission_id.training_details")
|
||||
|
||||
|
||||
|
||||
def approve(self):
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
<field name="date_duration" string="Duration Days" readonly="1" force_save="1"
|
||||
attrs="{'required':[('duration_type','=','days')]}"/>
|
||||
|
||||
<field name="mission_purpose" string='Training Purpose' required="1" attrs="{'readonly':[('state','=','approve')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
|
|
@ -105,6 +104,8 @@
|
|||
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" required="1" 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)]}"/>
|
||||
<field name="official_mission" string="Allowance Name"
|
||||
|
|
@ -190,7 +191,7 @@
|
|||
<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"/>
|
||||
icon="fa-paperclip" attrs="{'invisible': [('attachment_count', '=', 0)]}"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
|
|
@ -230,8 +231,14 @@
|
|||
<!-- </group>-->
|
||||
</group>
|
||||
</page>
|
||||
<page string="Training Details">
|
||||
<group>
|
||||
<field name="training_details" string='Training Details' required="1" attrs="{'readonly':[('state','=','approve')]}"/>
|
||||
</group>
|
||||
|
||||
<page string="Attachments" name="attachments">
|
||||
</page>
|
||||
|
||||
<page string="Attachments" name="attachments" invisible="1">
|
||||
<field name="attach_ids" string="Attachments"
|
||||
attrs="{'readonly':[('state','!=','draft')]}">
|
||||
<tree editable="bottom">
|
||||
|
|
@ -391,7 +398,7 @@
|
|||
<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="state"/>
|
||||
<field name="training_details"/>
|
||||
|
||||
</group>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class HrOfficialMission(models.Model):
|
|||
'employee_id': self.employee_id.id,
|
||||
'partner_id': self.partner_id.id,
|
||||
'product_category_ids':[(4, self.mission_type.pr_product_id.categ_id.id)] ,
|
||||
'purchase_purpose': self.mission_purpose,
|
||||
'purchase_purpose': self.training_details,
|
||||
'line_ids': [(0, 0, product_line)]
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<field name="purchase_request_id" attrs="{'invisible':[('purchase_request_id','=',False)]}" readonly="1"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='mission_purpose']" position="attributes">
|
||||
<xpath expr="//field[@name='training_details']" position="attributes">
|
||||
<attribute name="required">True</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
|||
Loading…
Reference in New Issue