[FIX] project_timesheet : yes (100 %) remove by default when choose a partner

bzr revid: tfr@openerp.com-20110106134403-fgkaax17gngxouds
This commit is contained in:
Thibault Francois 2011-01-06 14:44:03 +01:00
parent 3917684c06
commit e3f6b6a3d1
1 changed files with 1 additions and 10 deletions

View File

@ -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):