<?xml version="1.0" ?>
<terp>
<data>

#
# Usual views
#

	<!-- Scrum Project -->

	<record model="ir.ui.view" id="view_scrum_project_form">
		<field name="name">scrum.project.form</field>
		<field name="model">scrum.project</field>
		<field name="type">form</field>
		<field name="inherit_id" ref="project.edit_project" />
		<field name="arch" type="xml">
			<field name="warn_manager" position="after">
				<newline/>
				<field name="product_owner_id" select="1" required="1"/>
				<field name="sprint_size"/>
			</field>
		</field>
	</record>

	<record model="ir.ui.view" id="view_scrum_project_tree">
		<field name="name">scrum.project.tree</field>
		<field name="model">scrum.project</field>
		<field name="type">tree</field>
		<field name="field_parent">child_id</field>
		<field name="arch" type="xml">
			<tree string="Scrum Projects">
				<field name="name" />
				<field name="manager" />
				<field name="product_owner_id" />
				<field name="planned_hours" />
				<field name="effective_hours" />
			</tree>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_scrum_project_tree">
		<field name="name">scrum.project.form</field>
		<field name="res_model">scrum.project</field>
		<field name="view_type">tree</field>
		<field name="view_id" ref="view_scrum_project_tree" />
		<field name="domain">[('parent_id','=',False),('scrum','=',1)]</field>
	</record>
	<menuitem name="Project/Scrum/Projects" id="menu_action_scrum_project_tree" action="action_scrum_project_tree"/>

	<record model="ir.actions.act_window" id="action_scrum_project_form">
		<field name="name">scrum.project.form</field>
		<field name="res_model">scrum.project</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_scrum_project_form" />
		<field name="domain">[('scrum','=',1)]</field>
	</record>
	<menuitem name="Project/Scrum/Projects/Edit Projects" id="menu_action_scrum_project_form" action="action_scrum_project_form"/>


	#
	# Product Backlog
	#

	<record model="ir.ui.view" id="view_scrum_product_backlog_tree">
		<field name="name">scrum.product.backlog.tree</field>
		<field name="model">scrum.product.backlog</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Scrum Product Backlog">
				<field name="priority"/>
				<field name="sequence"/>
				<field name="name"/>
				<field name="sprint_id"/>
				<field name="progress"/>
				<field name="effective_hours"/>
				<field name="planned_hours"/>
				<field name="state"/>
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="view_scrum_product_backlog_form">
		<field name="name">scrum.product.backlog.form</field>
		<field name="model">scrum.product.backlog</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Scrum Product Backlog">
				<notebook>
				<page string="Product Backlog">
					<field name="name" select="1" colspan="3"/>
					<field name="priority"/>
					<field name="sequence"/>
					<field name="project_id" select="1" />
					<field name="sprint_id" select="1" />
					<field name="user_id" select="1" />
					<field name="active" select="1" />
					<field name="note" colspan="3"/>
					<field name="state" select="1"/>
					<field name="progress"/>
					<field name="effective_hours"/>
					<field name="planned_hours"/>
				</page><page string="Tasks">
					<field name="tasks_id" nolabel="1" colspan="4" widget="one2many_list"/>
				</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_product_backlog_form">
		<field name="name">scrum.product.backlog.form</field>
		<field name="res_model">scrum.product.backlog</field>
		<field name="view_type">form</field>
	</record>
	<menuitem name="Project/Scrum/Product Backlog" id="menu_action_product_backlog_form" action="action_product_backlog_form"/>

