'test monetary fields'

def test_20_monetary(self):

    record = self.env['test_new_api.mixed'].create({})
    self.assertTrue(record.currency_id)
    self.assertEqual(record.currency_id.rounding, 0.01)
    record.amount = 14.7
    self.assertNotEqual(record.amount, 14.7)
    self.assertEqual(record.amount, 14.700000000000001)
    self.cr.execute('SELECT    amount    FROM    test_new_api_mixed    WHERE    id=%s', (record.id,))
    (amount,) = self.cr.fetchone()
    self.assertEqual(amount, 14.7)
