2018-01-16 06:58:15 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2018-01-16 11:34:37 +01:00
|
|
|
<flectra>
|
2018-01-16 06:58:15 +01:00
|
|
|
|
|
|
|
<record id="group_project_user" model="res.groups">
|
|
|
|
<field name="name">User</field>
|
|
|
|
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
|
|
|
<field name="category_id" ref="base.module_category_project_management"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="group_project_manager" model="res.groups">
|
|
|
|
<field name="name">Manager</field>
|
|
|
|
<field name="category_id" ref="base.module_category_project_management"/>
|
|
|
|
<field name="implied_ids" eval="[(4, ref('group_project_user'))]"/>
|
|
|
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="group_time_work_estimation_tasks" model="res.groups">
|
|
|
|
<field name="name">Time Estimation on Tasks</field>
|
|
|
|
<field name="category_id" ref="base.module_category_hidden"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="group_subtask_project" model="res.groups">
|
|
|
|
<field name="name">Use Subtask Project</field>
|
|
|
|
<field name="category_id" ref="base.module_category_hidden"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<data noupdate="1">
|
|
|
|
<record id="base.default_user" model="res.users">
|
|
|
|
<field name="groups_id" eval="[(4,ref('project.group_project_manager'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="project_comp_rule">
|
|
|
|
<field name="name">Project: multi-company</field>
|
|
|
|
<field name="model_id" ref="model_project_project"/>
|
|
|
|
<field name="global" eval="True"/>
|
|
|
|
<field name="domain_force">['|',
|
|
|
|
('company_id', '=', False),
|
|
|
|
('company_id', 'child_of', [user.company_id.id]),
|
|
|
|
]</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="project_project_manager_rule">
|
|
|
|
<field name="name">Project: project manager: see all</field>
|
|
|
|
<field name="model_id" ref="model_project_project"/>
|
|
|
|
<field name="domain_force">[(1, '=', 1)]</field>
|
|
|
|
<field name="groups" eval="[(4,ref('project.group_project_manager'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="project_public_members_rule">
|
|
|
|
<field name="name">Project: employees: following required for follower-only projects</field>
|
|
|
|
<field name="model_id" ref="model_project_project"/>
|
|
|
|
<field name="domain_force">['|',
|
|
|
|
('privacy_visibility', '!=', 'followers'),
|
|
|
|
('message_partner_ids', 'in', [user.partner_id.id])
|
|
|
|
]</field>
|
|
|
|
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="task_comp_rule">
|
|
|
|
<field name="name">Project/Task: multi-company</field>
|
|
|
|
<field name="model_id" ref="model_project_task"/>
|
|
|
|
<field name="global" eval="True"/>
|
|
|
|
<field name="domain_force">['|',
|
|
|
|
('company_id', '=', False),
|
|
|
|
('company_id', 'child_of', [user.company_id.id]),
|
|
|
|
]</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="task_visibility_rule">
|
|
|
|
<field name="name">Project/Task: employees: follow required for follower-only projects</field>
|
|
|
|
<field name="model_id" ref="model_project_task"/>
|
|
|
|
<field name="domain_force">[
|
|
|
|
'|',
|
|
|
|
('project_id.privacy_visibility', '!=', 'followers'),
|
|
|
|
'|',
|
|
|
|
('project_id.message_partner_ids', 'in', [user.partner_id.id]),
|
|
|
|
'|',
|
|
|
|
('message_partner_ids', 'in', [user.partner_id.id]),
|
|
|
|
# to subscribe check access to the record, follower is not enough at creation
|
|
|
|
('user_id', '=', user.id)
|
|
|
|
]</field>
|
|
|
|
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="project_manager_all_project_tasks_rule">
|
|
|
|
<field name="name">Project/Task: project manager: see all</field>
|
|
|
|
<field name="model_id" ref="model_project_task"/>
|
|
|
|
<field name="domain_force">[(1, '=', 1)]</field>
|
|
|
|
<field name="groups" eval="[(4,ref('project.group_project_manager'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record model="ir.rule" id="report_project_task_user_report_comp_rule">
|
|
|
|
<field name="name">Task Analysis multi-company</field>
|
|
|
|
<field name="model_id" ref="model_report_project_task_user"/>
|
|
|
|
<field name="global" eval="True"/>
|
|
|
|
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Portal -->
|
|
|
|
<record id="project_project_rule_portal" model="ir.rule">
|
|
|
|
<field name="name">Project: portal users: portal and following</field>
|
|
|
|
<field name="model_id" ref="project.model_project_project"/>
|
|
|
|
<field name="domain_force">[
|
|
|
|
'&',
|
|
|
|
('privacy_visibility', '=', 'portal'),
|
|
|
|
('message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
|
|
|
|
]</field>
|
|
|
|
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="project_task_rule_portal" model="ir.rule">
|
|
|
|
<field name="name">Project/Task: portal users: (portal and following project) or (portal and following task)</field>
|
|
|
|
<field name="model_id" ref="project.model_project_task"/>
|
|
|
|
<field name="domain_force">[
|
|
|
|
'|',
|
|
|
|
'&',
|
|
|
|
('project_id.privacy_visibility', '=', 'portal'),
|
|
|
|
('project_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
|
|
|
|
'&',
|
|
|
|
('project_id.privacy_visibility', '=', 'portal'),
|
|
|
|
('message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
|
|
|
|
]</field>
|
|
|
|
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
</data>
|
2018-01-16 11:34:37 +01:00
|
|
|
</flectra>
|