format from tuple to float in python?
<pre><code>def tong_thoigian (self,kr,uid,ids,context={}):
    obj=self.browse(kr,uid,ids,context=context)[0]
    kr.execute('''select name,giolam from x_giolam where name=%s'''%(obj.ma_luong))
    kq=kr.fetchall()
    tong=0.00000
    for i in kq:
          tong+=kq[1]                      
    self.write(kr,uid,ids,{'tonggiolam':tong},context=context)
</code></pre>

<p>the error is:</p>

<pre><code>TypeError: unsupported operand type(s) for +=: 'float' and 'tuple'
</code></pre>

<p>I think you don't care about the table and database.... because the function that means get mayny row in table <code>x_giolam</code> have the atribute <code>giolam</code> and sum it...and then we have the salary of a staff.</p>
