[MERGE] improvements in project management

bzr revid: fp@tinyerp.com-20120920084958-ocp01e63dqx0wg83
This commit is contained in:
Fabien Pinckaers 2012-09-20 10:49:58 +02:00
commit 736e37a5a4
7 changed files with 30 additions and 23 deletions

View File

@ -1293,7 +1293,7 @@ msgstr ""
#. module: project
#: view:project.task:0
msgid "Delegations History"
msgid "Delegation"
msgstr ""
#. module: project

View File

@ -49,8 +49,9 @@ class project_task_type(osv.osv):
}
_defaults = {
'sequence': 1,
'state': 'draft',
'state': 'open',
'fold': False,
'case_default': True,
}
_order = 'sequence'

View File

@ -130,7 +130,7 @@
</div>
</group>
<group>
<group string="Administration">
<group string="Administration" groups="project.group_time_work_estimation_tasks">
<field name="planned_hours" widget="float_time"/>
<field name="effective_hours" widget="float_time"/>
<field name="resource_calendar_id"/>
@ -143,7 +143,6 @@
<field name="currency_id" groups="base.group_multi_currency" required="1"/>
<field name="parent_id" domain="[('id','!=',analytic_account_id)]" context="{'current_model': 'project.project'}"/>
</group>
</group>
</page>
@ -294,16 +293,14 @@
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start a new project.
</p>
<p>
</p><p>
Projects are used to organize your activities; plan
tasks, track issues, invoice timesheets. You can define
internal projects (R&amp;D, Improve Sales Process),
private projects (My Todos) or customer ones.
</p>
<p>
You will be able collaborate with internal users on
projects or invite customers to share your activities.
</p><p>
You will be able collaborate with internal users on
projects or invite customers to share your activities.
</p>
</field>
</record>
@ -402,8 +399,6 @@
states="cancelled,done" context="{'button_reactivate':True}"/>
<button name="action_close" string="Done" type="object"
states="draft,open,pending"/>
<button name="%(action_project_task_delegate)d" string="Delegate" type="action"
states="pending,open,draft" groups="project.group_delegate_task"/>
<button name="do_cancel" string="Cancel" type="object"
states="draft,open,pending"/>
</span>
@ -450,7 +445,9 @@
</group>
<div class="oe_clear"/>
</page>
<page string="Delegations History" groups="project.group_delegate_task">
<page string="Delegation" groups="project.group_delegate_task">
<button name="%(action_project_task_delegate)d" string="Delegate" type="action"
states="pending,open,draft" groups="project.group_delegate_task"/>
<separator string="Parent Tasks"/>
<field name="parent_ids"/>
<separator string="Delegated tasks"/>
@ -517,7 +514,7 @@
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
<t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
<li>
<ul class="oe_kanban_project_times">
<ul class="oe_kanban_project_times" groups="project.group_time_work_estimation_tasks">
<li><a name="set_remaining_time_1" type="object" class="oe_kanban_button">1</a></li>
<li><a name="set_remaining_time_2" type="object" class="oe_kanban_button">2</a></li>
<li><a name="set_remaining_time_5" type="object" class="oe_kanban_button">5</a></li>
@ -534,7 +531,8 @@
<div>
<field name="project_id"/>
<t t-esc="kanban_text_ellipsis(record.description.value, 160)"/><br/>
<i><field name="date_deadline"/></i>
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>
</div>
<div class="oe_kanban_bottom_right">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="Ready to Pull" name="set_kanban_state_done" class="oe_kanban_status"> </a>
@ -795,7 +793,7 @@
<menuitem id="menu_tasks_config" name="GTD" parent="base.menu_definitions" sequence="1"/>
<menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1"/>
<menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1" groups="base.group_no_one"/>
<menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/>
<menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/>

View File

@ -30,7 +30,7 @@ class project_configuration(osv.osv_memory):
'module_project_mrp': fields.boolean('Generate tasks from sale orders',
help ="""This feature automatically creates project tasks from service products in sale orders.
More precisely, tasks are created for procurement lines with product of type 'Service',
procurement method 'Make to Order', and supply method 'Produce'.
procurement method 'Make to Order', and supply method 'Manufacture'.
This installs the module project_mrp."""),
'module_pad': fields.boolean("Use integrated collaborative note pads on task",
help="""Lets the company customize which Pad installation should be used to link to new pads
@ -52,7 +52,7 @@ class project_configuration(osv.osv_memory):
'module_project_issue_sheet': fields.boolean("Invoice working time on issues",
help="""Provides timesheet support for the issues/bugs management in project.
This installs the module project_issue_sheet."""),
'group_tasks_work_on_tasks': fields.boolean("Compute work activities on tasks",
'group_tasks_work_on_tasks': fields.boolean("Log work activities on tasks",
implied_group='project.group_tasks_work_on_tasks',
help="Allows you to compute work on tasks."),
'group_time_work_estimation_tasks': fields.boolean("Manage time estimation on tasks",
@ -72,4 +72,9 @@ class project_configuration(osv.osv_memory):
user = self.pool.get('res.users').browse(cr, uid, uid, context)
user.company_id.write({'project_time_mode_id': config.time_unit.id})
def onchange_time_estimation_project_timesheet(self, cr, uid, ids, group_time_work_estimation_tasks, module_project_timesheet):
if group_time_work_estimation_tasks or module_project_timesheet:
return {'value': {'group_tasks_work_on_tasks': True}}
return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -29,7 +29,7 @@
<label for="id" string="Task"/>
<div>
<div>
<field name="module_project_timesheet" class="oe_inline"/>
<field name="module_project_timesheet" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks, module_project_timesheet)" class="oe_inline"/>
<label for="module_project_timesheet"/>
</div>
<div>
@ -50,7 +50,7 @@
<label for="id" string="Planning"/>
<div>
<div>
<field name="group_time_work_estimation_tasks" class="oe_inline"/>
<field name="group_time_work_estimation_tasks" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks, module_project_timesheet)" class="oe_inline"/>
<label for="group_time_work_estimation_tasks"/>
</div>
<div>

View File

@ -100,8 +100,6 @@
states="open"/>
<button name="case_close" string="Done" type="object"
states="draft,pending"/>
<button name="case_escalate" string="Escalate" type="object"
states="draft,open,pending"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open,pending"/>
</span>
@ -118,7 +116,11 @@
</group>
<group>
<field name="priority"/>
<field name="project_id" required="True" on_change="on_change_project(project_id)" context="{'default_use_issues':1}"/>
<label for="project_id"/>
<div>
<field name="project_id" required="True" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
<button name="case_escalate" string="Escalate" type="object" states="draft,open,pending" class="oe_inline"/>
</div>
<label for="task_id"/>
<div>
<field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>

View File

@ -73,6 +73,7 @@ class procurement_order(osv.osv):
'date_deadline': procurement.date_planned,
'planned_hours': planned_hours,
'remaining_hours': planned_hours,
'partner_id': procurement.sale_line_id and procurement.sale_line_id.order_id.partner_id.id or False,
'user_id': procurement.product_id.product_manager.id,
'notes': procurement.note,
'procurement_id': procurement.id,