Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] portal_holiday: Migration to 16.0 (vib)
- Loading branch information
Showing
7 changed files
with
121 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
|
||
<record id="employee_potal_advanced" model="hr.employee"> | ||
<field name="name">John Portal Advanced</field> | ||
<field name="user_id" ref="portal_backend.user_portal_advanced"/> | ||
<field name="department_id" ref="hr.dep_rd"/> | ||
<field name="parent_id" ref="hr.employee_admin"/> | ||
<field name="job_id" ref="hr.job_developer"/> | ||
<field name="job_title">Junior Developer</field> | ||
<field name="category_ids" eval="[(6, 0, [ref('hr.employee_category_4')])]"/> | ||
<field name="work_location_id" ref="hr.work_location_1"/> | ||
<field name="image_1920" type="base64" file="portal_backend/static/img/advanced_partner-image.png"/> | ||
<field name="create_date">2022-01-01 00:00:00</field> | ||
</record> | ||
|
||
<!-- allocations --> | ||
<record id="hr_holidays_allocation_cl_pa" model="hr.leave.allocation"> | ||
<field name="name">Paid Time Off for John Portal Advanced</field> | ||
<field name="holiday_status_id" ref="hr_holidays.holiday_status_cl"/> | ||
<field name="number_of_days">10</field> | ||
<field name="employee_id" ref="portal_holidays.employee_potal_advanced"/> | ||
<field name="employee_ids" eval="[(4, ref('portal_holidays.employee_potal_advanced'))]"/> | ||
<field name="state">confirm</field> | ||
<field name="date_from" eval="time.strftime('%Y-1-1')"/> | ||
<field name="date_to" eval="time.strftime('%Y-12-31')"/> | ||
</record> | ||
<function model="hr.leave.allocation" name="action_validate"> | ||
<value eval="ref('portal_holidays.hr_holidays_allocation_cl_pa')"/> | ||
</function> | ||
|
||
<record id="hr_holidays_allocation_vc_pa" model="hr.leave.allocation"> | ||
<field name="name">Time Management Training</field> | ||
<field name="holiday_status_id" ref="hr_holidays.holiday_status_training"/> | ||
<field name="number_of_days">7</field> | ||
<field name="employee_id" ref="portal_holidays.employee_potal_advanced"/> | ||
<field name="employee_ids" eval="[(4, ref('portal_holidays.employee_potal_advanced'))]"/> | ||
<field name="state">confirm</field> | ||
<field name="date_from" eval="time.strftime('%Y-1-1')"/> | ||
<field name="date_to" eval="time.strftime('%Y-12-31')"/> | ||
</record> | ||
|
||
<!-- leave request --> | ||
<record id="portal_holidays.employee_potal_advanced" model="hr.employee"> | ||
<field name="leave_manager_id" ref="base.user_admin"/> | ||
</record> | ||
|
||
<record id="hr_holidays_cl_pa" model="hr.leave"> | ||
<field name="name">Trip with Family</field> | ||
<field name="holiday_status_id" ref="hr_holidays.holiday_status_cl"/> | ||
<field eval="time.strftime('%Y-%m-05')" name="date_from"/> | ||
<field eval="time.strftime('%Y-%m-08')" name="date_to"/> | ||
<field eval="time.strftime('%Y-%m-05')" name="request_date_from"/> | ||
<field eval="time.strftime('%Y-%m-08')" name="request_date_to"/> | ||
<field name="employee_id" ref="portal_holidays.employee_potal_advanced"/> | ||
<field name="employee_ids" eval="[(4, ref('portal_holidays.employee_potal_advanced'))]"/> | ||
</record> | ||
|
||
<record id="hr_holidays_sl_pa" model="hr.leave"> | ||
<field name="name">Sick day</field> | ||
<field name="holiday_status_id" ref="hr_holidays.holiday_status_sl"/> | ||
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="date_from"/> | ||
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="date_to"/> | ||
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0)).strftime('%Y-%m-%d 01:00:00')" name="request_date_from"/> | ||
<field eval="(datetime.now()+relativedelta(months=1, day=3, weekday=0) + relativedelta(weekday=2)).strftime('%Y-%m-%d 23:00:00')" name="request_date_to"/> | ||
<field name="employee_id" ref="portal_holidays.employee_potal_advanced"/> | ||
<field name="employee_ids" eval="[(4, ref('portal_holidays.employee_potal_advanced'))]"/> | ||
<field name="state">confirm</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
|
||
<record id="user_portal_advanced" model="res.users" context="{'no_reset_password': True}"> | ||
<field name="groups_id" eval="[Command.set([ref('portal_holiday.group_portal_backend_holiday')])]"/> | ||
<record id="portal_backend.user_portal_advanced" model="res.users" context="{'no_reset_password': True}"> | ||
<field name="groups_id" eval="[(4, ref('portal_holidays.group_portal_backend_holiday'))]"/> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
portal_holiday_user_allocation,portal-holiday-model_hr_leave_allocation,hr_holidays.model_hr_leave_allocation,group_portal_backend_holiday,1,1,1,0 | ||
portal_holiday_user_holidays,portal-holiday-model_hr_leave,hr_holidays.model_hr_leave,group_portal_backend_holiday,1,1,1,0 | ||
portal_holiday_calendar_attendee,portal-holiday-model_calendar_attendee,calendar.model_calendar_attendee,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_calendar_event,portal-holiday-model_calendar_event,calendar.model_calendar_event,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_hr_employee_public,portal-holiday-model_hr_employee_public,hr.model_hr_employee_public,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_hr_leave_type,portal-holiday-model_hr_leave_type,hr_holidays.model_hr_leave_type,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_hr_leave_stress_day,portal-holiday-model_hr_leave_stress_day,hr_holidays.model_hr_leave_stress_day,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_resource_calendar,portal-holiday-model_resource_calendar,resource.model_resource_calendar,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_resource_calendar_attendance,portal-holiday-model_resource_calendar_attendance,resource.model_resource_calendar_attendance,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_resource_calendar_leaves,portal-holiday-model_resource_calendar_leaves,resource.model_resource_calendar_leaves,group_portal_backend_holiday,1,0,0,0 | ||
portal_holiday_resource_resource,portal-holiday-model_resource_resource,resource.model_resource_resource,group_portal_backend_holiday,1,0,0,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<record model="ir.rule" id="res_partner_portal_holiday_rule"> | ||
<field name="name">res_partner: portal holiday: read access on manager partner</field> | ||
<field name="model_id" ref="base.model_res_partner"/> | ||
<field name="domain_force">[('id', 'child_of', user.employee_parent_id.related_contact_ids.ids)]</field> | ||
<field name="groups" eval="[Command.link(ref('portal_holidays.group_portal_backend_holiday'))]"/> | ||
<field name="perm_create" eval="False"/> | ||
<field name="perm_unlink" eval="False"/> | ||
<field name="perm_write" eval="False"/> | ||
</record> | ||
</data> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<data> | ||
<!-- Show portal users in employees --> | ||
<record id="view_employee_form" model="ir.ui.view"> | ||
<field name="name">view.employee.form</field> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.view_employee_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//group[@name='active_group']/field[@name='user_id']" position="attributes"> | ||
<attribute name="domain">[]</attribute> | ||
</xpath> | ||
</field> | ||
</record> | ||
</data> | ||
</odoo> |