-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathagile.py
38 lines (29 loc) · 950 Bytes
/
agile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- coding: utf-8 -*-
"""
Contains Code for Agile part of Project Module
Implements allowing Agile Development through Projects
:copyright: (c) 2013 by Openlabs Technologies & Consulting (P) Limited
:license: BSD, see LICENSE for more details.
"""
from trytond.model import ModelView, ModelSQL, fields
from trytond.pyson import Eval
__all__ = ['Agile']
class Agile(ModelSQL, ModelView):
'Agile'
__name__ = 'project.work'
type = fields.Selection([
('project', 'Project'),
('task', 'Task'),
('story', 'Story')],
'Type', required=True, select=True
)
category = fields.Selection([
('task', 'General Task'),
('bug', 'Defect/Bug'),
('test', 'Test')], 'Category',
states={'invisible': Eval('type') != 'task'}, depends=['type']
)
children_story = fields.One2Many(
'project.work', 'parent', 'Children',
domain=[('type', '=', 'task')]
)