odoo/addons/project_long_term/project_long_term_view.xml

312 lines
16 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="base.menu_project_long_term" name="Long Term Planning" parent="base.menu_main_pm" sequence="1"/>
# ------------------------------------------------------
# Project Resource Allocation
# ------------------------------------------------------
<record id="view_project_resource_allocation_form" model="ir.ui.view">
<field name="name">project.resource.allocation.form</field>
<field name="model">project.resource.allocation</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Resource Allocation">
<field name="resource_id" select="1"/>
<field name="phase_id"/>
<field name="useability"/>
</form>
</field>
</record>
<record id="view_project_resource_allocation_list" model="ir.ui.view">
<field name="name">project.resource.allocation.list</field>
<field name="model">project.resource.allocation</field>
<field name="type">tree</field>
<field name="priority" eval="5"/>
<field name="arch" type="xml">
<tree editable="bottom" string="Project Resource Allocation">
<field name="resource_id"/>
<field name="phase_id"/>
<field name="useability"/>
</tree>
</field>
</record>
<record id="view_project_resource_allocation_search" model="ir.ui.view">
<field name="name">project.resource.allocation.search</field>
<field name="model">project.resource.allocation</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Resource Allocations">
<group colspan="4" col="20">
<field name="resource_id"/>
<field name="phase_id"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
<filter name="resource" string="Resource" icon="terp-folder-blue" domain="[]" context="{'group_by':'resource_id'}"/>
<filter string="Phase" icon="terp-project" domain="[]" context="{'group_by':'phase_id'}"/>
</group>
</search>
</field>
</record>
<record id="act_resouce_allocation" model="ir.actions.act_window">
<field name="name">Resource Allocations</field>
<field name="res_model">project.resource.allocation</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_resource': 1} </field>
<!--<field name="search_view_id" ref="view_project_phase_search"/>-->
</record>
# ------------------------------------------------------
# Project Phase
# ------------------------------------------------------
<record id="view_project_phase_form" model="ir.ui.view">
<field name="name">project.phase.form</field>
<field name="model">project.phase</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Phase">
<group colspan="6" col="6">
<field name="name" select="1"/>
<field name="project_id" on_change="onchange_project(project_id)"/>
<field name="responsible_id"/>
</group>
<group colspan="6" col="6">
<field name="duration" />
<field name="product_uom" nolabel="1" domain="[('category_id.name', '=', 'Working Time')]"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<notebook colspan="4">
<page string="Resource Allocation">
<field colspan="4" name="resource_ids" nolabel="1">
<tree editable="bottom" string="Project Resource Allocation">
<field name="resource_id" context="{'project_id':parent.project_id}"/>
<field name="useability"/>
</tree>
<form string="Project Resource Allocation">
<field name="resource_id" context="{'project_id':parent.project_id}"/>
<field name="useability"/>
</form>
</field>
<separator string="" colspan="4"/>
<group col="12" colspan="4">
<field name="state" select="1"/>
<button string="Draft" name="set_draft" states="open" icon="gtk-indent"/>
<button string="Start Phase" name="set_open" states="pending,draft" icon="gtk-execute"/>
<button string="Done" name="set_done" states="draft,pending,open" icon="gtk-apply"/>
<button string="Pending" name="set_pending" states="open" icon="gtk-media-pause"/>
<button string="Cancel" name="set_cancel" states="draft,open,pending" icon="gtk-cancel"/>
</group>
</page>
<page string="Other Info">
<group colspan="2" col="2">
<separator string="Constraints" colspan="2"/>
<field name="constraint_date_start"/>
<field name="constraint_date_end"/>
</group>
<group colspan="2" col="2">
<separator string="Scheduling" colspan="2"/>
<field name="sequence"/>
</group>
<separator colspan="4" string="Previous Phases"/>
<field colspan="4" name="previous_phase_ids" nolabel="1"/>
<separator colspan="4" string="Next Phases"/>
<field colspan="4" name="next_phase_ids" nolabel="1"/>
</page>
<page string="Task Detail">
<separator colspan="4" string="Project's Tasks"/>
<field colspan="4" name="task_ids" context="{'default_project_id' :project_id}" nolabel="1">
<tree editable="bottom" string="Project's Tasks">
<field name="name"/>
<field name="user_id"/>
<field name="planned_hours" widget="float_time"/>
</tree>
<form string="Project's Tasks">
<notebook colspan="4">
<page string="Task Detail">
<group colspan="4" col="4">
<field name="name"/>
<field name="project_id"/>
<field name="user_id"/>
</group>
<group colspan="2" col="2">
<separator string="Dates" colspan="2"/>
<field name="date_start"/>
<field name="date_deadline"/>
</group>
<group colspan="2" col="2">
<separator string="Planning" colspan="2"/>
<field name="planned_hours" widget="float_time"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours"/>
<field name="effective_hours" invisible="1"/>
</group>
<group colspan="6" col="4">
<field name="state"/>
</group>
</page>
</notebook>
</form>
</field>
<button name="%(action_project_schedule_tasks)d" string="Schedule Tasks" type="action" icon="gtk-jump-to"/>
</page>
</notebook>
<newline/>
</form>
</field>
</record>
<record id="view_project_phase_list" model="ir.ui.view">
<field name="name">project.phase.list</field>
<field name="model">project.phase</field>
<field name="type">tree</field>
<field name="priority" eval="5"/>
<field name="arch" type="xml">
<tree string="Project Phases">
<field name="name"/>
<field name="project_id" on_change="onchange_project(project_id)"/>
<field name="responsible_id"/>
<field name="date_start"/>
<!--<field name="date_end"/>
<field name="duration"/>
<field name="product_uom"/>-->
<field name="state"/>
</tree>
</field>
</record>
<record id="view_project_phase_calendar" model="ir.ui.view">
<field name="name">project.phase.calendar</field>
<field name="model">project.phase</field>
<field name="type">calendar</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar color="responsible_id" date_start="date_start" date_stop="date_end" day_length="12" string="Phases">
<field name="name"/>
<field name="project_id"/>
</calendar>
</field>
</record>
<record id="view_project_phase_gantt" model="ir.ui.view">
<field name="name">project.phase.gantt</field>
<field name="model">project.phase</field>
<field name="type">gantt</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<gantt color="responsible_id" date_stop="date_end" date_start="date_start" string="Phases">
<level object="project.project" link="project_id" domain="[]">
<field name="name"/>
</level>
</gantt>
</field>
</record>
<record id="view_project_phase_search" model="ir.ui.view">
<field name="name">project.phase.search</field>
<field name="model">project.phase</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Project Phases">
<group colspan="4" col="20">
<filter string="Draft" domain="[('state','=','draft')]" help="Draft Phases" icon="terp-check" default="1"/>
<filter string="In Progress" name="Progress" domain="[('state','=','open')]" help="Open Phases" icon="terp-camera_test"/>
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Phases" icon="terp-gtk-media-pause"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="project_id">
<filter domain="[('project_id.user_id','=',uid)]" help="My Projects" icon="terp-folder-blue"/>
</field>
<field name="responsible_id"/>
<field name="date_start"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20" groups="base.group_extended">
<filter string="Project" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'responsible_id'}"/>
<filter string="Start Date" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'date_start'}"/>
</group>
</search>
</field>
</record>
<record id="act_project_phase" model="ir.actions.act_window">
<field name="name">Project Phases</field>
<field name="res_model">project.phase</field>
<field name="view_type">form</field>
<field name="view_mode">gantt,tree,form,calendar</field>
<field name="context">{'search_default_responsible_id':uid}</field>
<field name="search_view_id" ref="view_project_phase_search"/>
</record>
# ------------------------------------------------------
# Project
# ------------------------------------------------------
<record id="view_phase_project_form1" model="ir.ui.view">
<field name="name">phase.project.form1</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<field name="priority" position="before">
<field name="resource_calendar_id"/>
</field>
</field>
</record>
# ------------------------------------------------------
# Project Task
# ------------------------------------------------------
<act_window
id="project_phase_task_list"
name="Related Tasks"
res_model="project.task"
src_model="project.phase"
view_mode="tree,form"
domain="[('phase_id','=',active_id)]"/>
<act_window
domain="[('project_id', '=', active_id)]"
id="act_project_phases"
name="Phases"
res_model="project.phase"
src_model="project.project"
view_mode="tree,form"
view_type="form" />
# ------------------------------------------------------
# Menu Items
# ------------------------------------------------------
<menuitem action="act_project_phase"
groups="base.group_extended"
id="menu_project_phase" parent="base.menu_project_long_term" sequence="1"/>
<menuitem id="menu_resouce_allocation" action="act_resouce_allocation"
name="Resource Allocations" parent="base.menu_project_long_term" sequence="2"/>
<!--<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>-->
<menuitem id="menu_pm_resources_project1"
groups="base.group_extended"
name="Resources" parent="project.menu_definitions" sequence="3"/>
<menuitem id="menu_phase_schedule" name="Scheduling" parent="base.menu_project_long_term" sequence="4"/>
<menuitem action="resource.action_resource_resource_tree" id="menu_view_resource" parent="project.menu_project_management" sequence="4"/>
<menuitem action="resource.action_resource_calendar_form" id="menu_view_resource_calendar" parent="menu_pm_resources_project1" sequence="1"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves" parent="menu_pm_resources_project1" sequence="1"/>
</data>
</openerp>