error in open erp
<p>I have some problem with my project:</p>

<pre><code>def get_timein(self, cr, uid, ids, context={}):
    obj = self.browse(cr, uid, ids, context=context)[0]
    timein = str(datetime.now())
    self.write(cr, uid, ids, {'time_in':timein }, context=context)
    return 1

def get_timeout(self, cr, uid, ids, context={}):
    obj=self.browse(cr, uid, ids, context=context)[0]
    timeout=str(datetime.now())
    self.write(cr, uid, ids, {'time_out':timeout }, context=context)
    return 1

def cho_dangnhap(self, cr, uid, ids, context={}):
    self.pool.get('x_luong').write(cr, uid, ids, {'state':'dangnhap'})
    get_timein(cr,uid,ids)
    return 1

def cho_rave(self, cr, uid, ids, context={}):
    self.pool.get('x_luong').write(cr, uid, ids, {'state':'rave'})
    get_timeout(cr, uid, ids)
</code></pre>

<p>I am getting this error:</p>

<pre><code>NameError: global name 'get_timeout' is not defined
</code></pre>
