← Back to team overview

openerp-dev-web team mailing list archive

[Bug 718989] [NEW] [Trunk] related fields on a integer, display false for value 0

 

Vinay Rana (openerp) (vra-openerp) has assigned this bug to you for OpenERP Web Client:

How reproduce the bug

Create a related fields to a integer fields,  set value of the field to
0, related fields show "false"

In bin/ovs/fields.py

class related function _fnct_read:

near line 902
if not t_data[self.arg[i]]:
    t_data = False

Change by
if not (t_data[self.arg[i]] or (self._type =='integer' and isinstance(t_data[self.arg[i]],int))):
    t_data = False

That allow integer 0 to not be replace by False


But is not enougt

near line 914
elif t_data:
    res[data.id] = t_data
change by

elif t_data or t_data==0:
    res[data.id] = t_data

That allow 0 to be return as value


Note: is not a big problem, but when a secretary see a False in a field when she supposed to see a 0, she not understand, she dont know in Programming 0 means False.

** Affects: openobject-client-web
     Importance: Low
     Assignee: OpenERP SA's Web Client R&D (openerp-dev-web)
         Status: Confirmed

-- 
[Trunk] related fields on a integer, display false for value 0
https://bugs.launchpad.net/bugs/718989
You received this bug notification because you are a member of OpenERP SA's Web Client R&D, which is a bug assignee.