[IMP] ORM: Coalesce NULL boolean values to false when generating ORDER BY
authorOlivier Dony <odo@openerp.com>
Tue, 12 Aug 2014 10:07:10 +0000 (12:07 +0200)
committerOlivier Dony <odo@openerp.com>
Tue, 12 Aug 2014 10:32:35 +0000 (12:32 +0200)
commit3f91f85f60eaa15cad89d76bf4062db964e7ee6c
tree34de18a610df3e0c3c782bd80b08c751ea1e109b
parent8c7519ccadc43fd3264cfaba3aa61282eb15b700
[IMP] ORM: Coalesce NULL boolean values to false when generating ORDER BY

After commit f28be81, boolean columns may have more
NULL entries than before. In the (rare) cases where
a boolean column was used for an ORDER clause
(e.g. in the /shop page of website_sale), this
causes a change of the resulting ordering.

By coalescing NULL values to false in SQL,
we make the ordering consistent with what the
framework does for domain expressions with booleans,
and when reading boolean values, that is, NULL is
the same as False.
openerp/models.py