[FIX] project planning
bzr revid: mra@mra-laptop-20100715133443-0fr1r76h0jof8n11
This commit is contained in:
@@ -214,7 +214,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 = context
|
||||
context = {}
|
||||
if not context.get('planning'):
|
||||
return super(project_task,self).search(cr, user, args, offset, limit, order, context)
|
||||
cr.execute(" SELECT t.id, t.name \
|
||||
@@ -498,7 +498,7 @@ class report_account_analytic_planning_stat(osv.osv):
|
||||
WHERE user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.id, line.account_id.id, line.planning_id.date_from, line.planning_id.date_to))
|
||||
else:
|
||||
cr.execute('SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s', (line.account_id.id, line.planning_id.date_from, line.planning_id.date_to))
|
||||
|
||||
|
||||
sum = cr.fetchone()
|
||||
if sum and sum[0]:
|
||||
result[line.id] = sum[0] * div2
|
||||
|
||||
Reference in New Issue
Block a user