[IMP]: Usability Improvements
bzr revid: rvo@tinyerp.co.in-20100918055211-3kuyw3k8nagxvb7t
This commit is contained in:
parent
4186820ee1
commit
050344d175
|
@ -389,6 +389,8 @@ class task(osv.osv):
|
|||
if not default.get('remaining_hours', False):
|
||||
default['remaining_hours'] = float(self.read(cr, uid, id, ['planned_hours'])['planned_hours'])
|
||||
default['active'] = True
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)')
|
||||
return super(task, self).copy_data(cr, uid, id, default, context)
|
||||
|
||||
def _check_dates(self, cr, uid, ids, context=None):
|
||||
|
@ -397,7 +399,7 @@ class task(osv.osv):
|
|||
if task['date_start'] > task['date_end']:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _is_template(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = {}
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
|
@ -453,15 +455,15 @@ class task(osv.osv):
|
|||
}
|
||||
|
||||
_order = "sequence, priority, date_start, id"
|
||||
|
||||
|
||||
def _check_recursion(self, cr, uid, ids):
|
||||
obj_task = self.browse(cr, uid, ids[0])
|
||||
parent_ids = [x.id for x in obj_task.parent_ids]
|
||||
children_ids = [x.id for x in obj_task.child_ids]
|
||||
|
||||
|
||||
if (obj_task.id in children_ids) or (obj_task.id in parent_ids):
|
||||
return False
|
||||
|
||||
|
||||
while(ids):
|
||||
cr.execute('SELECT DISTINCT task_id '\
|
||||
'FROM project_task_parent_rel '\
|
||||
|
@ -535,7 +537,7 @@ class task(osv.osv):
|
|||
'ref_doc1': 'project.task,%d'% (task.id,),
|
||||
'ref_doc2': 'project.project,%d'% (project.id,),
|
||||
})
|
||||
|
||||
|
||||
for parent_id in task.parent_ids:
|
||||
if parent_id.state in ('pending','draft'):
|
||||
reopen = True
|
||||
|
|
|
@ -214,6 +214,13 @@ class project_phase(osv.osv):
|
|||
self._check_date_end(cr, uid, next_phase, dt_end, context=context)
|
||||
return super(project_phase, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)')
|
||||
return super(project_phase, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def set_draft(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'draft'})
|
||||
return True
|
||||
|
|
|
@ -242,13 +242,13 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20" groups="base.group_extended">
|
||||
<filter string="Project" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'responsible_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Project" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}" name="project"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
|
||||
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Start Month"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -259,7 +259,7 @@
|
|||
<field name="res_model">project.phase</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,gantt,calendar</field>
|
||||
<field name="context">{'search_default_responsible_id':uid}</field>
|
||||
<field name="context">{'search_default_responsible_id':uid, 'search_default_project':1}</field>
|
||||
<field name="search_view_id" ref="view_project_phase_search"/>
|
||||
<field name="help">You can subdivide your larger projects into several phases. For each phase, you can define your resources allocation (humans or engine), describe de differend task and link your phase with previous and next one, add constraints date and scheduling. A gantt view of your project phase is also available from this menu. Gantt view is a graphically draw of the project plan; it includes any task dependencies by visually adjusting task durations and priorities, and by linking tasks to each other.</field>
|
||||
</record>
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
<form string="Messages">
|
||||
<group attrs="{'readonly':[('from_id', '!=', uid)]}">
|
||||
<field name="project_id" select="1" domain="[('user_id','=',uid)]"/>
|
||||
<newline/>
|
||||
<field name="from_id" select="1"/>
|
||||
<field name="to_id" select="1"/>
|
||||
<newline/>
|
||||
|
@ -72,13 +71,14 @@
|
|||
<field name="project_id"/>
|
||||
<field name="from_id"/>
|
||||
<field name="to_id"/>
|
||||
<field name="message"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Project" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Message To" icon="terp-personal" domain="[]" context="{'group_by':'to_id'}"/>
|
||||
<filter string="Message From" icon="terp-personal" domain="[]" context="{'group_by':'from_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Project" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -40,13 +40,14 @@
|
|||
<field name="sprint_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="expected_hours" sum="Planned hours" widget="float_time"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
<field name="expected_hours" sum="Planned hours" widget="float_time" string="Total Planned Hours"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time" string="Total Spent Hours"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera_test"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="terp-stock_effects-object-colorize"/>
|
||||
<button type="action" string="Merge Backlogs" name="%(action_scrum_backlog_merge)d" states="pending" icon="terp-stock_effects-object-colorize"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="terp-dialog-close"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -102,22 +103,22 @@
|
|||
help="Change Type"/>
|
||||
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
|
||||
<field name="state" invisible="context.get('set_visible',False)"/>
|
||||
<button name="do_open" states="pending,draft,done,cancel" string="Start Task" type="object" icon="gtk-execute" help="For changing to open state" invisible="context.get('set_visible',False)"/>
|
||||
<button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-execute" help="For changing to delegate state"/>
|
||||
<button name="do_open" states="pending,draft,done,cancel" string="Start Task" type="object" icon="terp-camera_test" help="For changing to open state" invisible="context.get('set_visible',False)"/>
|
||||
<button groups="base.group_extended" name="%(project.action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action" icon="gtk-sort-descending" help="For changing to delegate state"/>
|
||||
<button name="do_close" states="draft,pending,open" string="Done" type="object" icon="gtk-jump-to" help="For changing to done state"/>
|
||||
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
|
||||
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-stop" help="For cancelling the task"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" readonly="1"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="terp-camera-test"/>
|
||||
<button type="action" string="Convert to Task" name="%(action_scrum_backlog_to_task)d" states="pending" icon="gtk-execute"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="open,pending" icon="gtk-cancel"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="open,pending" icon="gtk-stop"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -135,10 +136,12 @@
|
|||
string="Current"
|
||||
name="current"
|
||||
domain="['|','&',('sprint_id.date_start','<=',time.strftime('%%Y-%%m-%%d')), ('sprint_id.date_stop','>=',time.strftime('%%Y-%%m-%%d')), ('state','in',['draft','open','pending'])]"
|
||||
help="Current Backlogs"/>
|
||||
help="Draft, Open and Pending Backlogs"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Backlogs"/>
|
||||
<filter icon="terp-camera_test" string="Open" domain="[('state','=','open')]" help="Open Backlogs"/>
|
||||
<filter icon="terp-document-new" string="Pending" domain="[('state','=','pending')]" help="Pending Backlogs"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Editable" icon="terp-folder-blue" domain="[]" context="{'set_editable':'1'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
|
@ -161,16 +164,12 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="4" col="20" groups="base.group_extended">
|
||||
<filter string="Editable" icon="terp-folder-blue" domain="[]" context="{'set_editable':'1'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20" groups="base.group_extended">
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Project" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<filter string="Sprint" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'sprint_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
|
@ -181,7 +180,7 @@
|
|||
<field name="name">Product Backlogs</field>
|
||||
<field name="res_model">project.scrum.product.backlog</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{'search_default_current': 1}</field>
|
||||
<field name="context">{'search_default_current': 1,'search_default_user_id':uid,'search_default_project_id':project_id}</field>
|
||||
<field name="search_view_id" ref="view_scrum_product_backlog_search"/>
|
||||
</record>
|
||||
<menuitem
|
||||
|
@ -308,7 +307,7 @@
|
|||
<field name="search_view_id" ref="view_scrum_sprint_search"/>
|
||||
</record>
|
||||
<menuitem
|
||||
sequence="30"
|
||||
sequence="20"
|
||||
action="action_sprint_all_tree" id="menu_action_sprint_all_tree" parent="menu_scrum"/>
|
||||
|
||||
<!--
|
||||
|
@ -323,6 +322,7 @@
|
|||
<tree string="Scrum Sprint">
|
||||
<field name="date"/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="project_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -380,7 +380,7 @@
|
|||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Sprint" icon="terp-gtk-jump-to-ltr" domain="[]" context="{'group_by':'sprint_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
||||
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Meeting Date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -391,10 +391,10 @@
|
|||
<field name="res_model">project.scrum.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_scrum_daily':1}</field>
|
||||
<field name="context">{'search_default_scrum_daily':1,'search_default_project_id':project_id}</field>
|
||||
<field name="search_view_id" ref="view_scrum_meeting_search"/>
|
||||
</record>
|
||||
<menuitem sequence="20"
|
||||
<menuitem sequence="30"
|
||||
action="action_meeting_form" id="menu_action_meeting_form" parent="menu_scrum"/>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -218,6 +218,14 @@ class resource_resource(osv.osv):
|
|||
args.append(('user_id','in',user_ids))
|
||||
|
||||
return super(resource_resource, self).search(cr, uid, args, offset, limit, order, context, count)
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)')
|
||||
return super(resource_resource, self).copy(cr, uid, id, default, context)
|
||||
|
||||
resource_resource()
|
||||
|
||||
class resource_calendar_leaves(osv.osv):
|
||||
|
|
|
@ -18,9 +18,11 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20" groups="base.group_extended">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'resource_type'}"/>
|
||||
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}"/>
|
||||
<filter string="User" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'resource_type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue