Merge lp:~openerp-dev/openobject-addons/trunk-bug-719063-pso into lp:openobject-addons

Proposed by Priyesh (OpenERP)
Status: Rejected
Rejected by: qdp (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-719063-pso
Merge into: lp:openobject-addons
Diff against target: 132 lines (+59/-14)
6 files modified
hr_evaluation/__openerp__.py (+1/-0)
hr_evaluation/hr_evaluation_demo.xml (+0/-13)
hr_evaluation/security/ir_rule.xml (+25/-0)
hr_payroll/security/hr_security.xml (+8/-1)
hr_timesheet/security/hr_timesheet_security.xml (+1/-0)
hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml (+24/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-719063-pso
Reviewer Review Type Date Requested Status
qdp (OpenERP) Disapprove
Mustufa Rangwala (Open ERP) (community) Approve
Ujjvala Collins (community) Needs Resubmitting
Purnendu Singh (OpenERP) (community) Needs Resubmitting
Ashvin Rathod (OpenERP) (community) Needs Resubmitting
Priyesh (OpenERP) (community) Needs Resubmitting
Review via email: mp+55337@code.launchpad.net

Description of the change

Fixed 719063 (https://bugs.launchpad.net/openobject-addons/+bug/719063)
Added security rules in timesheet and payroll module.

Thanks.

To post a comment you must log in.
Revision history for this message
Priyesh (OpenERP) (pso-openerp) wrote :

Make proper indentation.

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve
Revision history for this message
qdp (OpenERP) (qdp) wrote :

patch for payroll is wrong: HR / Officer should be able to see all the payslips of him or of employess for which he's the manager. But this will be addressed in the R&D project related to hr_payroll, so you can simply remove that hunk.

second path for timesheet is correct, but i'm not sure that there isn't any other patch needed.

More investigation is needed, in the meanwhile you can already remove the 1st patch Priyesh.
Thanks

review: Needs Fixing
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

yes,

first patch for the payslip should be removed.

There is two problems still exists.

first for payslips (new user can see the payslip of another employees...) => We will fix this in trunk-payroll branch so no need to include it here.
and second for evaluation (new user can see the evaluations for other employess) => this should be fix here.

Thanks,
mra

review: Needs Fixing
Revision history for this message
Priyesh (OpenERP) (pso-openerp) wrote :

Removed rule from timesheet and payroll.
Created rule for evaluation and moved demo record of rule from demo xml to rule xml.

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

remove changes from hr_payroll/security/hr_security.xml.

for the evaluation it is working fine => as new user now only can see his/her evaulation.

4609. By Priyesh (OpenERP)

[MERGE] merge from same branch

Revision history for this message
Priyesh (OpenERP) (pso-openerp) :
review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve
Revision history for this message
qdp (OpenERP) (qdp) wrote :

hum how to say it?... i don't find a single line that differs between existing and proposed versions! And i must say that it's quite amazing to see that a diff of 76 lines (+27/-14), 4 files modified is doing absolutely nothing...

i must be missing something, please open my eyes!

review: Disapprove
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Yes,

We have created new file under security/ir_rule.xml because currently both the ir.rules for evaluation object was in demo file so we transfer them to ir.rule.xml in security as per openerp module structure.

And i agree we dont have any change in modified file 'hr_payroll/security/hr_security.xml' file but we had some changes before this diff so it appears here to remove it we have to manually uncommit that changes.

+ <record id="employee_evaluation_rule" model="ir.rule"> => this is the duplication of <record id="property_rule_evaluation" model="ir.rule"> it should be remove

Thanks,
mra

review: Needs Fixing
4610. By Ashvin Rathod (OpenERP)

[IMP] hr_evalution: remove duplicate record

Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello,

I have improved as per suggestion.

Thanks,
ara

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

As per comment 10 in bug it does not work for evaluation.
New user (groups= employee and partner manager only) can see only his/her evaluation.

Thanks,
mra

review: Needs Fixing
4611. By Purnendu Singh (OpenERP)

[FIX] hr_*: New user (groups= employee and partner manager only) can see only his/her evaluation, timesheet lines

Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

Hello,

Add rules in hr_evolution and hr_timesheet_sheet module.

So, the new user with (Groups= Employee and partner manger only) will be able to see only
his/her evolutions and timesheet lines.

Thanks,
Purnendu Singh

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Not working for timesheet lines.
If i have hr manager rights i can see all the time sheet lines as like expense.

review: Needs Fixing
4612. By Ujjvala Collins

[MERGE]: Merged with trunk-addons.

4613. By Ujjvala Collins

[IMP] hr_timesheet_sheet: Improved securtiy rules for timesheet lines.

Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello sir,

I've fixed the said problem. Please check.

Thanks,
Ujjvala

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Timesheet line: manager can see the all the timesheet lines but currently he/she can not.

can you fix it please?

And yes now we have Trunk payroll for 6.1 in trunk addons so kindly check the same issue with payroll and payroll account module too.

Thanks,
Mustufa

review: Needs Fixing
4614. By Ujjvala Collins

[FIX] hr_timesheet,hr_payroll: Fixed security rules for manager.

Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello sir,

I've fixed the said problem in timesheet lines as well as payroll module.

Thanks.

review: Needs Resubmitting
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello sir,

I've fixed the said problem in timesheet lines as well as payroll module.

Thanks.

review: Needs Resubmitting
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello sir,

I've fixed the said problem in timesheet lines as well as payroll module.

Thanks.

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) :
review: Approve
Revision history for this message
qdp (OpenERP) (qdp) wrote :

access rights set are not compliant with what we want for employees, hr officers and hr managers. Aline will make clear specs and a full review of the access rights in HR soon, so in the meanwhile i'm rejecting that branch.

review: Disapprove

Unmerged revisions

4614. By Ujjvala Collins

[FIX] hr_timesheet,hr_payroll: Fixed security rules for manager.

4613. By Ujjvala Collins

[IMP] hr_timesheet_sheet: Improved securtiy rules for timesheet lines.

4612. By Ujjvala Collins

[MERGE]: Merged with trunk-addons.

4611. By Purnendu Singh (OpenERP)

[FIX] hr_*: New user (groups= employee and partner manager only) can see only his/her evaluation, timesheet lines

4610. By Ashvin Rathod (OpenERP)

[IMP] hr_evalution: remove duplicate record

4609. By Priyesh (OpenERP)

[MERGE] merge from same branch

4608. By Priyesh (OpenERP)

Revert Changes

4607. By Priyesh (OpenERP)

[FIX] hr_timesheet_sheet: Added record rules for better security

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_evaluation/__openerp__.py'
2--- hr_evaluation/__openerp__.py 2011-04-08 12:57:58 +0000
3+++ hr_evaluation/__openerp__.py 2011-07-12 10:02:45 +0000
4@@ -44,6 +44,7 @@
5 "update_xml": [
6 "security/ir.model.access.csv",
7 "security/hr_evaluation_security.xml",
8+ "security/ir_rule.xml",
9 "wizard/hr_evaluation_mail_view.xml",
10 "hr_evaluation_view.xml",
11 "report/hr_evaluation_report_view.xml",
12
13=== modified file 'hr_evaluation/hr_evaluation_demo.xml'
14--- hr_evaluation/hr_evaluation_demo.xml 2011-02-18 12:23:44 +0000
15+++ hr_evaluation/hr_evaluation_demo.xml 2011-07-12 10:02:45 +0000
16@@ -1611,19 +1611,6 @@
17 <field eval="'run_employee_evaluation'" name="function" />
18 <field eval="'(False,)'" name="args" />
19 </record>
20-
21- <record id="property_rule_evaluation" model="ir.rule">
22- <field name="name">Employee Evaluation</field>
23- <field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
24- <field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
25- <field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
26- </record>
27- <record id="property_rule_evaluation_manager" model="ir.rule">
28- <field name="name">Manager Evaluation</field>
29- <field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
30- <field name="domain_force">['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id )]</field>
31- <field name="groups" eval="[(4,ref('base.group_hr_manager'))]"/>
32- </record>
33 </data>
34
35 </openerp>
36
37=== added file 'hr_evaluation/security/ir_rule.xml'
38--- hr_evaluation/security/ir_rule.xml 1970-01-01 00:00:00 +0000
39+++ hr_evaluation/security/ir_rule.xml 2011-07-12 10:02:45 +0000
40@@ -0,0 +1,25 @@
41+<?xml version="1.0" encoding="utf-8"?>
42+<openerp>
43+ <data noupdate="True">
44+
45+ <record id="property_rule_evaluation" model="ir.rule">
46+ <field name="name">Employee Evaluation</field>
47+ <field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
48+ <field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
49+ <field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
50+ </record>
51+ <record id="property_rule_evaluation_manager" model="ir.rule">
52+ <field name="name">Manager Evaluation</field>
53+ <field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
54+ <field name="domain_force">['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id)]</field>
55+ <field name="groups" eval="[(4,ref('base.group_hr_manager'))]"/>
56+ </record>
57+ <record id="property_rule_evaluation_employee" model="ir.rule">
58+ <field name="name">Employee Evaluation</field>
59+ <field model="ir.model" name="model_id" ref="model_hr_evaluation_evaluation"/>
60+ <field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
61+ <field name="groups" eval="[(4,ref('base.group_user'))]"/>
62+ </record>
63+
64+ </data>
65+</openerp>
66
67=== modified file 'hr_payroll/security/hr_security.xml'
68--- hr_payroll/security/hr_security.xml 2011-04-28 08:35:38 +0000
69+++ hr_payroll/security/hr_security.xml 2011-07-12 10:02:45 +0000
70@@ -12,6 +12,13 @@
71 <field name="domain_force">['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)]</field>
72 <field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
73 </record>
74+
75+ <record id="property_rule_employee_payslip_manager" model="ir.rule">
76+ <field name="name">Manager Payslip</field>
77+ <field model="ir.model" name="model_id" ref="model_hr_payslip"/>
78+ <field name="domain_force">[(1,'=',1)]</field>
79+ <field name="groups" eval="[(4,ref('base.group_hr_manager'))]"/>
80+ </record>
81
82 </data>
83-</openerp>
84\ No newline at end of file
85+</openerp>
86
87=== modified file 'hr_timesheet/security/hr_timesheet_security.xml'
88--- hr_timesheet/security/hr_timesheet_security.xml 2011-04-11 07:00:35 +0000
89+++ hr_timesheet/security/hr_timesheet_security.xml 2011-07-12 10:02:45 +0000
90@@ -6,6 +6,7 @@
91 <field name="name">HR Analytic Timesheet</field>
92 <field model="ir.model" name="model_id" ref="model_hr_analytic_timesheet"/>
93 <field name="domain_force">[('user_id', '=', user.id)]</field>
94+ <field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
95 </record>
96
97 </data>
98
99=== modified file 'hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml'
100--- hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml 2011-02-28 13:57:54 +0000
101+++ hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml 2011-07-12 10:02:45 +0000
102@@ -8,6 +8,30 @@
103 <field name="global" eval="True"/>
104 <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
105 </record>
106+ <record model="ir.rule" id="timesheet_rule">
107+ <field name="name">Employee Timesheet</field>
108+ <field name="model_id" search="[('model','=','hr_timesheet_sheet.sheet')]" model="ir.model"/>
109+ <field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
110+ <field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
111+ </record>
112+ <record model="ir.rule" id="timesheet_rule_manager">
113+ <field name="name">Manager Timesheet</field>
114+ <field name="model_id" search="[('model','=','hr_timesheet_sheet.sheet')]" model="ir.model"/>
115+ <field name="domain_force">[(1,'=',1)]</field>
116+ <field name="groups" eval="[(4,ref('base.group_hr_manager'))]"/>
117+ </record>
118+ <record model="ir.rule" id="timesheet_line_rule">
119+ <field name="name">Employee Timesheet Lines</field>
120+ <field name="model_id" search="[('model','=','hr.analytic.timesheet')]" model="ir.model"/>
121+ <field name="domain_force">[('user_id','=',user.id)]</field>
122+ <field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
123+ </record>
124+ <record model="ir.rule" id="timesheet_line_rule_manager">
125+ <field name="name">Manager Timesheet Lines</field>
126+ <field name="model_id" search="[('model','=','hr.analytic.timesheet')]" model="ir.model"/>
127+ <field name="domain_force">[(1,'=',1)]</field>
128+ <field name="groups" eval="[(4,ref('base.group_hr_manager'))]"/>
129+ </record>
130
131 </data>
132 </openerp>

Subscribers

People subscribed via source and target branches

to all changes: