diff --git a/verdigado_attendance/__manifest__.py b/verdigado_attendance/__manifest__.py index 88ba645..474e764 100644 --- a/verdigado_attendance/__manifest__.py +++ b/verdigado_attendance/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Verdigado HR Attendance", - "version": "15.0.1.0.1", + "version": "15.0.1.0.2", "category": "Human Resources", "website": "https://github.com/verdigado/odoo-customize", "author": "verdigado eG", diff --git a/verdigado_attendance/migrations/15.0.1.0.2/post-migration.py b/verdigado_attendance/migrations/15.0.1.0.2/post-migration.py new file mode 100644 index 0000000..ebeb939 --- /dev/null +++ b/verdigado_attendance/migrations/15.0.1.0.2/post-migration.py @@ -0,0 +1,28 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version=None): + group_ids = [] + for xmlid in ( + "hr_holidays.group_hr_holidays_user", + "base.group_allow_export", + "base.group_private_addresses", + "base.group_user", + "base.group_partner_manager", + "base.group_no_one", + "mail.group_mail_template_editor", + "hr.group_hr_user", + "hr_attendance.group_hr_attendance_kiosk", + "hr_attendance.group_hr_attendance", + "hr_attendance.group_hr_attendance_user", + "hr_holidays.group_hr_holidays_responsible", + "verdigado_attendance.group_verdigado_employee", + ): + group_ids += env.ref(xmlid).ids + + env.ref("base.default_user").write( + { + "groups_id": [(6, 0, group_ids)], + } + ) diff --git a/verdigado_attendance/security/verdigado_attendance.xml b/verdigado_attendance/security/verdigado_attendance.xml index 90d58d3..2e3535a 100644 --- a/verdigado_attendance/security/verdigado_attendance.xml +++ b/verdigado_attendance/security/verdigado_attendance.xml @@ -167,6 +167,9 @@ - +