[FIX] orm: set default before removing magic fields
authordhr-odoo <dhr@tinyerp.com>
Wed, 9 Jul 2014 07:23:36 +0000 (12:53 +0530)
committerMartin Trigaux <mat@openerp.com>
Fri, 1 Aug 2014 13:37:01 +0000 (15:37 +0200)
commiteb775fc2ead0133f735d94af8b0fa275827d4bbe
treeba57ef9272357330978714c55f11e5962c594e7d
parent7c5bf67a5f9378fe4ae01eeffff24889f7bdcdc5
[FIX] orm: set default before removing magic fields

When a record is created, the magic fields (id, create_date,...) are first removed from the vals as the user should not set a value for these.
However if a value for this is given in default value (e.g. defined in an ir.value), the creation would crash (sql error : column specified more than once) as the magic column would be added again.
openerp/osv/orm.py