[IMP] models._auto_init: avoid writing `False` default for boolean fields
authorOlivier Dony <odo@openerp.com>
Mon, 11 Aug 2014 09:11:03 +0000 (11:11 +0200)
committerOlivier Dony <odo@openerp.com>
Mon, 11 Aug 2014 09:34:12 +0000 (11:34 +0200)
commitf28be81bc7c7fef3cfb57941de57bc05f767933e
treeeed7233d1c4d36ee15fdfd92c655df539f2c5369
parent765beaa0c946d0ad3133a23859bc471afade110f
[IMP] models._auto_init: avoid writing `False` default for boolean fields

Boolean fields always default to False in 8.0,
even when they do not have explicit default values.
This causes extra queries in the form:
  UPDATE <table> SET <bool_field> = false
      WHERE <bool_field> IS NULL;

Those are not necessary as the ORM automatically
folds NULL booleans to False, and can be very
expensive on tables with several million rows,
as the whole table may sometimes need to be
rewritten (can take dozens of minutes)
openerp/models.py