Formatting converted the decimal part into an integer, dropping all leading 0s and failing to reinsert them. The conversion also lead to compounded errors, casting 0.1100 into 0.10999 (something like that). Replace this by a straight float formatting via _.sprintf and the slicing of the decimal part from the resulting string (Math.abs and %1 clamp the value to format to the [0, 1[ range, ensuring we just need to slice off the first two characters). Also add some tests. lp bug: https://launchpad.net/bugs/879355 fixed bzr revid: xmo@openerp.com-20111021120741-813im5bzup7vho1f
51 lines
2.4 KiB
HTML
51 lines
2.4 KiB
HTML
<!DOCTYPE html>
|
|
<html style="height: 100%">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<title>OpenERP</title>
|
|
<link rel="shortcut icon" href="/web/static/src/img/favicon.ico" type="image/x-icon"/>
|
|
|
|
<link rel="stylesheet" href="/web/static/lib/qunit/qunit-2011-23-22.css">
|
|
<script src="/web/static/lib/qunit/qunit-2011-23-22.js" type="text/javascript"></script>
|
|
|
|
<script src="/web/static/lib/underscore/underscore.js" type="text/javascript"></script>
|
|
<script src="/web/static/lib/underscore/underscore.string.js" type="text/javascript"></script>
|
|
|
|
<!-- jquery -->
|
|
<script src="/web/static/lib/jquery/jquery-1.6.2.js"></script>
|
|
<script src="/web/static/lib/jquery.ui/js/jquery-ui-1.8.9.custom.min.js"></script>
|
|
|
|
<script src="/web/static/lib/datejs/globalization/en-US.js"></script>
|
|
<script src="/web/static/lib/datejs/core.js"></script>
|
|
<script src="/web/static/lib/datejs/parser.js"></script>
|
|
<script src="/web/static/lib/datejs/sugarpak.js"></script>
|
|
<script src="/web/static/lib/datejs/extras.js"></script>
|
|
|
|
<script src="/web/static/lib/qweb/qweb2.js"></script>
|
|
|
|
<script src="/web/static/src/js/boot.js"></script>
|
|
<script src="/web/static/src/js/core.js"></script>
|
|
<script src="/web/static/src/js/dates.js"></script>
|
|
<script src="/web/static/src/js/formats.js"></script>
|
|
<script src="/web/static/src/js/chrome.js"></script>
|
|
<script src="/web/static/src/js/data.js"></script>
|
|
<script src="/web/static/src/js/views.js"></script>
|
|
<script src="/web/static/src/js/search.js"></script>
|
|
<script src="/web/static/src/js/view_form.js"></script>
|
|
<script src="/web/static/src/js/view_list.js"></script>
|
|
</head>
|
|
<body id="oe" class="openerp">
|
|
<h1 id="qunit-header">OpenERP web Test Suite</h1>
|
|
<h2 id="qunit-banner"></h2>
|
|
<div id="qunit-testrunner-toolbar"></div>
|
|
<h2 id="qunit-userAgent"></h2>
|
|
<ol id="qunit-tests"></ol>
|
|
<div id="qunit-fixture"></div>
|
|
</body>
|
|
<script type="text/javascript" src="/web/static/test/class.js"></script>
|
|
<script type="text/javascript" src="/web/static/test/registry.js"></script>
|
|
<script type="text/javascript" src="/web/static/test/form.js"></script>
|
|
<script type="text/javascript" src="/web/static/test/list-utils.js"></script>
|
|
<script type="text/javascript" src="/web/static/test/formats.js"></script>
|
|
</html>
|