[IMP] project.task: second step towards cleaning.
bzr revid: tde@openerp.com-20120525162016-qyp3yiknuxeq8qeo
This commit is contained in:
+4
-2
@@ -568,9 +568,11 @@ class crm_case(object):
|
||||
context = {}
|
||||
context['state_to'] = state_to
|
||||
rule_obj = self.pool.get('base.action.rule')
|
||||
if not rule_obj:
|
||||
return True
|
||||
model_obj = self.pool.get('ir.model')
|
||||
model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
|
||||
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])])
|
||||
model_ids = model_obj.search(cr, uid, [('model','=',self._name)], context=context)
|
||||
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])], context=context)
|
||||
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
|
||||
|
||||
def remind_partner(self, cr, uid, ids, context=None, attach=False):
|
||||
|
||||
+70
-32
@@ -19,7 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from crm import crm_case
|
||||
from crm import crm
|
||||
from datetime import datetime, date
|
||||
from lxml import etree
|
||||
from osv import fields, osv
|
||||
@@ -506,7 +506,7 @@ def Project():
|
||||
return self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
|
||||
|
||||
class task(crm_case, osv.osv):
|
||||
class task(crm.crm_case, osv.osv):
|
||||
_name = "project.task"
|
||||
_description = "Task"
|
||||
_log_create = True
|
||||
@@ -529,24 +529,29 @@ class task(crm_case, osv.osv):
|
||||
return project_ids[0][0]
|
||||
return None
|
||||
|
||||
def _read_group_type_id(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
|
||||
def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
|
||||
stage_obj = self.pool.get('project.task.type')
|
||||
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
|
||||
order = stage_obj._order
|
||||
access_rights_uid = access_rights_uid or uid
|
||||
if read_group_order == 'type_id desc':
|
||||
# lame way to allow reverting search, should just work in the trivial case
|
||||
# lame way to allow reverting search, should just work in the trivial case
|
||||
if read_group_order == 'stage_id desc':
|
||||
order = '%s desc' % order
|
||||
# retrieve section_id from the context and write the domain
|
||||
search_domain = []
|
||||
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
|
||||
if project_id:
|
||||
domain = ['|', ('id','in',ids), ('project_ids','in',project_id)]
|
||||
search_domain += ['|', '&', ('project_ids', '=', project_id), ('fold', '=', True)]
|
||||
else:
|
||||
domain = ['|', ('id','in',ids), ('case_default','=',1)]
|
||||
search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', 1), ('fold', '=', False)]
|
||||
print search_domain
|
||||
stage_ids = stage_obj._search(cr, uid, domain, order=order, access_rights_uid=access_rights_uid, context=context)
|
||||
print stage_ids
|
||||
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
|
||||
# restore order of the search
|
||||
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
|
||||
return result
|
||||
|
||||
|
||||
def _read_group_user_id(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
|
||||
res_users = self.pool.get('res.users')
|
||||
project_id = self._resolve_project_id_from_context(cr, uid, context=context)
|
||||
@@ -565,7 +570,7 @@ class task(crm_case, osv.osv):
|
||||
return result
|
||||
|
||||
_group_by_full = {
|
||||
'type_id': _read_group_type_id,
|
||||
'stage_id': _read_group_stage_ids,
|
||||
'user_id': _read_group_user_id
|
||||
}
|
||||
|
||||
@@ -641,7 +646,7 @@ class task(crm_case, 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
|
||||
default['type_id'] = False
|
||||
default['stage_id'] = False
|
||||
if not default.get('name', False):
|
||||
default['name'] = self.browse(cr, uid, id, context=context).name or ''
|
||||
if not context.get('copy',False):
|
||||
@@ -671,7 +676,8 @@ class task(crm_case, osv.osv):
|
||||
'description': fields.text('Description'),
|
||||
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
|
||||
'stage_id': fields.many2one('project.task.type', 'Stage'),
|
||||
'stage_id': fields.many2one('project.task.type', 'Stage',
|
||||
domain="['&', '|', ('project_ids', '=', project_id), ('case_default', '=', True)]"),
|
||||
'state': fields.related('stage_id', 'state', type="selection", store=True,
|
||||
selection=_TASK_STATE, string="State", readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
@@ -849,14 +855,13 @@ class task(crm_case, osv.osv):
|
||||
cases = self.browse(cr, uid, cases, context=context)
|
||||
domain = list(domain)
|
||||
if section_id:
|
||||
domain += ['|', ('section_ids', '=', section_id)]
|
||||
domain += ['|', ('project_ids', '=', section_id)]
|
||||
domain.append(('case_default', '=', True))
|
||||
for lead in cases:
|
||||
domain += ['|', ('type', '=', lead.type), ('type', '=', 'both')]
|
||||
lead_section_id = lead.section_id.id if lead.section_id else None
|
||||
if lead_section_id:
|
||||
domain += ['|', ('section_ids', '=', lead_section_id), ('case_default', '=', True)]
|
||||
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, domain, order=order, context=context)
|
||||
for task in cases:
|
||||
task_project_id = task.project_id.id if task.project_id else None
|
||||
if task_project_id:
|
||||
domain += ['|', ('project_ids', '=', task_project_id), ('case_default', '=', True)]
|
||||
stage_ids = self.pool.get('project.task.type').search(cr, uid, domain, order=order, context=context)
|
||||
if stage_ids:
|
||||
return stage_ids[0]
|
||||
return False
|
||||
@@ -930,9 +935,9 @@ class task(crm_case, osv.osv):
|
||||
# close task
|
||||
vals['remaining_hours'] = 0.0
|
||||
if not task.date_end:
|
||||
vals['date_end']: fields.datetime.now()
|
||||
vals['date_end'] = fields.datetime.now()
|
||||
self.case_set(cr, uid, [task.id], 'done', vals, context=context)
|
||||
self.case_close_send_note(cr, uid, ids, context=context)
|
||||
#self.case_close_send_note(cr, uid, [task.id], context=context)
|
||||
return True
|
||||
|
||||
def do_reopen(self, cr, uid, ids, context=None):
|
||||
@@ -952,7 +957,7 @@ class task(crm_case, osv.osv):
|
||||
}, context=context)
|
||||
|
||||
self.write(cr, uid, [task.id], {'state': 'open'}, context=context)
|
||||
self.do_open_send_note(cr, uid, [task.id], context)
|
||||
#self.do_open_send_note(cr, uid, [task.id], context)
|
||||
return True
|
||||
|
||||
def do_cancel(self, cr, uid, ids, context=None):
|
||||
@@ -1083,7 +1088,7 @@ class task(crm_case, osv.osv):
|
||||
"""
|
||||
for task in self.browse(cr, uid, ids):
|
||||
if task.project_id.type_ids:
|
||||
typeid = task.type_id.id
|
||||
typeid = task.stage_id.id
|
||||
types_seq={}
|
||||
for type in task.project_id.type_ids :
|
||||
types_seq[type.id] = type.sequence
|
||||
@@ -1093,10 +1098,10 @@ class task(crm_case, osv.osv):
|
||||
types = sorted(types_seq.items(), lambda x, y: cmp(y[1], x[1]))
|
||||
sorted_types = [x[0] for x in types]
|
||||
if not typeid:
|
||||
self.write(cr, uid, task.id, {'type_id': sorted_types[0]})
|
||||
self.write(cr, uid, task.id, {'stage_id': sorted_types[0]})
|
||||
elif typeid and typeid in sorted_types and sorted_types.index(typeid) != len(sorted_types)-1:
|
||||
index = sorted_types.index(typeid)
|
||||
self.write(cr, uid, task.id, {'type_id': sorted_types[index+1]})
|
||||
self.write(cr, uid, task.id, {'stage_id': sorted_types[index+1]})
|
||||
self.state_change_send_note(cr, uid, [task.id], context)
|
||||
return True
|
||||
|
||||
@@ -1113,7 +1118,7 @@ class task(crm_case, osv.osv):
|
||||
'remaining_hours': task.remaining_hours,
|
||||
'planned_hours': task.planned_hours,
|
||||
'kanban_state': task.kanban_state,
|
||||
'type_id': task.type_id.id,
|
||||
'type_id': task.stage_id.id,
|
||||
'state': task.state,
|
||||
'user_id': task.user_id.id
|
||||
|
||||
@@ -1127,24 +1132,24 @@ class task(crm_case, osv.osv):
|
||||
return task_id
|
||||
|
||||
# Overridden to reset the kanban_state to normal whenever
|
||||
# the stage (type_id) of the task changes.
|
||||
# the stage (stage_id) of the task changes.
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
if vals and not 'kanban_state' in vals and 'type_id' in vals:
|
||||
new_stage = vals.get('type_id')
|
||||
if vals and not 'kanban_state' in vals and 'stage_id' in vals:
|
||||
new_stage = vals.get('stage_id')
|
||||
vals_reset_kstate = dict(vals, kanban_state='normal')
|
||||
for t in self.browse(cr, uid, ids, context=context):
|
||||
#TO FIX:Kanban view doesn't raise warning
|
||||
# stages = [stage.id for stage in t.project_id.type_ids]
|
||||
# if new_stage not in stages:
|
||||
# raise osv.except_osv(_('Warning !'), _('Stage is not defined in the project.'))
|
||||
write_vals = vals_reset_kstate if t.type_id != new_stage else vals
|
||||
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
|
||||
super(task,self).write(cr, uid, [t.id], write_vals, context=context)
|
||||
result = True
|
||||
else:
|
||||
result = super(task,self).write(cr, uid, ids, vals, context=context)
|
||||
if ('type_id' in vals) or ('remaining_hours' in vals) or ('user_id' in vals) or ('state' in vals) or ('kanban_state' in vals):
|
||||
if ('stage_id' in vals) or ('remaining_hours' in vals) or ('user_id' in vals) or ('state' in vals) or ('kanban_state' in vals):
|
||||
self._store_history(cr, uid, ids, context=context)
|
||||
self.state_change_send_note(cr, uid, ids, context)
|
||||
return result
|
||||
@@ -1186,7 +1191,10 @@ class task(crm_case, osv.osv):
|
||||
# ---------------------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# ---------------------------------------------------
|
||||
|
||||
|
||||
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
|
||||
return 'Task'
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
@@ -1210,6 +1218,36 @@ class task(crm_case, osv.osv):
|
||||
msg = _('Task has been set as <b>draft</b>.')
|
||||
return self.message_append_note(cr, uid, ids, body=msg, context=context)
|
||||
|
||||
def case_open_send_note(self, cr, uid, ids, context=None):
|
||||
#for id in ids:
|
||||
#msg = _('%s has been <b>opened</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
|
||||
#self.message_append_note(cr, uid, [id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
def case_close_send_note(self, cr, uid, ids, context=None):
|
||||
#for id in ids:
|
||||
#msg = _('%s has been <b>closed</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
|
||||
#self.message_append_note(cr, uid, [id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
def case_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
#for id in ids:
|
||||
#msg = _('%s has been <b>canceled</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
|
||||
#self.message_append_note(cr, uid, [id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
def case_pending_send_note(self, cr, uid, ids, context=None):
|
||||
#for id in ids:
|
||||
#msg = _('%s is now <b>pending</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
|
||||
#self.message_append_note(cr, uid, [id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
def case_reset_send_note(self, cr, uid, ids, context=None):
|
||||
#for id in ids:
|
||||
#msg = _('%s has been <b>renewed</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
|
||||
#self.message_append_note(cr, uid, [id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
def do_delegation_send_note(self, cr, uid, ids, context=None):
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
msg = _('Task has been <b>delegated</b> to <em>%s</em>.') % (task.user_id.name)
|
||||
@@ -1218,7 +1256,7 @@ class task(crm_case, osv.osv):
|
||||
|
||||
def state_change_send_note(self, cr, uid, ids, context=None):
|
||||
for task in self.browse(cr, uid, ids, context=context):
|
||||
msg = _('Stage changed to <b>%s</b>') % (task.type_id.name)
|
||||
msg = _('Stage changed to <b>%s</b>') % (task.stage_id.name)
|
||||
self.message_append_note(cr, uid, [task.id], body=msg, context=context)
|
||||
return True
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<record id="project_tt_cancel" model="project.task.type">
|
||||
<field name="sequence">6</field>
|
||||
<field name="name">Cancelled</field>
|
||||
<field name="state">cancelled</field>
|
||||
<field name="state">cancel</field>
|
||||
<field name="project_default" eval="1"/>
|
||||
<field name="fold" eval="True"/>
|
||||
</record>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Prepare Requirements Document</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
<field name="color">3</field>
|
||||
</record>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Make SRS</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_3" model="project.task">
|
||||
@@ -99,7 +99,7 @@
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Design Use Cases</field>
|
||||
<field name="date_deadline" eval="time.strftime('%Y-%m-24')"/>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_4" model="project.task">
|
||||
@@ -112,7 +112,7 @@
|
||||
<field name="description">Use the account_budget module</field>
|
||||
<field name="date_deadline" eval="time.strftime('%Y-%m-19')"/>
|
||||
<field name="color">3</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_5" model="project.task">
|
||||
@@ -125,7 +125,7 @@
|
||||
<field name="kanban_state">done</field>
|
||||
<field name="priority">0</field>
|
||||
<field name="date_deadline" eval="time.strftime('%Y-%m-%d')"/>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_6" model="project.task">
|
||||
@@ -135,7 +135,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Risk Management Planning</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_7" model="project.task">
|
||||
@@ -145,7 +145,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Create Project Schedules</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_8" model="project.task">
|
||||
@@ -156,7 +156,7 @@
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Dataflow Design</field>
|
||||
<field name="priority">0</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_9" model="project.task">
|
||||
@@ -166,7 +166,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">User Interface Design</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_10" model="project.task">
|
||||
@@ -177,7 +177,7 @@
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Develop Module in Sale Management</field>
|
||||
<field name="kanban_state">blocked</field>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_11" model="project.task">
|
||||
@@ -187,7 +187,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Develop module in Warehouse</field>
|
||||
<field name="type_id" ref="project_tt_merge"/>
|
||||
<field name="stage_id" ref="project_tt_merge"/>
|
||||
</record>
|
||||
|
||||
<function model="project.task" name="do_close" eval="[ref('project_task_11')], {'install_mode': True}"/>
|
||||
@@ -199,7 +199,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Integrate Modules</field>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
</record>
|
||||
|
||||
<function model="project.task" name="do_close" eval="[ref('project_task_12')], {'install_mode': True}"/>
|
||||
@@ -211,7 +211,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Unit Testing</field>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
</record>
|
||||
|
||||
<function model="project.task" name="do_pending" eval="[ref('project_task_13')], {'install_mode': True}"/>
|
||||
@@ -223,8 +223,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Regression Test</field>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="state">pending</field>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_15" model="project.task">
|
||||
@@ -234,7 +233,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Documentation</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
<field name="date_start">2011-02-06</field>
|
||||
</record>
|
||||
|
||||
@@ -247,7 +246,7 @@
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Performance Tuning</field>
|
||||
<field name="description">Test on Runbot</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
<function model="project.task" name="do_open" eval="[ref('project_task_16')], {'install_mode': True}"/>
|
||||
|
||||
@@ -258,7 +257,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Deploy and Review on Customer System</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
<function model="project.task" name="do_open" eval="[ref('project_task_17')], {'install_mode': True}"/>
|
||||
|
||||
@@ -269,7 +268,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_integrate_openerp"/>
|
||||
<field name="name">Training and Presentation</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
@@ -322,7 +321,7 @@
|
||||
<record id="project_task_116" model="project.task">
|
||||
<field name="planned_hours">38.0</field>
|
||||
<field name="remaining_hours">38.0</field>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="project_id" ref="project_project_22"/>
|
||||
<field name="description">BoM, After sales returns, interventions. Traceability.</field>
|
||||
@@ -334,7 +333,7 @@
|
||||
<field name="planned_hours">16.0</field>
|
||||
<field name="remaining_hours">16.0</field>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
<field name="project_id" ref="project_project_23"/>
|
||||
<field name="name">Data importation + Doc</field>
|
||||
</record>
|
||||
@@ -344,7 +343,7 @@
|
||||
<field name="planned_hours">16.0</field>
|
||||
<field name="remaining_hours">16.0</field>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
<field name="project_id" ref="project_project_23"/>
|
||||
<field name="name">Modifications asked by the customer.</field>
|
||||
</record>
|
||||
@@ -353,7 +352,7 @@
|
||||
<record id="project_task_184" model="project.task">
|
||||
<field name="planned_hours">16.0</field>
|
||||
<field name="remaining_hours">16.0</field>
|
||||
<field name="type_id" ref="project_tt_testing"/>
|
||||
<field name="stage_id" ref="project_tt_testing"/>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="priority">0</field>
|
||||
<field name="project_id" ref="project_project_21"/>
|
||||
@@ -364,7 +363,7 @@
|
||||
<field name="sequence">15</field>
|
||||
<field name="planned_hours">8.0</field>
|
||||
<field name="remaining_hours">8.0</field>
|
||||
<field name="type_id" ref="project_tt_testing"/>
|
||||
<field name="stage_id" ref="project_tt_testing"/>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="project_id" ref="project_project_21"/>
|
||||
<field name="name">Internal testing + Software Install</field>
|
||||
@@ -374,7 +373,7 @@
|
||||
<field name="sequence">17</field>
|
||||
<field name="planned_hours">16.0</field>
|
||||
<field name="remaining_hours">16.0</field>
|
||||
<field name="type_id" ref="project_tt_development"/>
|
||||
<field name="stage_id" ref="project_tt_development"/>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_21"/>
|
||||
@@ -389,7 +388,7 @@
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="project_id" ref="project_project_23"/>
|
||||
<field name="name">Parameters</field>
|
||||
<field name="type_id" ref="project_tt_specification"/>
|
||||
<field name="stage_id" ref="project_tt_specification"/>
|
||||
</record>
|
||||
<function model="project.task" name="do_open" eval="[ref('project_task_189')], {'install_mode': True}"/>
|
||||
|
||||
@@ -398,10 +397,9 @@
|
||||
<field name="planned_hours">32.0</field>
|
||||
<field name="remaining_hours">32.0</field>
|
||||
<field name="user_id" eval="False"/>
|
||||
<field name="state">open</field>
|
||||
<field name="project_id" ref="project_project_21"/>
|
||||
<field name="name">Start of the doc redaction + MRP</field>
|
||||
<field name="type_id" ref="project_tt_testing"/>
|
||||
<field name="stage_id" ref="project_tt_testing"/>
|
||||
</record>
|
||||
|
||||
<!-- Schedule tasks to assign users and dates -->
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
<button name="%(action_project_task_delegate)d" states="pending,open,draft" string="Delegate" type="action"/>
|
||||
<button name="do_cancel" states="draft,open,pending" string="Cancel" type="object"/>
|
||||
<div class="oe_right">
|
||||
<field name="type_id" nolabel="1" widget="statusbar"/>
|
||||
<field name="stage_id" nolabel="1" widget="statusbar"/>
|
||||
</div>
|
||||
<div class="oe_clear"/>
|
||||
</div>
|
||||
@@ -362,7 +362,7 @@
|
||||
<tree string="Delegated tasks">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
@@ -383,8 +383,8 @@
|
||||
<separator string="Miscellaneous" colspan="4"/>
|
||||
<field name="partner_id" />
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
<group col="4" colspan="2" attrs="{'invisible': ['|', ('project_id','=', False), ('type_id','=', False)]}">
|
||||
<field name="type_id" widget="selection" readonly="1"/>
|
||||
<group col="4" colspan="2" attrs="{'invisible': ['|', ('project_id','=', False), ('stage_id','=', False)]}">
|
||||
<field name="stage_id" widget="selection" readonly="1"/>
|
||||
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
|
||||
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
|
||||
</group>
|
||||
@@ -406,10 +406,10 @@
|
||||
<field name="model">project.task</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="type_id" >
|
||||
<kanban default_group_by="stage_id" >
|
||||
<field name="color"/>
|
||||
<field name="priority"/>
|
||||
<field name="type_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="user_email"/>
|
||||
<field name="description"/>
|
||||
@@ -510,13 +510,13 @@
|
||||
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
|
||||
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
|
||||
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
|
||||
<field name="type_id" invisible="context.get('set_visible',False)"/>
|
||||
<field name="stage_id" invisible="context.get('set_visible',False)"/>
|
||||
<button name="next_type" invisible="context.get('set_visible',False)"
|
||||
states="open,pending"
|
||||
string="Change Stage"
|
||||
type="object"
|
||||
icon="gtk-go-forward"
|
||||
help="Change Type" attrs="{'invisible': [('type_id','=', False)]}"/>
|
||||
help="Change Type" attrs="{'invisible': [('stage_id','=', False)]}"/>
|
||||
<field name="date_start" invisible="1" groups="base.group_no_one"/>
|
||||
<field name="date_end" invisible="1" groups="base.group_no_one"/>
|
||||
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
|
||||
@@ -592,7 +592,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Project" name="group_project_id" icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Status" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Deadline" icon="terp-gnome-cpu-frequency-applet+" domain="[]" context="{'group_by':'date_deadline'}"/>
|
||||
|
||||
@@ -82,7 +82,7 @@ class report_project_task_user(osv.osv):
|
||||
t.name as name,
|
||||
t.company_id,
|
||||
t.partner_id,
|
||||
t.type_id,
|
||||
t.stage_id,
|
||||
remaining_hours as remaining_hours,
|
||||
total_hours as total_hours,
|
||||
t.delay_hours as hours_delay,
|
||||
@@ -114,7 +114,7 @@ class report_project_task_user(osv.osv):
|
||||
name,
|
||||
t.company_id,
|
||||
t.partner_id,
|
||||
t.type_id
|
||||
t.stage_id
|
||||
|
||||
""")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user