[IMP] Project-Task->add column id, planned, delay and state Rename to Type
bzr revid: ron@tinyerp.com-20101015115246-s89zl23scfesonlx
This commit is contained in:
@@ -189,13 +189,13 @@ class project(osv.osv):
|
||||
'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'tasks': fields.one2many('project.task', 'project_id', "Project tasks"),
|
||||
'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
|
||||
'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
|
||||
store = {
|
||||
'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks'], 10),
|
||||
'project.task': (_get_project_task, ['planned_hours', 'effective_hours', 'remaining_hours', 'total_hours', 'progress', 'delay_hours'], 10),
|
||||
'project.task.work': (_get_project_work, ['hours'], 10),
|
||||
}),
|
||||
'effective_hours': fields.function(_progress_rate, multi="progress", method=True, string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects.",
|
||||
'effective_hours': fields.function(_progress_rate, multi="progress", method=True, string='Time Spent', help="Sum of spent hours of all tasks related to this project and its child projects.",
|
||||
store = {
|
||||
'project.project': (lambda self, cr, uid, ids, c={}: ids, ['tasks'], 10),
|
||||
'project.task': (_get_project_task, ['planned_hours', 'effective_hours', 'remaining_hours', 'total_hours', 'progress', 'delay_hours'], 10),
|
||||
@@ -463,7 +463,7 @@ class task(osv.osv):
|
||||
'description': fields.text('Description'),
|
||||
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."),
|
||||
'type_id': fields.many2one('project.task.type', 'Stage',),
|
||||
'type_id': fields.many2one('project.task.type', 'Type',),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
|
||||
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
|
||||
\n If the task is over, the states is set to \'Done\'.'),
|
||||
|
||||
@@ -305,13 +305,15 @@
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours<0 and state in ('pending');red:date_deadline and (date_deadline<current_date) and (state in ('draft','open'))" string="Tasks">
|
||||
<field name="id"/>
|
||||
<field name="sequence" invisible="not context.get('seq_visible', False)"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id" icon="gtk-indent" domain="['|',('user_id','=',uid),('members','=',uid)]" invisible="context.get('user_invisible', False)"/>
|
||||
<field name="user_id" invisible="context.get('user_invisible', False)"/>
|
||||
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
|
||||
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)"/>
|
||||
<field name="planned_hours" widget="float_time" invisible="1"/>
|
||||
<field name="planned_hours"/>
|
||||
<field name="delay_hours"/>
|
||||
<field name="date_deadline" invisible="context.get('set_visible',False)"/>
|
||||
<field name="type_id" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
|
||||
<button name="next_type" invisible="context.get('set_visible',False)"
|
||||
|
||||
Reference in New Issue
Block a user