[FIX] orm: avoir errors reading twice a field
authorMartin Trigaux <mat@openerp.com>
Thu, 12 Jun 2014 14:14:41 +0000 (16:14 +0200)
committerMartin Trigaux <mat@openerp.com>
Thu, 12 Jun 2014 14:14:41 +0000 (16:14 +0200)
commit86acc1a62ffd1bdbbf79a6d315287baf5a5cea2b
treede2f4c5bba68d20d0b0ae622e801c0a1d2f5060b
parent0b4921e4d6c075ff47dbe3356433b698b61008b3
[FIX] orm: avoir errors reading twice a field

_read_flat: remove duplicated fields in read call
get many2one: as False is instance of int, check the value of x first to avoid calling a name_get with a list of False

When we were reading twice a m2o field where at least one result is null, the first call to name_get would set the value to False instead of None and then accepted by the filter 'isinstance(x, (int,long))'
openerp/osv/fields.py
openerp/osv/orm.py