[FIX] project_timesheet : yes (100 %) remove by default when choose a partner
bzr revid: tfr@openerp.com-20110106134403-fgkaax17gngxouds
This commit is contained in:
parent
3917684c06
commit
e3f6b6a3d1
|
@ -28,16 +28,7 @@ from tools.translate import _
|
|||
|
||||
class project_project(osv.osv):
|
||||
_inherit = 'project.project'
|
||||
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
|
||||
result = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context=context)
|
||||
if result.get('value', False):
|
||||
try:
|
||||
d = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')
|
||||
if d:
|
||||
result['value']['to_invoice'] = d[1]
|
||||
except ValueError, e:
|
||||
pass
|
||||
return result
|
||||
|
||||
project_project()
|
||||
|
||||
class project_work(osv.osv):
|
||||
|
|
Loading…
Reference in New Issue