Skip to content

Commit 61a23c8

Browse files
committed
2 parents f16016b + cc8c4ef commit 61a23c8

File tree

6 files changed

+139
-111
lines changed

6 files changed

+139
-111
lines changed

project_scrum/__openerp__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
{
1010
'name': 'project_scrum',
11-
'version': '1.0',
11+
'version': '1.1',
1212
'category': 'Project Management',
1313
#'complexity': "normal",
1414
'description': """

project_scrum/project_scrum.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,23 @@ class project_user_stories(models.Model):
7171
'use_scrum': True
7272
}
7373
name = fields.Char(string='Name')
74+
color = fields.Integer('Color Index')
7475
description = fields.Html(string = 'Description')
7576
actor_ids = fields.Many2many(comodel_name='project.scrum.actors', string = 'Actor')
7677
project_id = fields.Many2one(comodel_name = 'project.project', string = 'Project')
7778
sprint_id = fields.Many2one(comodel_name = 'project.scrum.sprint', string = 'Sprint')
7879
task_ids = fields.One2many(comodel_name = 'project.task', inverse_name = 'us_id', string = 'Task')
7980

81+
@api.model
82+
def _read_group_sprint_id(self, present_ids, domain, **kwargs):
83+
sprints = self.env['project.scrum.sprint'].search([]).name_get()
84+
return sprints, None
85+
86+
_group_by_full = {
87+
'sprint_id': _read_group_sprint_id,
88+
}
89+
name = fields.Char()
90+
8091
class project_task(models.Model):
8192
_inherit = "project.task"
8293
_defaults = {
@@ -119,18 +130,25 @@ class project_actors(models.Model):
119130
class scrum_meeting(models.Model):
120131
_name = 'project.scrum.meeting'
121132
_description = 'Project Scrum Daily Meetings'
122-
_inherit = ['mail.thread', 'ir.needaction_mixin']
133+
_inherit = ['mail.thread', 'ir.needaction_mixin', 'project.project']
123134
_defaults = {
124135
'use_scrum': True
125136
}
126137
sprint_id = fields.Many2one(comodel_name = 'project.scrum.sprint', string = 'Sprint')
127138
date_meeting = fields.Date(string = 'Date', required=True)
128-
user_id_meeting = fields.Char(string = 'Name', required=True) # name for person who attend to meeting
139+
user_id_meeting = fields.Many2one(comodel_name = 'res.users', string = 'Name', required=True) # name for person who attend to meeting
129140
question_yesterday = fields.Text(string = 'Description', required=True)
130141
question_today = fields.Text(string = 'Description', required=True)
131142
question_blocks = fields.Text(string = 'Description', required=True)
132143
question_backlog = fields.Selection([('yes','Yes'),('no','No')], string='Backlog Accurate?', required=False, default = 'yes')
133-
144+
project_id = fields.Reference(comodel_name = 'project.project', string = 'Project Name',
145+
selection='_reference_project')
146+
147+
@api.model
148+
def _reference_project(self):
149+
project = self.env['project.project'].browse(self.sprint_id.project_id)
150+
return [(project.id,project.name)]
151+
134152
@api.multi
135153
def send_email(self):
136154
assert len(self) == 1, 'This option should only be used for a single id at a time.'

project_scrum/project_scrum_view.xml

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@
5050
<group colspan="4" col="4">
5151
<field name="name" select="1"/>
5252
<field name="project_id"/> <!--on_change="onchange_project_id(project_id)"-->
53+
<!--
5354
<field name="scrum_master_id"/>
5455
<field name="product_owner_id"/>
56+
-->
5557
<field name="date_start" select="1"/>
5658
<field name="date_stop"/>
5759
<!--
@@ -100,41 +102,40 @@
100102

101103
<!--Scrum User Stories-->
102104
<!--user stories kanban view-->
103-
<!--
104105
<record id="view_scrum_us_kanban" model="ir.ui.view">
105106
<field name="name">project.scrum.us.kanban</field>
106107
<field name="model">project.scrum.us</field>
107108
<field name="type">kanban</field>
108109
<field name="arch" type="xml">
109-
<kanban>
110+
<kanban default_group_by="sprint_id">
111+
<field name="color"/>
112+
<field name="name"/>
113+
<field name="task_ids"/>
114+
<field name="sprint_id"/>
115+
<field name="project_id"/>
110116
<templates>
111117
<t t-name="kanban-box">
112-
<li><p>Actor: <field name="actor_ids"/></p></li>
113-
<li><p>User Story: <field name="name"/></p></li>
114-
<li><p>Task: <field name="task_ids"/></p></li>
115-
<li><p>Sprint: <field name="sprint_id"/></p></li>
116-
<li><p>Project: <field name="project_id"/></p></li>
118+
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
119+
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
120+
<span class="oe_e">í</span>
121+
<ul class="oe_dropdown_menu">
122+
<li>
123+
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
124+
<t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
125+
</li>
126+
</ul>
127+
</div>
128+
129+
<div class="oe_kanban_content">
130+
<div><b><field name="name"/></b></div>
131+
</div>
132+
<div class="oe_clear"></div>
133+
</div>
117134
</t>
118135
</templates>
119136
</kanban>
120137
</field>
121138
</record>
122-
-->
123-
124-
<!--user stories tree view-->
125-
<record id="view_scrum_us_tree" model="ir.ui.view">
126-
<field name="name">project.scrum.us.tree</field>
127-
<field name="model">project.scrum.us</field>
128-
<field name="type">tree</field>
129-
<field name="arch" type="xml">
130-
<tree string="User Stories">
131-
<field name="actor_ids"/>
132-
<field name="name"/>
133-
<field name="sprint_id"/>
134-
<field name="project_id"/>
135-
</tree>
136-
</field>
137-
</record>
138139

139140
<!--user stories form view-->
140141
<record id="view_scrum_us_form" model="ir.ui.view">
@@ -147,18 +148,18 @@
147148
<field name="project_id"/>
148149
<field name="sprint_id"/>
149150
</group>
150-
<group>
151+
<group col="4">
152+
<field name="name"/>
151153
<field name="actor_ids" widget="many2many_tags"/>
152154
</group>
153155
<group>
154-
<field name="name"/>
156+
155157
<field name="description"/>
156158
</group>
157159
<notebook colspan="5">
158160
<page string="Tasks">
159-
<field colspan="2" col="1" name="task_ids" nolabel="1" widget="one2many_list">
160-
<tree string="Sprint Backlog" colors="green:priority in ('0');
161-
orange:priority in ('1'); red:priority in('2')">
161+
<field name="task_ids" nolabel="1" widget="one2many_list">
162+
<tree string="Tasks">
162163
<field name="sequence" widget="handle"/>
163164
<field name="priority"/>
164165
<field name="name"/>
@@ -172,6 +173,21 @@
172173
</form>
173174
</field>
174175
</record>
176+
177+
<!--user stories tree view-->
178+
<record id="view_scrum_us_tree" model="ir.ui.view">
179+
<field name="name">project.scrum.us.tree</field>
180+
<field name="model">project.scrum.us</field>
181+
<field name="type">tree</field>
182+
<field name="arch" type="xml" >
183+
<tree>
184+
<field name="actor_ids"/>
185+
<field name="name"/>
186+
<field name="sprint_id"/>
187+
<field name="project_id"/>
188+
</tree>
189+
</field>
190+
</record>
175191

176192
<!--Scrum Meeting-->
177193
<!--daily meeting tree view-->
@@ -199,6 +215,7 @@
199215
<field name="date_meeting"/>
200216
<field name="user_id_meeting"/>
201217
<field name="sprint_id"/>
218+
<field name="project_id"/>
202219
<button name="send_email" string="Send Email" type="object"
203220
icon="terp-mail-message-new" />
204221
</group>
@@ -340,8 +357,8 @@
340357
<field name="name">User Stories</field>
341358
<field name="res_model">project.scrum.us</field>
342359
<field name="view_type">form</field>
343-
<field name="view_mode">tree,form</field>
344-
<field name="view_id" ref="view_scrum_us_tree"/>
360+
<field name="view_mode">kanban,tree,form</field>
361+
<field name="view_id" ref="view_scrum_us_kanban"/>
345362
<field name="context">{"search_default_current": 1}</field>
346363
<field name="search_view_id" ref="view_scrum_us_search"/>
347364
<field name="help">The user stories of scrum.</field>
@@ -359,16 +376,16 @@
359376
</field>
360377
</field>
361378
</record>
362-
363-
<!--menu for accessing to sprint-->
379+
380+
<!--menu for accessing to userstories-->
364381
<menuitem
365382
sequence="20"
366-
action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="menu_scrum"/>
367-
368-
<!--menu for accessing to userstories-->
383+
action="action_us_all_tree" id="menu_action_us_all_tree" parent="menu_scrum"/>
384+
385+
<!--menu for accessing to sprint-->
369386
<menuitem
370387
sequence="21"
371-
action="action_us_all_tree" id="menu_action_us_all_tree" parent="menu_scrum"/>
388+
action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="menu_scrum"/>
372389

373390
<!--menu for accessing to meeting-->
374391
<menuitem
31.3 KB
Loading
16.5 KB
Loading
Lines changed: 64 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,69 @@
1-
<section class="oe_container">
2-
<div class="oe_row oe_spaced">
3-
<h2 class="oe_slogan">Scrum</h2>
4-
<h3 class="oe_slogan">Planning Work With Scrum</h3>
5-
<div class="oe_span6">
6-
<div class="oe_demo oe_picture oe_screenshot">
7-
</div>
1+
<t name="Homepage" priority="29" t-name="website.homepage">
2+
<t t-call="website.layout">
3+
<div id="wrap" class="oe_structure oe_empty">
4+
<div class="carousel slide mb64 mt0" id="myCarousel0">
5+
<ol class="carousel-indicators">
6+
<li class="active" data-slide-to="0" data-target="#myCarousel0"/>
7+
<li data-slide-to="1" data-target="#myCarousel0"/>
8+
<li data-slide-to="2" data-target="#myCarousel0"/>
9+
</ol>
10+
<div class="carousel-inner">
11+
<div class="item oe_img_bg active" style="background-image: url(&quot;http://localhost:8069/website/static/src/img/banner/color_splash.jpg&quot;);">
12+
<div class="container">
13+
<div class="row content">
14+
<h1 class="carousel-content col-sm-12 mb16 mt128 col-md-3 col-md-offset-1">Planning Work With Scrum</h1>
15+
<p/>
16+
<div class="carousel-img hidden-sm hidden-xs col-md-offset-1 col-md-6">
17+
<img alt="Banner Odoo Image" class="img-responsive" src="/project_scrum/static/description/Scrum.png" style="transition: none; -webkit-transition: none; -webkit-animation-play-state: paused; -webkit-transform: translateX(-10.6%) translateY(-12.7%) scaleX(0.92) scaleY(0.79); transform: translateX(-10.6%) translateY(-12.7%) scaleX(0.92) scaleY(0.79);"/>
18+
</div>
19+
</div>
20+
</div>
21+
</div>
22+
<div class="item oe_img_bg" style="background-image: url(http://localhost:8069/website/static/src/img/banner/mango.jpg);">
23+
<div class="container">
24+
<div class="row content">
25+
<h1 class="carousel-content col-sm-12 mb128 mt128 col-md-5 col-md-offset-1">Working in Teams</h1>
26+
<div class="carousel-img col-md-6 hidden-sm hidden-xs">
27+
<img alt="Banner Odoo Image" class="img-responsive" src="/project_scrum/static/description/TeamWork.png" style="transition: none; -webkit-transition: none; -webkit-animation-play-state: paused; -webkit-transform: translateX(-49.5%) translateY(-7.3%) scaleX(0.9) scaleY(0.73); transform: translateX(-49.5%) translateY(-7.3%) scaleX(0.9) scaleY(0.73);"/>
28+
</div>
29+
</div>
30+
</div>
31+
</div>
32+
<div class="item oe_img_bg" style="background-image: url(http://localhost:8069/website/static/src/img/banner/mango.jpg);">
33+
<div class="container">
34+
<div class="row content">
35+
<h1 class="carousel-content col-md-6 col-sm-12 mb128 mt128">Get a good overview at your work</h1>
36+
<div class="carousel-img col-md-6 hidden-sm hidden-xs">
37+
<img alt="Banner Odoo Image" class="img-responsive" src="/project_scrum/static/description/kanban.png" style="transition: none; -webkit-transition: none; -webkit-animation-play-state: paused; -webkit-transform: translateX(-3.2%) translateY(6.9%) scaleX(0.57) scaleY(0.84); transform: translateX(-3.2%) translateY(6.9%) scaleX(0.57) scaleY(0.84);"/>
38+
</div>
39+
</div>
40+
<p/>
41+
</div>
42+
</div>
843
</div>
9-
10-
<div class="oe_span6">
11-
<p class="oe_mt32">
12-
</p>
44+
<div class="carousel-control left" data-slide="prev" data-target="#myCarousel0" href="#myCarousel0" style="width: 10%">
45+
<i class="fa fa-chevron-left"/>
1346
</div>
47+
<div class="carousel-control right" data-slide="next" data-target="#myCarousel0" href="#myCarousel0" style="width: 10%">
48+
<i class="fa fa-chevron-right" style=""/>
1449
</div>
15-
16-
</section>
17-
18-
<section class="oe_container oe_dark">
19-
<div class="oe_row">
20-
21-
<div align="center">
22-
<br><br>
23-
<h2 align="center">Scrum is a tool that gives your team and employees the oportunity to plan their work in a more neat and structured way.</h2>
24-
<!-- <h3 class="oe_slogan"> the oportunity to plan their work in a more neat and structured way.</h3> -->
25-
<!-- <h4 class="oe_slogan">Easy Tool To Plan Your Work In Your Team</h2>
26-
<p align="center">
27-
Scrum is a tool that gives your team and employees the oportunity to plan their work in a more neat and structured way.
28-
</p> -->
29-
<br><br>
30-
</div>
31-
32-
<center>
33-
<img src="TeamWork.png">
34-
<br>
35-
</center>
36-
37-
</section>
38-
39-
<div class="oe_span1">
40-
<h3 ></h3>
41-
<p></p>
42-
</div>
43-
44-
<div class="oe_span4">
45-
<h3 >Roles</h3>
46-
<p >
47-
Each team member has his own role. In Scrum there are always three different roles; Product Owner, Scrum Master and the developers.
48-
</p>
49-
50-
</div>
51-
52-
<div class="oe_span2">
53-
<h3 ></h3>
54-
<p></p>
50+
</div>
51+
<section class="mb16 para_large">
52+
<div class="container">
53+
<div class="row mt16 mb16">
54+
<div class="text-center col-md-2"><span class="fa fa-suitcase fa-5x"/><h3 class="mt8 mb0">Planing</h3>
55+
Scrum is a tool that gives your team and empolyees the oportunity to plan their work in a more neat and structured way.</div>
56+
<div class="text-center col-md-2">
57+
<span class="fa fa-lock fa-5x" style=""/>
58+
<h3 class="mt8 mb0">Roles</h3>
59+
<p>Each team member has his own role. In Scrum there are always three different roles; Product Owner, Scrum Master and the developers.</p>
60+
<div class="text-muted"/>
5561
</div>
56-
57-
<div class="oe_span4">
58-
<h3 >Daily Meetings</h3>
59-
<p >
60-
Daily meeting for a maximum of 15 minutes duration where each member of the team will have to answer three questions about what he did/will do and what obstacles he faces.
61-
</p>
62-
<br>
63-
</div>
64-
65-
<section>
66-
<div class="oe_span12">
67-
<h3 class="oe_slogan">Sprints</h3>
68-
<p>
69-
In Scrum you will work by sprints, where every sprint should be completed under a specific period which can vary from weeks and up to months.
70-
</p>
71-
72-
<center>
73-
<img src="kanban.png" height="300" width="500">
74-
</center>
62+
<div class="text-center col-md-2"><span class="fa fa-heart fa-5x" style=""/><h3 class="mt8 mb0" style="text-align: left;">Daily Meetings.</h3>
63+
Daily Meeting for a maximum of 15 minutes duration where each member of the team will have to answer three question about what he did/will do and what obsticles he faces.</div>
64+
</div>
7565
</div>
76-
</section>
66+
</section>
67+
</div>
68+
</t>
69+
</t>

0 commit comments

Comments
 (0)