#
# Scrum Sprint
#
	<record model="ir.ui.view" id="view_scrum_sprint_tree">
		<field name="name">scrum.sprint.tree</field>
		<field name="model">scrum.sprint</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Scrum Sprint">
				<field name="name"/>
				<field name="project_id"/>
				<field name="date_start"/>
				<field name="date_stop"/>
				<field name="progress"/>
				<field name="effective_hours"/>
				<field name="planned_hours"/>
				<field name="state"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_scrum_sprint_form">
		<field name="name">scrum.sprint.form</field>
		<field name="model">scrum.sprint</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Scrum Sprint">
				<notebook>
				<page string="Sprint Info">
					<field name="name" select="1" colspan="3"/>
					<newline/>
					<field name="project_id" on_change="onchange_project_id(project_id)"/>
					<newline/>
					<field name="date_start" select="1" />
					<field name="date_stop"/>
					<field name="product_owner_id"/>
					<field name="scrum_master_id"/>
					<field name="progress"/>
					<field name="effective_hours"/>
					<field name="planned_hours"/>
					<newline/>
					<separator colspan="4" string="State"/>
					<field name="state"/>
				</page><page string="Daily Meetings">
					<field name="meetings_id" nolabel="1" colspan="4" widget="one2many_list"/>
				</page><page string="Review">
					<field name="review" nolabel="1" colspan="4"/>
				</page><page string="Retrospective">
					<field name="retrospective" nolabel="1" colspan="4"/>
				</page>
				</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_sprint_form">
		<field name="name">scrum.sprint.form</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_scrum_sprint_form" />
	</record>
	<menuitem name="Project/Scrum/Sprint" id="menu_action_sprint_form" action="action_sprint_form"/>

	<record model="ir.actions.act_window" id="action_sprint_open_tree">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('state','=','open')]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/Open Sprints" id="menu_action_sprint_open_tree" action="action_sprint_open_tree"/>
	<record model="ir.actions.act_window" id="action_sprint_open_tree2">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('state','=','draft')]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/Draft Sprints" id="menu_action_sprint_open_tree2" action="action_sprint_open_tree2"/>
	<record model="ir.actions.act_window" id="action_sprint_open_tree3">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('state','=','done')]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/Sprints Done" id="menu_action_sprint_open_tree3" action="action_sprint_open_tree3"/>

	<record model="ir.actions.act_window" id="action_sprint_open_tree4">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('product_owner_id','=',uid)]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/My Sprints (Product Owner)" id="menu_action_sprint_open_tree4" action="action_sprint_open_tree4"/>
	<record model="ir.actions.act_window" id="action_sprint_open_tree5">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('scrum_master_id','=',uid)]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/My Sprints (Scrum Master)" id="menu_action_sprint_open_tree5" action="action_sprint_open_tree5"/>

	<record model="ir.actions.act_window" id="action_sprint_open_tree6">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('product_owner_id','=',uid),('state','=','open')]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/My Sprints (Product Owner)/My open sprints" id="menu_action_sprint_open_tree6" action="action_sprint_open_tree6"/>
	<record model="ir.actions.act_window" id="action_sprint_open_tree7">
		<field name="name">scrum.sprint.open.tree</field>
		<field name="res_model">scrum.sprint</field>
		<field name="view_type">tree</field>
		<field name="domain">[('scrum_master_id','=',uid),('state','=','open')]</field>
	</record>
	<menuitem name="Project/Scrum/Sprint/My Sprints (Scrum Master)/My open sprints" id="menu_action_sprint_open_tree7" action="action_sprint_open_tree7"/>


