[IMP]default project_id added.
bzr revid: kbh@tinyerp.com-20120330124312-loiwpuur2hq8nivz
This commit is contained in:
parent
3d4276503d
commit
f782026d24
|
@ -758,6 +758,7 @@ class task(osv.osv):
|
|||
'sequence': 10,
|
||||
'active': True,
|
||||
'user_id': lambda obj, cr, uid, context: uid,
|
||||
'project_id':lambda self, cr, uid, context: context.get('active_id',False),
|
||||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'project.task', context=c)
|
||||
}
|
||||
|
||||
|
|
|
@ -255,7 +255,9 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
if user.context_project_id:
|
||||
return user.context_project_id.id
|
||||
return False
|
||||
else:
|
||||
project_id = context.get('active_id',False)
|
||||
return project_id
|
||||
|
||||
def on_change_project(self, cr, uid, ids, project_id, context=None):
|
||||
return {}
|
||||
|
|
|
@ -123,6 +123,7 @@ class project_phase(osv.osv):
|
|||
_defaults = {
|
||||
'state': 'draft',
|
||||
'sequence': 10,
|
||||
'project_id':lambda self, cr, uid, context: context.get('active_id',False),
|
||||
'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Day'))], context=c)[0]
|
||||
}
|
||||
_order = "project_id, date_start, sequence"
|
||||
|
|
Loading…
Reference in New Issue