[FIX] sale: do not crash if no value set
If the user does not set any value, the conversion of an empty string to a float generates a traceback.
This commit is contained in:
@@ -62,4 +62,4 @@ class crm_team(osv.Model):
|
||||
}
|
||||
|
||||
def update_invoiced_target(self, cr, uid, id, value, context=None):
|
||||
return self.write(cr, uid, [id], {'invoiced_target': round(float(value))}, context=context)
|
||||
return self.write(cr, uid, [id], {'invoiced_target': round(float(value or 0))}, context=context)
|
||||
|
||||
Reference in New Issue
Block a user