odoo/openerp/addons/base
Nicolas Lempereur e33baecfa3 [FIX] osv: binary size already in human format
In version 8.0, postgresql's pg_size_pretty function is used
(http://www.postgresql.org/docs/9.4/static/functions-admin.html) when
getting the size of a binary field when reading if `bin_size`
or `bin_size_[col_name]` is set in the context.

So in 8.0 the size of a binary field get units bytes, kB, MB, GB and TB
which was not taken into account. e.g: '5.3 GB'.

This fix uses the size of the string to choose to differenciate the two.

e.g: '10000 bytes' (the longest size) will be returned directly, but
for something longer the human size of the content length will be
returned.

There is a corner case if a file is shorter than 12 bytes but
it is an enough of a small scenario with small implications that it is
deemed acceptable.

closes #7485
opw-644085
2015-07-07 19:17:43 +02:00
..
i18n [I18N] Update translation terms from Transifex 2015-07-05 01:52:32 +02:00
ir [FIX] osv: binary size already in human format 2015-07-07 19:17:43 +02:00
module [FIX] base: verifying python external dependencies was failing on OSX. 2015-07-03 13:55:52 +02:00
report [REF] OpenERP --> Odoo in various UI texts (2) 2014-07-18 14:59:38 +02:00
res [FIX] mail: backport of rev 752a07c to 8.0 2015-07-07 08:52:44 +02:00
rng [ADD] views documentation 2014-08-28 15:02:33 +02:00
security [FIX] base, mail: access to ir.config_parameter is now handled by by 2014-08-29 12:01:50 +02:00
static [FIX] openerp: fixed stretching of module icons in kanban view 2015-02-24 13:45:23 +01:00
tests [FIX] mail: backport of rev 752a07c to 8.0 2015-07-07 08:52:44 +02:00
workflow [MERGE] forward port of branch saas-3 up to b79f64f 2015-03-18 13:16:23 +01:00
__init__.py [FIX] nonsensical import? 2014-03-10 10:59:18 +01:00
__openerp__.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
base.sql [FIX] Size for icon field of ir_module_module table in base.sql 2014-09-04 01:46:44 +02:00
base_data.xml [Fix] Some missed frontend openerp to odoo changes 2015-01-12 16:17:12 +01:00
base_demo.xml [IMP] account: better fix than edbd0df for reconciliation test 2015-01-05 11:30:49 +01:00
base_menu.xml [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00