functional field odoo type float , new api
<p>I'm trying to make an operation * on a field , i have tried functional fields but it didn't work , now i'm trying this @api.depends api , does it work with odoo 8 ? it still not work </p>

<pre><code>class fleuret(osv.Model):           
    _inherit = "mrp.bom.line"
    _columns = {
                'unit_price' : fields.float(string='unit price', related='product_id.lst_price', store=True, readonly=True),
                'amount' : fields.Float(string='price ',store=True, readonly=True,digits=dp.get_precision('Account'),compute='_compute_price'),
                }
    @api.one       
    @api.depends('product_qty')
    def _compute_price(self):
        self.amount =(unit_price * self.product_qty)
</code></pre>