[IMP]make ratio null and untick timesheet when untick invoice on timesheet option on contract

bzr revid: darshankalola@gmail.com-20130614134423-7itt49kbf09nq36t
This commit is contained in:
Darshan Kalola (OpenERP Trainee)
2013-06-14 19:14:23 +05:30
parent a003381647
commit 13ac97438d
@@ -621,7 +621,7 @@ class account_analytic_account(osv.osv):
def onchange_invoice_on_timesheets(self, cr, uid, ids, invoice_on_timesheets, context=None):
if not invoice_on_timesheets:
return {}
return {'value': {'use_timesheets':False, 'to_invoice':False}}
result = {'value': {'use_timesheets': True}}
try:
to_invoice = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')