#
# Daily Meeting
#

	<record model="ir.ui.view" id="view_scrum_meeting_tree">
		<field name="name">scrum.meeting.tree</field>
		<field name="model">scrum.meeting</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Scrum Sprint">
				<field name="date"/>
				<field name="name"/>
				<field name="sprint_id"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_scrum_meeting_form">
		<field name="name">scrum.meeting.form</field>
		<field name="model">scrum.meeting</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Scrum Sprint">
			<notebook>
				<page string="Scrum Meeting">
					<field name="name" select="1"/>
					<field name="sprint_id"/>
					<separator string="What have you accomplished since yesterday ?" colspan="4"/>
					<field name="question_yesterday" nolabel="1" colspan="4"/>
					<separator string="What are you working on today ?" colspan="4"/>
					<field name="question_today" nolabel="1" colspan="4"/>
					<separator string="Is there anything blocking you ?" colspan="4"/>
					<field name="question_blocks" nolabel="1" colspan="4"/>
				</page><page string="Optionnal Info">
					<field name="date"/>
					<newline/>
					<separator string="Are your Sprint Backlog estimate accurate ?" colspan="4"/>
					<field name="question_backlog" nolabel="1" colspan="4"/>
				</page>
			</notebook>
			</form>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_meeting_form">
		<field name="name">scrum.meeting.form</field>
		<field name="res_model">scrum.meeting</field>
		<field name="view_type">form</field>
		<field name="view_id" ref="view_scrum_meeting_form" />
	</record>
	<menuitem name="Project/Scrum/Daily Meeting" id="menu_action_meeting_form" action="action_meeting_form"/>

	#
	# Clicks on a sprint: what a hack !
	#

	<record model="ir.actions.act_window" id="action_sprint_task_open">
		<field name="res_model">scrum.task</field>
		<field name="name">View sprint Tasks</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('product_backlog_id', '=', 'S('+str(active_id)+')')]</field>
	</record>
	<record model="ir.values" id="ir_scrum_sprint_open_task">
		<field name="key2" eval=" 'tree_but_open'" />
		<field name="model" eval="'scrum.sprint'" />
		<field name="name">View sprint tasks</field>
		<field name="value" eval="'ir.actions.act_window,'+str(action_sprint_task_open)" />
		<field name="object" eval="True" />
	</record>

	<record model="ir.actions.act_window" id="action_sprint_backlog_open">
		<field name="res_model">scrum.product.backlog</field>
		<field name="name">View sprint backlog</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('sprint_id', '=', active_id)]</field>
	</record>
	<record model="ir.values" id="ir_scrum_sprint_open_sprint">
		<field name="key2" eval=" 'tree_but_open'" />
		<field name="model" eval="'scrum.sprint'" />
		<field name="name">View sprint backlog</field>
		<field name="value" eval="'ir.actions.act_window,'+str(action_sprint_backlog_open)" />
		<field name="object" eval="True" />
	</record>

	#
	# Clicks on a project
	#

	<record model="ir.actions.act_window" id="dblc_proj">
		<field name="res_model">scrum.product.backlog</field>
		<field name="name">View project's backlog</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('project_id', '=', active_id)]</field>
	</record>
	<record model="ir.values" id="ir_scrum_project_backlog">
		<field name="key2" eval=" 'tree_but_open'" />
		<field name="model" eval="'scrum.project'" />
		<field name="name">View project's backlog</field>
		<field name="value" eval="'ir.actions.act_window,'+str(dblc_proj)" />
		<field name="object" eval="True" />
	</record>
	<record model="ir.actions.act_window" id="dblc_proj2">
		<field name="res_model">scrum.task</field>
		<field name="name">View project's tasks</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('project_id', '=', active_id)]</field>
	</record>
	<record model="ir.values" id="ir_scrum_project_task">
		<field name="key2" eval=" 'tree_but_open'" />
		<field name="model" eval="'scrum.project'" />
		<field name="name">View project's tasks</field>
		<field name="value" eval="'ir.actions.act_window,'+str(dblc_proj2)" />
		<field name="object" eval="True" />
	</record>



	#
	# Tasks
	#
	<record model="ir.ui.view" id="view_task_tree">
		<field name="name">scrum.task.tree</field>
		<field name="model">scrum.task</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Scrum Tasks">
				<field name="sequence"/>
				<field name="name"/>
				<field name="user_id"/>
				<field name="priority"/>
				<field name="date_deadline"/>
				<field name="progress"/>
				<field name="planned_hours"/>
				<field name="effective_hours"/>
				<field name="state" />
			</tree>
		</field>
	</record>

	<record model="ir.ui.view" id="view_task_form2">
		<field name="name">scrum.task.form</field>
		<field name="model">scrum.task</field>
		<field name="type">form</field>
		<field name="inherit_id" ref="project.view_task_form2"/>
		<field name="arch" type="xml">
			<field name="type" position="after">
				<field name="product_backlog_id" select="1" domain="[('project_id','=',project_id)]"/>
			</field>
		</field>
	</record>
	<record model="ir.actions.act_window" id="action_view_task">
		<field name="name">scrum.task</field>
		<field name="res_model">scrum.task</field>
		<field name="view_type">form</field>
		<field name="domain">[('scrum','=',1)]</field>
	</record>
	<menuitem name="Project/Scrum/All Tasks" id="menu_action_view_task" action="action_view_task" />

	<record model="ir.actions.act_window" id="action_view_task4">
		<field name="name">scrum.task</field>
		<field name="res_model">scrum.task</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('user_id', '=', uid),('scrum','=',1)]</field>
	</record>
	<menuitem name="Project/Scrum/All Tasks/Your tasks" id="menu_action_view_task4" action="action_view_task4" />
	
	<record model="ir.actions.act_window" id="action_view_task5">
		<field name="name">scrum.task</field>
		<field name="res_model">scrum.task</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('user_id','=',uid),('state','=','open'),('scrum','=',1)]</field>
	</record>
	<menuitem name="Project/Scrum/All Tasks/Your tasks/Your open tasks" action="action_view_task5" id="menu_tasks_yours" />

	<record model="ir.actions.act_window" id="action_view_task6">
		<field name="name">project.task</field>
		<field name="res_model">project.task</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,form</field>
		<field name="domain">[('state','=','open'),('scrum','=',1)]</field>
	</record>
	<menuitem name="Project/All Tasks/Open tasks" id="menu_action_view_task6" action="action_view_task6" />
</data>
</terp>
