Skip to content

Commit 59338a6

Browse files
committed
version 1.4 updated
1 parent bdf2bc1 commit 59338a6

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

project_scrum/project_scrum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_task(self, cr, uid, sprint, pool):
8181
#effective_hours = fields.Float(compute="_compute", multi="effective_hours", string='Effective hours', help="Computed using the sum of the task work done.")
8282
#expected_hours = fields.Float(compute="_compute", multi="expected_hours", string='Planned Hours', help='Estimated time to do the task.')
8383
state = fields.Selection([('draft','Draft'),('open','Open'),('pending','Pending'),('cancel','Cancelled'),('done','Done')], string='State', required=False)
84-
company_id = fields.Many2one(related='project.project')
84+
#company_id = fields.Many2one(related='project.project')
8585

8686
@api.onchange('date_start')
8787
def onchange_date_start(self):
@@ -107,7 +107,7 @@ class project_user_stories(models.Model):
107107
test_ids = fields.One2many(comodel_name = 'project.scrum.test', inverse_name = 'user_story_id_test')
108108
test_count = fields.Integer(compute = '_test_count')
109109
sequence = fields.Integer('Sequence')
110-
company_id = fields.Many2one(related='project.project')
110+
#company_id = fields.Many2one(related='project.project')
111111
#has_task = fields.Boolean()
112112
#has_test = fields.Boolean()
113113

@@ -229,7 +229,7 @@ class scrum_meeting(models.Model):
229229
question_today = fields.Text(string = 'Description', required=True)
230230
question_blocks = fields.Text(string = 'Description', required=True)
231231
question_backlog = fields.Selection([('yes','Yes'),('no','No')], string='Backlog Accurate?', required=False, default = 'yes')
232-
company_id = fields.Many2one(related='project.project')
232+
#company_id = fields.Many2one(related='project.project')
233233

234234
@api.multi
235235
def send_email(self):
@@ -299,7 +299,7 @@ class test_case(models.Model):
299299
description_test = fields.Html(string = 'Description')
300300
sequence_test = fields.Integer(string = 'Sequence', select=True)
301301
stats_test = fields.Selection([('draft','Draft'),('in progress','In Progress'),('cancel','Cancelled')], string='State', required=False)
302-
company_id = fields.Many2one(related='project.project')
302+
#company_id = fields.Many2one(related='project.project')
303303

304304
def _resolve_project_id_from_context(self, cr, uid, context=None):
305305
if context is None:

project_scrum/security/project_security.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,40 @@
66
<field name="name">Sprint</field>
77
<field name="model_id" ref="model_project_scrum_sprint"/>
88
<field name="global" eval="True"/>
9-
<field name="domain_force">[(1, '=', 1)]</field>
9+
<field name="domain_force">['|',
10+
('company_id', '=', False),
11+
('company_id', 'child_of', [user.company_id.id]),
12+
]</field>
1013
</record>
1114

1215
<record model="ir.rule" id="ps_meeting_rule">
1316
<field name="name">Meeting</field>
1417
<field name="model_id" ref="model_project_scrum_meeting"/>
1518
<field name="global" eval="True"/>
16-
<field name="domain_force">[(1, '=', 1)]</field>
19+
<field name="domain_force">['|',
20+
('company_id', '=', False),
21+
('company_id', 'child_of', [user.company_id.id]),
22+
]</field>
1723
</record>
1824

1925
<record model="ir.rule" id="ps_us_rule">
2026
<field name="name">User Story</field>
2127
<field name="model_id" ref="model_project_scrum_us"/>
2228
<field name="global" eval="True"/>
23-
<field name="domain_force">[(1, '=', 1)]</field>
29+
<field name="domain_force">['|',
30+
('company_id', '=', False),
31+
('company_id', 'child_of', [user.company_id.id]),
32+
]</field>
2433
</record>
2534

2635
<record model="ir.rule" id="ps_test_rule">
2736
<field name="name">Test Case</field>
2837
<field name="model_id" ref="model_project_scrum_test"/>
2938
<field name="global" eval="True"/>
30-
<field name="domain_force">[(1, '=', 1)]</field>
39+
<field name="domain_force">['|',
40+
('company_id', '=', False),
41+
('company_id', 'child_of', [user.company_id.id]),
42+
]</field>
3143
</record>
3244

3345
<!--

0 commit comments

Comments
 (0)