Initial commit: Hr packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:50 +02:00
commit 62531cd146
2820 changed files with 1432848 additions and 0 deletions

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data noupdate="1">
<record model="ir.module.category" id="base.module_category_services_timesheets">
<field name="description">Helps you manage the timesheets.</field>
<field name="sequence">13</field>
</record>
<record id="group_hr_timesheet_user" model="res.groups">
<field name="name">User: own timesheets only</field>
<field name="category_id" ref="base.module_category_services_timesheets"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
<record id="group_hr_timesheet_approver" model="res.groups">
<field name="name">User: all timesheets</field>
<field name="category_id" ref="base.module_category_services_timesheets"/>
<field name="implied_ids" eval="[(4, ref('hr_timesheet.group_hr_timesheet_user'))]"/>
</record>
<record id="group_timesheet_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_services_timesheets"/>
<field name="implied_ids" eval="[(4, ref('hr_timesheet.group_hr_timesheet_approver')), (4, ref('hr.group_hr_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('group_timesheet_manager'))]"/>
</record>
<record id="timesheet_line_rule_portal_user" model="ir.rule">
<field name="name">account.analytic.line.timesheet.portal.user</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="active">0</field>
<field name="domain_force">[
('project_id', '!=', False),
'|',
('project_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
('task_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
('project_id.privacy_visibility', '=', 'portal'),
('project_id.collaborator_ids.partner_id', 'in', [user.partner_id.id]),
]</field>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="True"/>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record id="timesheet_line_rule_user" model="ir.rule">
<field name="name">account.analytic.line.timesheet.user</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="domain_force">[
('user_id', '=', user.id),
('project_id', '!=', False),
'|', '|',
('project_id.privacy_visibility', '!=', 'followers'),
('project_id.message_partner_ids', 'in', [user.partner_id.id]),
('task_id.message_partner_ids', 'in', [user.partner_id.id])
]</field>
<field name="groups" eval="[(4, ref('group_hr_timesheet_user'))]"/>
</record>
<record id="timesheet_line_rule_approver" model="ir.rule">
<field name="name">account.analytic.line.timesheet.approver</field>
<field name="model_id" ref="analytic.model_account_analytic_line" />
<field name="domain_force">[
('project_id', '!=', False),
'|',
('project_id.privacy_visibility', '!=', 'followers'),
('project_id.message_partner_ids', 'in', [user.partner_id.id])
]</field>
<field name="groups" eval="[(4, ref('hr_timesheet.group_hr_timesheet_approver'))]" />
</record>
<record id="timesheet_line_rule_manager" model="ir.rule">
<field name="name">account.analytic.line.timesheet.manager</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="domain_force">[('project_id', '!=', False)]</field>
<field name="groups" eval="[(4, ref('group_timesheet_manager')), (4, ref('project.group_project_manager'))]"/>
</record>
<record id="project.group_project_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('hr_timesheet.group_hr_timesheet_approver'))]"/>
</record>
<record model="ir.rule" id="timesheets_analysis_report_comp_rule">
<field name="name">Timesheets Analysis Report multi-company</field>
<field name="model_id" ref="model_timesheets_analysis_report"/>
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
</record>
<record id="timesheet_analysis_report_user" model="ir.rule">
<field name="name">Timesheets Analysis Report user</field>
<field name="model_id" ref="model_timesheets_analysis_report"/>
<field name="domain_force">[
('user_id', '=', user.id),
'|', '|',
('project_id.privacy_visibility', '!=', 'followers'),
('project_id.message_partner_ids', 'in', [user.partner_id.id]),
('task_id.message_partner_ids', 'in', [user.partner_id.id])
]</field>
<field name="groups" eval="[(4, ref('group_hr_timesheet_user'))]"/>
</record>
<record id="timesheet_analysis_report_approver" model="ir.rule">
<field name="name">Timesheets Analysis Report approver</field>
<field name="model_id" ref="model_timesheets_analysis_report"/>
<field name="domain_force">[
'|',
('project_id.privacy_visibility', '!=', 'followers'),
('project_id.message_partner_ids', 'in', [user.partner_id.id])
]</field>
<field name="groups" eval="[(4, ref('group_hr_timesheet_approver'))]"/>
</record>
<record id="timesheet_analysis_report_manager" model="ir.rule">
<field name="name">Timesheets Analysis Report manager</field>
<field name="model_id" ref="model_timesheets_analysis_report"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('group_timesheet_manager')), (4, ref('project.group_project_manager'))]"/>
</record>
</data>
</odoo>

View file

@ -0,0 +1,8 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_analytic_line_user,analytic.account.analytic.line.timesheet.user,analytic.model_account_analytic_line,hr_timesheet.group_hr_timesheet_user,1,1,1,1
access_account_analytic_user,analytic.account.analytic.timesheet.user,analytic.model_account_analytic_account,hr_timesheet.group_hr_timesheet_user,1,1,0,0
access_uom_uom_hr_timesheet,uom.uom.timesheet.user,uom.model_uom_uom,hr_timesheet.group_hr_timesheet_user,1,0,0,0
access_project_project,project.project.timesheet.user,model_project_project,hr_timesheet.group_hr_timesheet_user,1,0,0,0
access_project_task,project.task.timesheet.user,model_project_task,hr_timesheet.group_hr_timesheet_user,1,1,0,0
access_timesheets_analysis_report_manager,timesheets.analysis.report,model_timesheets_analysis_report,hr_timesheet.group_timesheet_manager,1,1,1,1
access_timesheets_analysis_report_user,timesheets.analysis.report,model_timesheets_analysis_report,hr_timesheet.group_hr_timesheet_user,1,0,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_analytic_line_user analytic.account.analytic.line.timesheet.user analytic.model_account_analytic_line hr_timesheet.group_hr_timesheet_user 1 1 1 1
3 access_account_analytic_user analytic.account.analytic.timesheet.user analytic.model_account_analytic_account hr_timesheet.group_hr_timesheet_user 1 1 0 0
4 access_uom_uom_hr_timesheet uom.uom.timesheet.user uom.model_uom_uom hr_timesheet.group_hr_timesheet_user 1 0 0 0
5 access_project_project project.project.timesheet.user model_project_project hr_timesheet.group_hr_timesheet_user 1 0 0 0
6 access_project_task project.task.timesheet.user model_project_task hr_timesheet.group_hr_timesheet_user 1 1 0 0
7 access_timesheets_analysis_report_manager timesheets.analysis.report model_timesheets_analysis_report hr_timesheet.group_timesheet_manager 1 1 1 1
8 access_timesheets_analysis_report_user timesheets.analysis.report model_timesheets_analysis_report hr_timesheet.group_hr_timesheet_user 1 0 1 0

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="access_account_analytic_line_portal_user" model="ir.model.access">
<field name="name">analytic.account.analytic.line.timesheet.portal.user</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="group_id" ref="base.group_portal"/>
<field name="active">0</field>
<field name="perm_read">1</field>
<field name="perm_write">0</field>
<field name="perm_create">0</field>
<field name="perm_unlink">0</field>
</record>
</data>
</odoo>