[MERGE] merge pap branch for project changes
bzr revid: mra@mra-laptop-20100727124302-yu4ipn5igwij8cia
This commit is contained in:
commit
c4a408a027
|
@ -127,7 +127,6 @@ module named account_vouchers
|
|||
'board_account_demo.xml',
|
||||
],
|
||||
'test': [
|
||||
'test/account_sequence_test.yml',
|
||||
'test/account_customer_invoice.yml',
|
||||
'test/account_supplier_invoice.yml',
|
||||
'test/account_change_currency.yml',
|
||||
|
@ -137,7 +136,7 @@ module named account_vouchers
|
|||
'test/account_invoice_state.yml',
|
||||
'test/account_use_model.yml',
|
||||
'test/account_validate_account_move.yml',
|
||||
# 'test/account_fiscalyear_close.yml',
|
||||
'test/account_fiscalyear_close.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="analytic_root" model="account.analytic.account">
|
||||
<field name="name">Analytic Chart</field>
|
||||
<field name="name" model="res.company" use="name" search="[('id', '=', 1)]"/>
|
||||
<field name="code">0</field>
|
||||
</record>
|
||||
<record id="analytic_absences" model="account.analytic.account">
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
from lxml import etree
|
||||
import time
|
||||
from datetime import date, datetime
|
||||
|
||||
from tools.translate import _
|
||||
from osv import fields, osv
|
||||
|
||||
|
@ -38,21 +39,21 @@ class project_task_type(osv.osv):
|
|||
_defaults = {
|
||||
'sequence': 1
|
||||
}
|
||||
|
||||
|
||||
project_task_type()
|
||||
|
||||
class project(osv.osv):
|
||||
_name = "project.project"
|
||||
_description = "Project"
|
||||
_inherits = {'account.analytic.account':"category_id"}
|
||||
_inherits = {'account.analytic.account': "analytic_account_id"}
|
||||
|
||||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if user == 1:
|
||||
return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
|
||||
if context and context.has_key('user_prefence') and context['user_prefence']:
|
||||
cr.execute("""SELECT project.id FROM project_project project
|
||||
LEFT JOIN account_analytic_account account ON account.id = project.category_id
|
||||
LEFT JOIN project_user_rel rel ON rel.project_id = project.category_id
|
||||
LEFT JOIN account_analytic_account account ON account.id = project.analytic_account_id
|
||||
LEFT JOIN project_user_rel rel ON rel.project_id = project.analytic_account_id
|
||||
WHERE (account.user_id = %s or rel.uid = %s)"""%(user, user))
|
||||
res = cr.fetchall()
|
||||
return [(r[0]) for r in res]
|
||||
|
@ -78,36 +79,64 @@ class project(osv.osv):
|
|||
pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False
|
||||
return {'value':{'contact_id': addr['contact'], 'pricelist_id': pricelist_id}}
|
||||
|
||||
def get_all_child_projects(self, cr, uid, ids, context=None):
|
||||
cr.execute('''select prpc.id as id from account_analytic_account as p
|
||||
join account_analytic_account as c on p.id = c.parent_id
|
||||
join project_project as prp on prp.analytic_account_id = p.id
|
||||
join project_project as prpc on prpc.analytic_account_id = c.id
|
||||
where prp.id in %s''',(tuple(ids),))
|
||||
|
||||
child_ids = cr.fetchall()
|
||||
if child_ids:
|
||||
child_ids = [x[0] for x in child_ids]
|
||||
child_ids = self.get_all_child_projects(cr, uid, child_ids)
|
||||
|
||||
return ids+child_ids
|
||||
|
||||
def _progress_rate(self, cr, uid, ids, names, arg, context=None):
|
||||
res = {}.fromkeys(ids, 0.0)
|
||||
progress = {}
|
||||
if not ids:
|
||||
return res
|
||||
ids2 = self.search(cr, uid, [('parent_id','child_of',ids)], context=context)
|
||||
if ids2:
|
||||
cr.execute('''SELECT
|
||||
project_id, sum(planned_hours), sum(total_hours), sum(effective_hours)
|
||||
FROM
|
||||
project_task
|
||||
WHERE
|
||||
project_id IN %s AND
|
||||
state<>'cancelled'
|
||||
GROUP BY
|
||||
project_id''',(tuple(ids2),))
|
||||
progress = dict(map(lambda x: (x[0], (x[1], x[2], x[3])), cr.fetchall()))
|
||||
for project in self.browse(cr, uid, ids, context=context):
|
||||
|
||||
par_child_projects={}
|
||||
all_projects = list(ids)
|
||||
|
||||
for id in ids:
|
||||
child_projects = self.get_all_child_projects(cr, uid, [id], context)
|
||||
child_projects = [x for x in child_projects]
|
||||
par_child_projects[id] = child_projects
|
||||
all_projects.extend(child_projects)
|
||||
|
||||
all_projects = dict.fromkeys(all_projects).keys()
|
||||
cr.execute('''SELECT
|
||||
project_id, sum(planned_hours), sum(total_hours), sum(effective_hours)
|
||||
FROM
|
||||
project_task
|
||||
WHERE
|
||||
project_id IN %s AND
|
||||
state<>'cancelled'
|
||||
GROUP BY
|
||||
project_id''',(tuple(all_projects),))
|
||||
progress = dict(map(lambda x: (x[0], (x[1], x[2], x[3])), cr.fetchall()))
|
||||
|
||||
for project in self.browse(cr, uid, par_child_projects.keys(), context=context):
|
||||
s = [0.0, 0.0, 0.0]
|
||||
tocompute = [project]
|
||||
tocompute = par_child_projects[project.id]
|
||||
while tocompute:
|
||||
p = tocompute.pop()
|
||||
tocompute += p.child_ids
|
||||
for i in range(3):
|
||||
s[i] += progress.get(p.id, (0.0, 0.0, 0.0))[i]
|
||||
s[i] += progress.get(p, (0.0, 0.0, 0.0))[i]
|
||||
if project.state == 'close':
|
||||
progress_rate = 100.0
|
||||
else:
|
||||
progress_rate = s[1] and round(min(100.0 * s[2] / s[1], 99.99), 2)
|
||||
|
||||
res[project.id] = {
|
||||
'planned_hours': s[0],
|
||||
'effective_hours': s[2],
|
||||
'total_hours': s[1],
|
||||
'progress_rate': s[1] and (100.0 * s[2] / s[1]) or 0.0
|
||||
'progress_rate': progress_rate
|
||||
}
|
||||
return res
|
||||
|
||||
|
@ -121,30 +150,30 @@ class project(osv.osv):
|
|||
'complete_name': fields.function(_complete_name, method=True, string="Project Name", type='char', size=250),
|
||||
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the project without removing it."),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of Projects."),
|
||||
'category_id': fields.many2one('account.analytic.account', 'Analytic Account', help="Link this project to an analytic account if you need financial management on projects. It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc."),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', help="Link this project to an analytic account if you need financial management on projects. It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc."),
|
||||
'priority': fields.integer('Sequence', help="Gives the sequence order when displaying a list of task"),
|
||||
'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."),
|
||||
'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."),
|
||||
'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."),
|
||||
'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."),
|
||||
'total_hours': fields.function(_progress_rate, multi="progress", method=True, string='Total Time', help="Sum of total hours of all tasks related to this project."),
|
||||
'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."),
|
||||
'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."),
|
||||
'total_hours': fields.function(_progress_rate, multi="progress", method=True, string='Total Time', help="Sum of total hours of all tasks related to this project and its child projects."),
|
||||
'progress_rate': fields.function(_progress_rate, multi="progress", method=True, string='Progress', type='float', help="Percent of tasks closed according to the total of tasks todo."),
|
||||
'warn_customer': fields.boolean('Warn Partner', help="If you check this, the user will have a popup when closing a task that propose a message to send by email to the customer."),
|
||||
'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed."),
|
||||
'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed."),
|
||||
'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages'),
|
||||
}
|
||||
|
||||
|
||||
_order = "sequence"
|
||||
|
||||
|
||||
_defaults = {
|
||||
'active': True,
|
||||
'priority': 1,
|
||||
'sequence': 10,
|
||||
'warn_manager': True,
|
||||
}
|
||||
|
||||
|
||||
def _check_dates(self, cr, uid, ids):
|
||||
leave = self.read(cr, uid, ids[0], ['date_start', 'date'])
|
||||
if leave['date_start'] and leave['date']:
|
||||
|
@ -155,7 +184,7 @@ class project(osv.osv):
|
|||
_constraints = [
|
||||
(_check_dates, 'Error! project start-date must be lower then project end-date.', ['date_start', 'date'])
|
||||
]
|
||||
|
||||
|
||||
def set_template(self, cr, uid, ids, context=None):
|
||||
res = self.setActive(cr, uid, ids, value=False, context=context)
|
||||
return res
|
||||
|
@ -195,16 +224,16 @@ class project(osv.osv):
|
|||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
|
||||
task_obj = self.pool.get('project.task')
|
||||
proj = self.browse(cr, uid, id, context=context)
|
||||
default = default or {}
|
||||
context['active_test'] = False
|
||||
default['state'] = 'open'
|
||||
if not default.get('name', False):
|
||||
default['name'] = proj.name+_(' (copy)')
|
||||
default['name'] = proj.name+_(' (copy)')
|
||||
res = super(project, self).copy(cr, uid, id, default, context)
|
||||
|
||||
|
||||
task_ids = task_obj.search(cr, uid, [('project_id','=', res), ('active','=',False)])
|
||||
tasks = task_obj.browse(cr, uid, task_ids)
|
||||
for task in tasks:
|
||||
|
@ -216,11 +245,11 @@ class project(osv.osv):
|
|||
dd = date(*time.strptime(task.date_deadline,'%Y-%m-%d')[:3])
|
||||
diff = dd-ds
|
||||
date_deadline = (datetime.now()+diff).strftime('%Y-%m-%d %H:%M:%S')
|
||||
task_obj.write(cr, uid, task.id, {'active':True,
|
||||
task_obj.write(cr, uid, task.id, {'active':True,
|
||||
'date_start':time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'date_deadline':date_deadline,
|
||||
'date_end':date_end})
|
||||
|
||||
|
||||
ids = self.search(cr, uid, [('parent_id','child_of', [res])])
|
||||
return res
|
||||
|
||||
|
@ -241,8 +270,8 @@ class project(osv.osv):
|
|||
result.append(new_id)
|
||||
cr.execute('select id from project_task where project_id=%s', (proj.id,))
|
||||
res = cr.fetchall()
|
||||
child_ids = self.search(cr, uid, [('parent_id','=', proj.category_id.id)], context=context)
|
||||
parent_id = self.read(cr, uid, new_id, ['category_id'])['category_id'][0]
|
||||
child_ids = self.search(cr, uid, [('parent_id','=', proj.analytic_account_id.id)], context=context)
|
||||
parent_id = self.read(cr, uid, new_id, ['analytic_account_id'])['analytic_account_id'][0]
|
||||
if child_ids:
|
||||
self.duplicate_template(cr, uid, child_ids, context={'parent_id': parent_id})
|
||||
|
||||
|
@ -276,11 +305,11 @@ class project(osv.osv):
|
|||
tasks_id = [x[0] for x in cr.fetchall()]
|
||||
if tasks_id:
|
||||
task_obj.write(cr, uid, tasks_id, {'active': value}, context=context)
|
||||
child_ids = self.search(cr, uid, [('parent_id','=', proj.id)])
|
||||
child_ids = self.search(cr, uid, [('parent_id','=', proj.analytic_account_id.id)])
|
||||
if child_ids:
|
||||
self.setActive(cr, uid, child_ids, value, context=None)
|
||||
return True
|
||||
|
||||
|
||||
project()
|
||||
|
||||
class task(osv.osv):
|
||||
|
@ -337,13 +366,6 @@ class task(osv.osv):
|
|||
if task['date_start'] > task['date_end']:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _check_deadline_date(self, cr, uid, ids, context=None):
|
||||
task = self.read(cr, uid, ids[0], ['date_start', 'date_deadline'])
|
||||
if task['date_start'] and task['date_deadline']:
|
||||
if task['date_deadline'] < task['date_start']:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _is_template(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = {}
|
||||
|
@ -364,6 +386,7 @@ class task(osv.osv):
|
|||
'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\'.'),
|
||||
'create_date': fields.datetime('Create Date', readonly=True),
|
||||
'date_start': fields.datetime('Starting Date'),
|
||||
'date_end': fields.datetime('Ending Date'),
|
||||
'date_deadline': fields.date('Deadline'),
|
||||
|
@ -383,21 +406,20 @@ class task(osv.osv):
|
|||
'delegated_user_id': fields.related('child_ids', 'user_id', type='many2one', relation='res.users', string='Delegated To'),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner'),
|
||||
'work_ids': fields.one2many('project.task.work', 'task_id', 'Work done'),
|
||||
'manager_id': fields.related('project_id', 'category_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
|
||||
'manager_id': fields.related('project_id', 'analytic_account_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
|
||||
_defaults = {
|
||||
'state': 'draft',
|
||||
'priority': '2',
|
||||
'progress': 0,
|
||||
'sequence': 10,
|
||||
'active': True,
|
||||
'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'project_id': _default_project,
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'project.task', context=c)
|
||||
}
|
||||
|
||||
|
||||
_order = "sequence, priority, date_start, id"
|
||||
|
||||
_constraints = [
|
||||
|
@ -406,7 +428,7 @@ class task(osv.osv):
|
|||
#
|
||||
# Override view according to the company definition
|
||||
#
|
||||
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
users_obj = self.pool.get('res.users')
|
||||
obj_tm = users_obj.browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
|
@ -458,11 +480,11 @@ class task(osv.osv):
|
|||
'ref_doc1': 'project.task,%d'% (task.id,),
|
||||
'ref_doc2': 'project.project,%d'% (project.id,),
|
||||
})
|
||||
elif project.warn_manager and cntx.get('mail_send',False):
|
||||
elif project.warn_manager and cntx.get('mail_send',True):
|
||||
mail_send = True
|
||||
message = _('Task ') + " '" + task.name + "' "+ _("is Done.")
|
||||
self.log(cr, uid, task.id, message)
|
||||
self.write(cr, uid, [task.id], {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0})
|
||||
|
||||
for parent_id in task.parent_ids:
|
||||
if parent_id.state in ('pending','draft'):
|
||||
reopen = True
|
||||
|
@ -532,7 +554,7 @@ class task(osv.osv):
|
|||
def do_open(self, cr, uid, ids, *args):
|
||||
tasks= self.browse(cr,uid,ids)
|
||||
for t in tasks:
|
||||
self.write(cr, uid, [t.id], {'state': 'open'})
|
||||
self.write(cr, uid, [t.id], {'state': 'open', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),})
|
||||
message = _('Task ') + " '" + t.name + "' "+ _("is Open.")
|
||||
self.log(cr, uid, t.id, message)
|
||||
return True
|
||||
|
@ -584,14 +606,14 @@ class project_work(osv.osv):
|
|||
'user_id': fields.many2one('res.users', 'Done by', required=True),
|
||||
'company_id': fields.related('task_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
}
|
||||
|
||||
|
||||
_defaults = {
|
||||
'user_id': lambda obj, cr, uid, context: uid,
|
||||
'date': time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
}
|
||||
|
||||
|
||||
_order = "date desc"
|
||||
|
||||
|
||||
def create(self, cr, uid, vals, *args, **kwargs):
|
||||
if 'hours' in vals and (not vals['hours']):
|
||||
vals['hours'] = 0.00
|
||||
|
@ -613,12 +635,12 @@ class project_work(osv.osv):
|
|||
for work in self.browse(cr, uid, ids):
|
||||
cr.execute('update project_task set remaining_hours=remaining_hours + %s where id=%s', (work.hours, work.task_id.id))
|
||||
return super(project_work,self).unlink(cr, uid, ids, *args, **kwargs)
|
||||
|
||||
|
||||
project_work()
|
||||
|
||||
class config_compute_remaining(osv.osv_memory):
|
||||
_name='config.compute.remaining'
|
||||
|
||||
|
||||
def _get_remaining(self,cr, uid, ctx):
|
||||
task_obj = self.pool.get('project.task')
|
||||
if 'active_id' in ctx:
|
||||
|
@ -628,12 +650,12 @@ class config_compute_remaining(osv.osv_memory):
|
|||
_columns = {
|
||||
'remaining_hours' : fields.float('Remaining Hours', digits=(16,2), help="Put here the remaining hours required to close the task."),
|
||||
}
|
||||
|
||||
|
||||
def _get_analytic_account(self, cr, uid, context={}):
|
||||
if context.get('account_id', False):
|
||||
return context.get('account_id')
|
||||
return False
|
||||
|
||||
|
||||
_defaults = {
|
||||
'account_id' : _get_analytic_account,
|
||||
}
|
||||
|
@ -674,7 +696,7 @@ config_compute_remaining()
|
|||
class message(osv.osv):
|
||||
_name = "project.message"
|
||||
_description = "Message"
|
||||
|
||||
|
||||
_columns = {
|
||||
'subject': fields.char('Subject', size=128, required="True"),
|
||||
'project_id': fields.many2one('project.project', 'Project', ondelete='cascade'),
|
||||
|
@ -704,7 +726,7 @@ class users(osv.osv):
|
|||
_columns = {
|
||||
'context_project_id': fields.many2one('project.project', 'Project')
|
||||
}
|
||||
|
||||
|
||||
users()
|
||||
|
||||
class account_analytic_account(osv.osv):
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
<field name="name">Project task</field>
|
||||
<field name="object">project.task</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: project.project
|
||||
-->
|
||||
<record id="all_projects_account" model="account.analytic.account">
|
||||
<field name="name">Projects</field>
|
||||
<field name="code">3</field>
|
||||
</record>
|
||||
|
||||
<function eval="('default',False,'parent_id', [('project.project', False)], all_projects_account, True, False, False, False, True)" id="parent_project_default_set" model="ir.values" name="set"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<record id="project_project_9" model="project.project">
|
||||
<field name="warn_manager">1</field>
|
||||
<field name="name">Open ERP Integration</field>
|
||||
<field name="parent_id" ref="all_projects_account"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval="[(6, 0, [ref('project_tt_specification'),ref('project_tt_development'),ref('project_tt_testing'),ref('project_tt_merge')])]" name="type_ids"/>
|
||||
</record>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<group col="9" colspan="8">
|
||||
<field name="state" select="1" readonly="1"/>
|
||||
<button name="set_template" string="Set as Template" type="object" states="open" icon="gtk-convert"/>
|
||||
<button name="set_open" string="Reactivate Project" type="object" states="pending,cancelled,done" icon="gtk-ok"/>
|
||||
<button name="set_open" string="Reactivate Project" type="object" states="pending,cancelled,close" icon="gtk-ok"/>
|
||||
<button name="set_pending" string="Pending" type="object" states="open" icon="gtk-media-pause"/>
|
||||
<button name="set_cancel" string="Cancel" type="object" states="open,pending" icon="gtk-cancel"/>
|
||||
<button name="set_done" string="Done" type="object" states="open,pending" icon="gtk-jump-to"/>
|
||||
|
@ -130,7 +130,7 @@
|
|||
<filter string="Parent" name="Parent" icon="terp-personal" domain = "[]" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Users" name="Users" icon="terp-personal" domain = "[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Partner" name="Partner" icon="terp-personal" domain = "[]" context="{'group_by':'partner_id'}"/>
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -245,7 +245,7 @@
|
|||
<form string="Task edition">
|
||||
<group colspan="6" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="project_id" required="1" select="1" domain="['|',('user_id','=',uid),('members','=',uid)]"/>
|
||||
<field name="project_id" required="1" select="1" domain="[('user_id','=',uid)]"/>
|
||||
<field name="total_hours" widget="float_time"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="user_id" select="1"/>
|
||||
|
@ -316,6 +316,7 @@
|
|||
<separator string="Dates" colspan="2"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="create_date"/>
|
||||
</group>
|
||||
<separator string="Miscelleanous" colspan="4"/>
|
||||
<field name="partner_id"/>
|
||||
|
@ -418,7 +419,7 @@
|
|||
<filter string="In Progress" domain="[('state','=','open')]" help="Open Tasks" icon="terp-camera_test"/>
|
||||
<filter string="Pending" domain="[('state','=','pending')]" context="{'show_delegated':False}" help="Pending Tasks" icon="terp-gtk-media-pause"/>
|
||||
<filter name="edit"
|
||||
string="Edit" context="{'set_editable':'True','seq_visible': True}"
|
||||
string="Edit" context="{'set_editable':True,'seq_visible': True}"
|
||||
icon="gtk-execute"
|
||||
groups="base.group_extended"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -537,7 +538,6 @@ Issues like bugs in a system, client complain, materials breakdown are collected
|
|||
|
||||
<act_window
|
||||
domain="[('project_id', '=', active_id)]"
|
||||
context="{'set_default_template':1}"
|
||||
id="act_project_project_2_project_task_all"
|
||||
name="Tasks"
|
||||
res_model="project.task"
|
||||
|
|
|
@ -150,7 +150,7 @@ class project_vs_hours(osv.osv):
|
|||
FROM project_project as pp,
|
||||
account_analytic_account as aaa,
|
||||
project_task as pt
|
||||
WHERE aaa.id=pp.category_id and pt.project_id=pp.id and pp.category_id=aaa.id
|
||||
WHERE aaa.id=pp.analytic_account_id and pt.project_id=pp.id and pp.analytic_account_id=aaa.id
|
||||
GROUP BY aaa.user_id,aaa.state,aaa.name
|
||||
UNION All
|
||||
SELECT
|
||||
|
@ -165,7 +165,7 @@ class project_vs_hours(osv.osv):
|
|||
project_user_rel as pur,
|
||||
account_analytic_account as aaa,
|
||||
project_task as pt
|
||||
WHERE pur.project_id=pp.id and pt.project_id=pp.id and pp.category_id=aaa.id AND pur.uid != aaa.user_id
|
||||
WHERE pur.project_id=pp.id and pt.project_id=pp.id and pp.analytic_account_id=aaa.id AND pur.uid != aaa.user_id
|
||||
GROUP BY pur.uid,aaa.state,aaa.name
|
||||
)
|
||||
""")
|
||||
|
|
|
@ -0,0 +1,223 @@
|
|||
-
|
||||
This scenario tests the delegation process. Closing all the delegated tasks(task delegation at multiple levels) transits the parent task from pending to open state.
|
||||
-
|
||||
Creating a project OpenERP Documentaion
|
||||
-
|
||||
!record {model: project.project, id: project_project_openerpdocumentaion0}:
|
||||
company_id: base.main_company
|
||||
name: OpenERP Documentaion
|
||||
|
||||
-
|
||||
Creating a task 'Develop book for Technical and Functional reference'
|
||||
-
|
||||
!record {model: project.task, id: project_task_documentation_book}:
|
||||
name: Develop book for Technical and Functional reference
|
||||
planned_hours: 20.0
|
||||
project_id: project_project_openerpdocumentaion0
|
||||
remaining_hours: 20.0
|
||||
state: draft
|
||||
|
||||
-
|
||||
Open the task
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_open(cr, uid, [ref("project_task_documentation_book")],
|
||||
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
|
||||
"tz": False, "active_id": ref("project.menu_action_view_task"), })
|
||||
|
||||
-
|
||||
Creating a task 'Publish the References'
|
||||
-
|
||||
!record {model: project.task, id: project_task_publish_book}:
|
||||
name: Publish the References
|
||||
planned_hours: 10.0
|
||||
project_id: project_project_openerpdocumentaion0
|
||||
remaining_hours: 10.0
|
||||
state: draft
|
||||
|
||||
-
|
||||
Open the task
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_open(cr, uid, [ref("project_task_publish_book")],
|
||||
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
|
||||
"tz": False, "active_id": ref("project.menu_action_view_task"), })
|
||||
|
||||
-
|
||||
Creating a project.task.delegate record
|
||||
-
|
||||
!record {model: project.task.delegate, id: project_task_publish_book_delegate}:
|
||||
name: Publish the References
|
||||
new_task_description: aaa
|
||||
planned_hours: 15.0
|
||||
planned_hours_me: 1.0
|
||||
prefix: 'CHECK: Publish the References'
|
||||
state: pending
|
||||
user_id: base.user_demo
|
||||
|
||||
-
|
||||
Performing an osv_memory action validate on module project.task.delegate
|
||||
-
|
||||
!python {model: project.task.delegate}: |
|
||||
self.validate(cr, uid, [ref("project_task_publish_book_delegate")],
|
||||
{"lang": "en_US", "active_model": "project.task", "tz": False, "record_id":
|
||||
4, "active_ids": [ref("project_task_publish_book")], "active_id": ref("project_task_publish_book"),
|
||||
})
|
||||
|
||||
-
|
||||
Creating a delegate task 'Prepare a book that gives functional overview of OpenERP'
|
||||
-
|
||||
!record {model: project.task, id: project_task_delegate_openerp_tutorial}:
|
||||
name: Prepare a book that gives functional overview of OpenERP
|
||||
planned_hours: 30.0
|
||||
project_id: project.project_project_openerpdocumentaion0
|
||||
remaining_hours: 30.0
|
||||
state: draft
|
||||
|
||||
-
|
||||
Open the task
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_open(cr, uid, [ref("project_task_delegate_openerp_tutorial")],
|
||||
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
|
||||
"tz": False, "active_id": ref("project.menu_action_view_task"), })
|
||||
|
||||
-
|
||||
Creating a delegate task 'Prepare a technical reference for creating your modules'
|
||||
-
|
||||
!record {model: project.task, id: project_task_delegate_developer_book}:
|
||||
name: Prepare a technical reference for creating your modules
|
||||
planned_hours: 30.0
|
||||
project_id: project_project_openerpdocumentaion0
|
||||
remaining_hours: 30.0
|
||||
state: draft
|
||||
|
||||
-
|
||||
Open the task
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_open(cr, uid, [ref("project_task_delegate_developer_book")],
|
||||
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
|
||||
"tz": False, "active_id": ref("project.menu_action_view_task"), })
|
||||
|
||||
-
|
||||
Delegate task 'Develop book for Technical and Functional reference' to these tasks and make it pending
|
||||
-
|
||||
!record {model: project.task, id: project_task_documentation_book}:
|
||||
child_ids:
|
||||
- project.project_task_delegate_openerp_tutorial
|
||||
- project.project_task_delegate_developer_book
|
||||
planned_hours: 20.0
|
||||
state: pending
|
||||
|
||||
-
|
||||
Creating a delegate task 'Prepare documentation for Module Development'
|
||||
-
|
||||
!record {model: project.task, id: project_task_delegate_module_develop}:
|
||||
name: Prepare documentation for Module Development
|
||||
planned_hours: 30.0
|
||||
project_id: project.project_project_openerpdocumentaion0
|
||||
remaining_hours: 30.0
|
||||
state: draft
|
||||
|
||||
|
||||
-
|
||||
Creating a delegate 'Prepare documentation for Business Process Development'
|
||||
-
|
||||
!record {model: project.task, id: project_task_delegate_business_process_develop}:
|
||||
name: Prepare documentation for Business Process Development
|
||||
planned_hours: 30.0
|
||||
project_id: project_project_openerpdocumentaion0
|
||||
remaining_hours: 30.0
|
||||
state: draft
|
||||
|
||||
-
|
||||
Delegate task 'Prepare a technical reference for creating your modules' to these tasks and make it pending
|
||||
-
|
||||
!record {model: project.task, id: project_task_delegate_developer_book}:
|
||||
child_ids:
|
||||
- project.project_task_delegate_module_develop
|
||||
- project.project_task_delegate_business_process_develop
|
||||
planned_hours: 20.0
|
||||
state: pending
|
||||
|
||||
-
|
||||
Open the task
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_open(cr, uid, [ref("project_task_delegate_module_develop")],
|
||||
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
|
||||
"tz": False, "active_id": ref("project.menu_action_view_task"), })
|
||||
|
||||
-
|
||||
Open the task
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_open(cr, uid, [ref("project_task_delegate_business_process_develop")],
|
||||
{"lang": "en_US", "active_model": "ir.ui.menu", "active_ids": [ref("project.menu_action_view_task")],
|
||||
"tz": False, "active_id": ref("project.menu_action_view_task"), })
|
||||
|
||||
-
|
||||
Check if 'Prepare a technical reference for creating your modules' in pending state
|
||||
-
|
||||
!assert {model: project.task, id: project_task_delegate_developer_book, severity: error, string: Task is in pending state}:
|
||||
- state == "pending"
|
||||
|
||||
-
|
||||
Close the child task 'Prepare documentation for Module Development'
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_close(cr, uid, [ref("project_task_delegate_module_develop")], {"lang": "en_US",
|
||||
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
|
||||
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
|
||||
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
|
||||
})
|
||||
|
||||
-
|
||||
Close the child task 'Prepare documentation for Business Process Development'
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_close(cr, uid, [ref("project_task_delegate_business_process_develop")], {"lang": "en_US",
|
||||
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
|
||||
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
|
||||
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
|
||||
})
|
||||
|
||||
-
|
||||
Parent task 'Prepare a technical reference for creating your modules' task must now be in open state
|
||||
-
|
||||
!assert {model: project.task, id: project_task_delegate_developer_book, severity: error, string: Task is in done state}:
|
||||
- state == "open"
|
||||
|
||||
|
||||
-
|
||||
Check if task 'Develop book for Technical and Functional reference' in pending state
|
||||
-
|
||||
!assert {model: project.task, id: project_task_documentation_book, severity: error, string: Task is in pending state}:
|
||||
- state == "pending"
|
||||
|
||||
-
|
||||
Close the child project 'Prepare a technical reference for creating your modules'
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_close(cr, uid, [ref("project_task_delegate_developer_book")], {"lang": "en_US",
|
||||
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
|
||||
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
|
||||
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
|
||||
})
|
||||
|
||||
-
|
||||
Close the child project 'Prepare a book that gives functional overview of OpenERP'
|
||||
-
|
||||
!python {model: project.task}: |
|
||||
self.do_close(cr, uid, [ref("project_task_delegate_openerp_tutorial")], {"lang": "en_US",
|
||||
"active_ids": [ref("project.menu_action_view_task")], "tz": False, "active_model":
|
||||
"ir.ui.menu", "section_id": False, "search_default_project_id": False, "search_default_user_id":
|
||||
1, "search_default_current": 1, "mail_send": False, "active_id": ref("project.menu_action_view_task"),
|
||||
})
|
||||
|
||||
-
|
||||
Parent task 'Develop book for Technical and Functional reference' must be now in open state
|
||||
-
|
||||
!assert {model: project.task, id: project_task_documentation_book, severity: error, string: Task is in done state}:
|
||||
- state == "open"
|
|
@ -19,6 +19,8 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from tools.translate import _
|
||||
from osv import fields, osv
|
||||
|
||||
|
@ -83,7 +85,36 @@ class project_task_delegate(osv.osv_memory):
|
|||
'new_task_description': _get_new_desc,
|
||||
'state': 'pending',
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
users_obj = self.pool.get('res.users')
|
||||
obj_tm = users_obj.browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
tm = obj_tm and obj_tm.name or 'Hours'
|
||||
|
||||
res = super(project_task_delegate, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
|
||||
|
||||
if tm in ['Hours','Hour']:
|
||||
return res
|
||||
|
||||
eview = etree.fromstring(res['arch'])
|
||||
|
||||
def _check_rec(eview):
|
||||
if eview.attrib.get('widget','') == 'float_time':
|
||||
eview.set('widget','float')
|
||||
for child in eview:
|
||||
_check_rec(child)
|
||||
return True
|
||||
|
||||
_check_rec(eview)
|
||||
|
||||
res['arch'] = etree.tostring(eview)
|
||||
|
||||
for f in res['fields']:
|
||||
if 'Hours' in res['fields'][f]['string']:
|
||||
res['fields'][f]['string'] = res['fields'][f]['string'].replace('Hours',tm)
|
||||
|
||||
return res
|
||||
|
||||
def validate(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
|
|
@ -173,15 +173,15 @@ class project_task(osv.osv):
|
|||
if res['type'] == 'search':
|
||||
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
|
||||
search_extended ='''<newline/><group col="%d" expand="0" string="%s" groups="project_gtd.group_project_getting">''' % (len(tt)+7,_('Getting Things Done'))
|
||||
search_extended += '''<filter domain="[('timebox_id','=', False)]" context="{'set_editable':True,'set_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Inbox'),)
|
||||
search_extended += '''<filter domain="[('state', 'in', ('draft','open','pending'))]" context="{'set_editable':True,'set_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Editable'),)
|
||||
search_extended += '''<filter domain="[('timebox_id','=', False)]" context="{'set_editable':True,'set_visible':True,'gtd_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Inbox'),)
|
||||
# search_extended += '''<filter domain="[('state', 'in', ('draft','open','pending'))]" context="{'set_editable':True,'set_visible':True,'gtd_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Editable'),)
|
||||
search_extended += '''<separator orientation="vertical"/>'''
|
||||
for time in tt:
|
||||
if time.icon:
|
||||
icon = time.icon
|
||||
else :
|
||||
icon=""
|
||||
search_extended += '''<filter domain="[('timebox_id','=', ''' + str(time.id) + ''')]" icon="''' + icon + '''" string="''' + time.name + '''" context="{'set_visible':True}"/>'''
|
||||
search_extended += '''<filter domain="[('timebox_id','=', ''' + str(time.id) + ''')]" icon="''' + icon + '''" string="''' + time.name + '''" context="{'gtd_visible':True}"/>'''
|
||||
search_extended += '''
|
||||
<separator orientation="vertical"/>
|
||||
<field name="context_id" select="1" widget="selection" />
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<tree string="Context">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="project_default_id" select="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -22,7 +21,6 @@
|
|||
<form string="Context">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="project_default_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -80,9 +78,9 @@
|
|||
<field name="inherit_id" ref="project.view_task_tree2" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="remaining_hours" position="after">
|
||||
<button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('set_visible',True)"/>
|
||||
<field string="Timebox" name="timebox_id" groups="project_gtd.group_project_getting" invisible=" not context.get('set_visible',True)"/>
|
||||
<button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('set_visible',False)"/>
|
||||
<button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible',False)"/>
|
||||
<field string="Timebox" name="timebox_id" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible', False)"/>
|
||||
<button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible',False)"/>
|
||||
<button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/>
|
||||
</field>
|
||||
</field>
|
||||
|
@ -100,5 +98,6 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -27,7 +27,7 @@ class project_issue(osv.osv):
|
|||
_description = 'project issue'
|
||||
_columns = {
|
||||
'timesheet_ids': fields.one2many('hr.analytic.timesheet', 'issue_id', 'Timesheets'),
|
||||
'analytic_account_id': fields.related('project_id', 'category_id', string='Analytic Account')
|
||||
'analytic_account_id': fields.related('project_id', 'analytic_account_id', string='Analytic Account')
|
||||
}
|
||||
|
||||
project_issue()
|
||||
|
@ -48,15 +48,6 @@ class hr_analytic_issue(osv.osv):
|
|||
_columns = {
|
||||
'issue_id' : fields.many2one('project.issue', 'Issue'),
|
||||
}
|
||||
|
||||
def _get_analytic_account(self, cr, uid, context={}):
|
||||
if context.get('account_id', False):
|
||||
return context.get('account_id')
|
||||
return False
|
||||
|
||||
_defaults = {
|
||||
'account_id' : _get_analytic_account,
|
||||
}
|
||||
|
||||
hr_analytic_issue()
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<notebook colspan="4">
|
||||
<page string="Worklogs">
|
||||
<field name="analytic_account_id" invisible="1"/>
|
||||
<field name="timesheet_ids" colspan="4" nolabel="1" default_get="{'account_id':project_id}" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||
<tree editable="top" string="Timesheet">
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
|
||||
|
|
|
@ -249,14 +249,14 @@
|
|||
<field eval="1" name="active"/>
|
||||
<field eval="1" name="warn_manager"/>
|
||||
<field eval="0" name="warn_customer"/>
|
||||
<field name="date_start">2010-02-25</field>
|
||||
<field name="date_start" eval="(DateTime.now()-timedelta(70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="1" name="priority"/>
|
||||
<field name="state">open</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="description">Develop an OpenERP Website.</field>
|
||||
<field eval="[(6, 0, [ref('res_users_manager0'), ref('res_users_user0'), ref('res_users_userfinance0'), ref('res_users_userdesign0'), ref('res_users_userdeveloper0'), ref('res_users_usertester0'), ref('res_users_useranalyst0')])]" name="members"/>
|
||||
<field name="date">2010-04-30</field>
|
||||
<field name="date" eval="(DateTime.now()+timedelta(60-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field eval="[(6, 0, [])]" name="type_ids"/>
|
||||
|
@ -269,14 +269,14 @@
|
|||
<field name="name">Information Gathering and Understanding</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="constraint_date_end">2010-03-11 15:37:00</field>
|
||||
<field name="date_start">2010-02-25 15:33:00</field>
|
||||
<field name="constraint_date_end" eval="(DateTime.now()+timedelta(18-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_start" eval="(DateTime.now()-timedelta(70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="responsible_id" ref="res_users_demouser1"/>
|
||||
<field eval="10.0" name="duration"/>
|
||||
<field eval="15.0" name="duration"/>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field name="constraint_date_start">2010-02-24 15:37:00</field>
|
||||
<field name="date_end">2010-03-10 15:33:00</field>
|
||||
<field name="constraint_date_start" eval="(DateTime.now()+timedelta(2-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_end" eval="(DateTime.now()+timedelta(15-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
|
||||
<record id="project_phase_planning0" model="project.phase">
|
||||
|
@ -284,14 +284,14 @@
|
|||
<field name="name">Planning</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="constraint_date_end">2010-03-25 15:49:00</field>
|
||||
<field name="date_start">2010-02-18 15:48:00</field>
|
||||
<field name="constraint_date_end" eval="(DateTime.now()+timedelta(28-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(10-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="responsible_id" ref="res_users_manager0"/>
|
||||
<field eval="7.0" name="duration"/>
|
||||
<field eval="15.0" name="duration"/>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field name="constraint_date_start">2010-02-12 15:49:00</field>
|
||||
<field name="date_end">2010-03-11 15:48:00</field>
|
||||
<field name="constraint_date_start" eval="(DateTime.now()+timedelta(13-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_end" eval="(DateTime.now()+timedelta(25-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
|
||||
<record id="project_phase_webdesign0" model="project.phase">
|
||||
|
@ -299,14 +299,14 @@
|
|||
<field name="name">Web Design </field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="constraint_date_end">2010-04-15 16:08:00</field>
|
||||
<field name="date_start">2010-04-01 16:02:00</field>
|
||||
<field name="constraint_date_end" eval="(DateTime.now()+timedelta(45-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(20-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="responsible_id" ref="res_users_userdesign0"/>
|
||||
<field eval="10.0" name="duration"/>
|
||||
<field eval="20.0" name="duration"/>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field name="constraint_date_start">2010-03-09 16:00:00</field>
|
||||
<field name="date_end">2010-04-10 16:02:00</field>
|
||||
<field name="constraint_date_start" eval="(DateTime.now()+timedelta(25-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_end" eval="(DateTime.now()+timedelta(40-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
|
||||
<record id="project_phase_developmentintegrationandtesting0" model="project.phase">
|
||||
|
@ -314,14 +314,14 @@
|
|||
<field name="name">Development, Integration and Testing</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="constraint_date_end">2010-04-27 17:29:00</field>
|
||||
<field name="date_start">2010-04-12 16:10:00</field>
|
||||
<field name="constraint_date_end" eval="(DateTime.now()+timedelta(57-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(30-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="responsible_id" ref="res_users_manager0"/>
|
||||
<field eval="15.0" name="duration"/>
|
||||
<field eval="22.0" name="duration"/>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field name="constraint_date_start">2010-03-10 16:11:00</field>
|
||||
<field name="date_end">2010-04-26 16:10:00</field>
|
||||
<field name="constraint_date_start" eval="(DateTime.now()+timedelta(35-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_end" eval="(DateTime.now()+timedelta(52-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
|
||||
<record id="project_phase_websitedeployment0" model="project.phase">
|
||||
|
@ -329,14 +329,14 @@
|
|||
<field name="name">Website Deployment</field>
|
||||
<field name="product_uom" ref="product.uom_day"/>
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="constraint_date_end">2010-04-30 16:35:00</field>
|
||||
<field name="date_start">2010-04-26 16:35:00</field>
|
||||
<field name="constraint_date_end" eval="(DateTime.now()+timedelta(63-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="responsible_id" ref="res_users_manager0"/>
|
||||
<field eval="2.0" name="duration"/>
|
||||
<field eval="5.0" name="duration"/>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field name="constraint_date_start">2010-03-10 16:35:00</field>
|
||||
<field name="date_end">2010-04-27 16:34:00</field>
|
||||
<field name="constraint_date_start" eval="(DateTime.now()+timedelta(58-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date_end" eval="(DateTime.now()+timedelta(60-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
|
||||
<!-- Project Resource Allocation -->
|
||||
|
@ -396,11 +396,11 @@
|
|||
|
||||
<!-- Tasks -->
|
||||
<record id="project_task_preparerequirementsdocument0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="date_end">2010-03-02 11:00:00</field>
|
||||
<field eval="24.0" name="planned_hours"/>
|
||||
<field eval="15" name="sequence"/>
|
||||
<field eval="100.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_user0"/>
|
||||
<field name="date_start">2010-02-24 05:00:00</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()-timedelta(70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -408,17 +408,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Prepare Requirements Document</field>
|
||||
<field name="date_deadline">2010-03-08</field>
|
||||
<field eval="24.0" name="total_hours"/>
|
||||
<field eval="24.0" name="remaining_hours"/>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="100.0" name="total_hours"/>
|
||||
<field eval="100.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_informationgatheringandunderstanding0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_definewebsitegoalspurposesandtargetaudience0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="65.0" name="planned_hours"/>
|
||||
<field eval="80.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_useranalyst0"/>
|
||||
<field name="date_start">2010-02-25 15:38:08</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()-timedelta(70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -426,17 +427,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Define Website Goals, Purposes and Target Audience</field>
|
||||
<field name="date_deadline">2010-03-04</field>
|
||||
<field eval="65.0" name="total_hours"/>
|
||||
<field eval="65.0" name="remaining_hours"/>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(10-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="80.0" name="total_hours"/>
|
||||
<field eval="80.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_informationgatheringandunderstanding0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_usecases0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="16.0" name="planned_hours"/>
|
||||
<field eval="17" name="sequence"/>
|
||||
<field eval="40.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdesign0"/>
|
||||
<field name="date_start">2010-02-25 15:42:42</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(48-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -444,9 +446,9 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Use Cases</field>
|
||||
<field name="date_deadline">2010-03-10</field>
|
||||
<field eval="16.0" name="total_hours"/>
|
||||
<field eval="16.0" name="remaining_hours"/>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="40.0" name="total_hours"/>
|
||||
<field eval="40.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_informationgatheringandunderstanding0"/>
|
||||
</record>
|
||||
|
||||
|
@ -454,7 +456,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="25.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userfinance0"/>
|
||||
<field name="date_start">2010-02-25 15:51:00</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(10-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -462,7 +465,7 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Budget Planning</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(18-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="25.0" name="total_hours"/>
|
||||
<field eval="25.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_planning0"/>
|
||||
|
@ -472,7 +475,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="25.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_user0"/>
|
||||
<field name="date_start">2010-02-25 15:54:42</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(10-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -480,7 +484,7 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Quality Planning</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(18-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="25.0" name="total_hours"/>
|
||||
<field eval="25.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_planning0"/>
|
||||
|
@ -490,7 +494,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="20.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_user1"/>
|
||||
<field name="date_start">2010-02-25 15:55:11</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(13-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -498,7 +503,7 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Risk Management Planning</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(20-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="20.0" name="total_hours"/>
|
||||
<field eval="20.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_planning0"/>
|
||||
|
@ -508,7 +513,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="30.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_manager0"/>
|
||||
<field name="date_start">2010-02-25 15:57:48</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(20-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -516,7 +522,7 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Create Project Schedules</field>
|
||||
<field name="date_deadline">2010-03-31</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(25-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="30.0" name="total_hours"/>
|
||||
<field eval="30.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_planning0"/>
|
||||
|
@ -526,7 +532,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="10.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_manager0"/>
|
||||
<field name="date_start">2010-02-25 16:04:16</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(20-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -534,7 +541,7 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Dataflow Design</field>
|
||||
<field name="date_deadline">2010-04-02</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(23-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="10.0" name="total_hours"/>
|
||||
<field eval="10.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_webdesign0"/>
|
||||
|
@ -544,7 +551,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="50.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdesign0"/>
|
||||
<field name="date_start">2010-02-25 16:05:43</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(22-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -552,9 +560,9 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">User Interface Design</field>
|
||||
<field name="date_deadline">2010-04-10</field>
|
||||
<field eval="50.0" name="total_hours"/>
|
||||
<field eval="50.0" name="remaining_hours"/>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(40-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="150.0" name="total_hours"/>
|
||||
<field eval="150.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_webdesign0"/>
|
||||
</record>
|
||||
|
||||
|
@ -562,7 +570,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="40.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdesign0"/>
|
||||
<field name="date_start">2010-02-25 16:06:52</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(30-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -570,7 +579,7 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Task Level WBS</field>
|
||||
<field name="date_deadline">2010-04-07</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(40-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="40.0" name="total_hours"/>
|
||||
<field eval="40.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_webdesign0"/>
|
||||
|
@ -580,7 +589,8 @@
|
|||
<field eval="10" name="sequence"/>
|
||||
<field eval="90.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper0"/>
|
||||
<field name="date_start">2010-02-25 16:11:40</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(30-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -588,16 +598,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modular Programming</field>
|
||||
<field name="date_deadline">2010-04-22</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(50-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="90.0" name="total_hours"/>
|
||||
<field eval="90.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_integratemodules0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="20.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper1"/>
|
||||
<field name="date_start">2010-02-25 16:13:10</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(45-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -605,16 +617,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Integrate Modules</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(53-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="20.0" name="total_hours"/>
|
||||
<field eval="20.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_unittesting0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="30.0" name="planned_hours"/>
|
||||
<field eval="50.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_usertester0"/>
|
||||
<field name="date_start">2010-02-25 16:14:32</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(40-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -622,16 +636,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Unit Testing</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field eval="30.0" name="total_hours"/>
|
||||
<field eval="30.0" name="remaining_hours"/>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="50.0" name="total_hours"/>
|
||||
<field eval="50.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_regressiontest0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="30.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_usertester0"/>
|
||||
<field name="date_start">2010-02-25 16:15:38</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(40-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -639,16 +655,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Regression Test</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="30.0" name="total_hours"/>
|
||||
<field eval="30.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_documentation0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="15.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_demouser1"/>
|
||||
<field name="date_start">2010-02-25 16:17:04</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(40-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -656,16 +674,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Documentation</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="15.0" name="total_hours"/>
|
||||
<field eval="15.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_websitedeployment0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_performancetuning0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="40.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_usertester1"/>
|
||||
<field name="date_start">2010-02-25 16:17:42</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(45-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -673,16 +693,18 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Performance Tuning</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="40.0" name="total_hours"/>
|
||||
<field eval="40.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_deploywebsite0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="5.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper0"/>
|
||||
<field name="date_start">2010-02-25 16:21:15</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(55-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
|
@ -690,171 +712,29 @@
|
|||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Deploy Website</field>
|
||||
<field name="date_deadline">2010-04-26</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(60-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="5.0" name="total_hours"/>
|
||||
<field eval="5.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_websitedeployment0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_presentation0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="5.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_demouser1"/>
|
||||
<field name="date_start">2010-02-25 16:22:09</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Presentation</field>
|
||||
<field name="date_deadline">2010-04-28</field>
|
||||
<field eval="5.0" name="total_hours"/>
|
||||
<field eval="5.0" name="remaining_hours"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_deployment0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="5.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper0"/>
|
||||
<field name="date_start">2010-02-25 16:36:02</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Deployment</field>
|
||||
<field name="date_deadline">2010-04-28</field>
|
||||
<field eval="5.0" name="total_hours"/>
|
||||
<field eval="5.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_websitedeployment0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_presentation1" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="5.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_demouser1"/>
|
||||
<field name="date_start">2010-02-25 16:36:43</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Presentation</field>
|
||||
<field name="date_deadline">2010-04-29</field>
|
||||
<field eval="5.0" name="total_hours"/>
|
||||
<field eval="5.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_websitedeployment0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_modulesintegration0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="20.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper1"/>
|
||||
<field name="date_start">2010-02-25 17:22:46</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modules Integration</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field eval="20.0" name="total_hours"/>
|
||||
<field eval="20.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_unittesting1" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="30.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_usertester0"/>
|
||||
<field name="date_start">2010-02-25 17:34:32</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Unit Testing</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field eval="30.0" name="total_hours"/>
|
||||
<field eval="30.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_modulartesting0" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="20.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper1"/>
|
||||
<field name="date_start">2010-02-25 17:35:46</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modular Testing</field>
|
||||
<field name="date_deadline">2010-04-24</field>
|
||||
<field eval="20.0" name="total_hours"/>
|
||||
<field eval="20.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_documentation1" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="10.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_demouser1"/>
|
||||
<field name="date_start">2010-02-25 17:36:27</field>
|
||||
<field name="state">open</field>
|
||||
<field name="date_start" eval="(DateTime.now()+timedelta(58-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Documentation</field>
|
||||
<field name="date_deadline">2010-04-28</field>
|
||||
<field name="name">Presentation</field>
|
||||
<field name="date_deadline" eval="(DateTime.now()+timedelta(65-70)).strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="10.0" name="total_hours"/>
|
||||
<field eval="10.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_performancetuning1" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field eval="30.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_usertester1"/>
|
||||
<field name="date_start">2010-02-25 17:37:03</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Performance Tuning</field>
|
||||
<field name="date_deadline">2010-04-27</field>
|
||||
<field eval="30.0" name="total_hours"/>
|
||||
<field eval="30.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
</record>
|
||||
|
||||
<record id="project_task_modularprogramming1" model="project.task">
|
||||
<field eval="10" name="sequence"/>
|
||||
<field name="date_end">2010-03-12 18:00:00</field>
|
||||
<field eval="100.0" name="planned_hours"/>
|
||||
<field name="user_id" ref="res_users_userdeveloper0"/>
|
||||
<field name="date_start">2010-03-01 12:00:00</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project_project_openerpwebsitedevelopment0"/>
|
||||
<field eval="[(6, 0, [])]" name="child_ids"/>
|
||||
<field eval="[(6, 0, [])]" name="parent_ids"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="name">Modular Programming</field>
|
||||
<field name="date_deadline">2010-04-22</field>
|
||||
<field eval="100.0" name="total_hours"/>
|
||||
<field eval="100.0" name="remaining_hours"/>
|
||||
<field name="phase_id" ref="project_phase_developmentintegrationandtesting0"/>
|
||||
<field name="phase_id" ref="project_phase_websitedeployment0"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -215,7 +215,7 @@ class project_task(osv.osv):
|
|||
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
|
||||
if not context:
|
||||
context = {}
|
||||
if not context.get('planning'):
|
||||
if not context.get('planning', False):
|
||||
return super(project_task,self).search(cr, user, args, offset, limit, order, context)
|
||||
cr.execute(" SELECT t.id, t.name \
|
||||
from project_task t \
|
||||
|
@ -529,7 +529,7 @@ WHERE user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.i
|
|||
project_task
|
||||
WHERE
|
||||
''' + where + '''
|
||||
project_id IN (select id from project_project where category_id=%s) AND
|
||||
project_id IN (select id from project_project where analytic_account_id=%s) AND
|
||||
date_end>=%s AND
|
||||
date_end<=%s''', (
|
||||
line.account_id.id,
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<form string="Tasks">
|
||||
<group colspan="4" col="2">
|
||||
<field name="name" select="1"/>
|
||||
<field name="project_id" required="1" select="1" domain="[('category_id','=',parent.account_id)]"/>
|
||||
<field name="project_id" required="1" select="1" domain="[('analytic_account_id','=',parent.account_id)]"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<field name="date_deadline"/>
|
||||
|
@ -123,7 +123,7 @@
|
|||
<field name="sequence"/>
|
||||
</group>
|
||||
<separator string="Miscelleanous" colspan="4"/>
|
||||
<field name="type"/>
|
||||
<field name="type_id"/>
|
||||
<field name="active"/>
|
||||
<field name="partner_id"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
|
|
|
@ -69,7 +69,7 @@ class project_work(osv.osv):
|
|||
vals_line['product_id'] = result['product_id']
|
||||
vals_line['date'] = vals['date'][:10]
|
||||
vals_line['unit_amount'] = vals['hours']
|
||||
acc_id = obj_task.project_id.category_id.id
|
||||
acc_id = obj_task.project_id.analytic_account_id.id
|
||||
vals_line['account_id'] = acc_id
|
||||
res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id)
|
||||
if res.get('value'):
|
||||
|
@ -165,7 +165,7 @@ class task(osv.osv):
|
|||
task_obj_l = self.browse(cr, uid, ids, context)
|
||||
if (vals.has_key('project_id') and vals['project_id']):
|
||||
project_obj = self.pool.get('project.project').browse(cr, uid, vals['project_id'])
|
||||
acc_id = project_obj.category_id.id
|
||||
acc_id = project_obj.analytic_account_id.id
|
||||
|
||||
for task_obj in task_obj_l:
|
||||
if len(task_obj.work_ids):
|
||||
|
@ -188,7 +188,7 @@ class project_project(osv.osv):
|
|||
context = {}
|
||||
result = []
|
||||
for project in self.browse(cr, user, ids, context):
|
||||
name = "[%s] %s" % (project.category_id and project.category_id.code or '?', project.name)
|
||||
name = "[%s] %s" % (project.analytic_account_id and project.analytic_account_id.code or '?', project.name)
|
||||
result.append((project.id, name))
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in New Issue