Merge pull request #3492 from expsa/hr_traning_table
modify on official_mission_id
This commit is contained in:
commit
838f34ef7d
|
|
@ -515,6 +515,15 @@ msgstr "تاريخ البداية"
|
|||
msgid "Date Request"
|
||||
msgstr "تاريخ الطلب"
|
||||
|
||||
#. module: exp_official_mission
|
||||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_especially_hours_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_especially_hours_tree_view
|
||||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_official_mission_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_training_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:exp_official_mission.employee_training_tree_view
|
||||
msgid "Date Requestt"
|
||||
msgstr "التاريخ "
|
||||
|
||||
#. module: exp_official_mission
|
||||
#: model:ir.model.fields,field_description:exp_official_mission.field_hr_official_mission__date_to
|
||||
#: model:ir.model.fields,field_description:exp_official_mission.field_hr_official_mission_employee__date_to
|
||||
|
|
|
|||
|
|
@ -297,6 +297,7 @@ class HrOfficialMission(models.Model):
|
|||
weekend_names = [d.name.lower() for d in weekend_days]
|
||||
date_range = [d for d in date_range if d.strftime('%A').lower() not in weekend_names]
|
||||
|
||||
|
||||
item.date_duration = len(date_range)
|
||||
|
||||
else:
|
||||
|
|
@ -362,7 +363,11 @@ class HrOfficialMission(models.Model):
|
|||
date_range = [d for d in date_range if
|
||||
d.strftime('%A').lower() not in weekend_names]
|
||||
|
||||
line.days = len(date_range)
|
||||
if not item.table_ids:
|
||||
line.days = len(date_range)
|
||||
else:
|
||||
unique_dates = set(item.table_ids.mapped('date'))
|
||||
item.days = len(unique_dates)
|
||||
if item.mission_type.related_with_financial is True:
|
||||
if item.mission_type.type_of_payment == 'fixed':
|
||||
if item.mission_type.day_price:
|
||||
|
|
|
|||
|
|
@ -167,24 +167,24 @@
|
|||
</group>
|
||||
|
||||
<group>
|
||||
<!-- <field name="ticket_insurance" string="Ticket Insurance"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <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')]}"/>
|
||||
<field name="note" string="Other"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
</group>
|
||||
<!-- <group>-->
|
||||
<!-- <field name="car_insurance" string="Car Insurance"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <field name="car_type" string="Car Type"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <field name="rent_days" string="Rent Days"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <field name="max_rent" string="Max Rent"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="car_insurance" string="Car Insurance"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <field name="car_type" string="Car Type"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <field name="rent_days" string="Rent Days"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- <field name="max_rent" string="Max Rent"-->
|
||||
<!-- attrs="{'readonly':[('state','!=','draft')]}"/>-->
|
||||
<!-- </group>-->
|
||||
</group>
|
||||
</page>
|
||||
<page string="Attachments" name="attachments">
|
||||
|
|
@ -243,11 +243,11 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="mission_type"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="employee_no"/>
|
||||
<field name="destination"/>
|
||||
<field name="state"/>
|
||||
<field name="mission_type"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="employee_no"/>
|
||||
<field name="destination"/>
|
||||
<field name="state"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter name="group_employee" string="Responsible" domain="[]" context="{'group_by': 'employee_id'}"/>
|
||||
<filter name="group_type" string="Mission Type" domain="[]" context="{'group_by': 'mission_type'}"/>
|
||||
|
|
@ -256,7 +256,7 @@
|
|||
<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>
|
||||
|
|
@ -287,7 +287,12 @@
|
|||
<group>
|
||||
<group>
|
||||
<field name="employee_id" readonly="1"/>
|
||||
<field name="official_mission_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}"–>-->
|
||||
<field name="days" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
|
|
@ -342,6 +347,7 @@
|
|||
<field name="hour_from" widget="float_time"/>
|
||||
<field name="hour_to" widget="float_time"/>
|
||||
<field name="hours" widget="float_time"/>
|
||||
<field name="total_hours" string="Total Hours"/>
|
||||
<field name="state" string="Status" invisible="1"/>
|
||||
<field name="state" string="Status"/>
|
||||
</tree>
|
||||
|
|
|
|||
|
|
@ -369,11 +369,11 @@
|
|||
<field name="table_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="description" string="Description" />
|
||||
<field name="date" string="Date Request"/>
|
||||
<field name="date" string="Date Requestt"/>
|
||||
<field name="hour_from" string="Hour from"
|
||||
/>
|
||||
required="1" widget="float_time"/>
|
||||
<field name="hour_to" string="Hour to"
|
||||
/>
|
||||
required="1" widget="float_time"/>
|
||||
<field name="trainer_id" string="Trainer" readonly="0"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
|
@ -430,6 +430,7 @@
|
|||
<field name="train_category" string="Category" />
|
||||
<field name="date_from" string="Date From" />
|
||||
<field name="date_to" string="Date To" />
|
||||
<field name="total_hours" string="Total Hours" />
|
||||
<field name="destination" string="Destination" />
|
||||
<field name="attachment_count" invisible="1" />
|
||||
<button name="action_get_attachment_view" string="Attachments" type="object"
|
||||
|
|
|
|||
Loading…
Reference in New Issue