[FIX] orm: do not drop foreign keys of transient models
authorMartin Trigaux <mat@openerp.com>
Mon, 15 Sep 2014 13:24:43 +0000 (15:24 +0200)
committerMartin Trigaux <mat@openerp.com>
Mon, 15 Sep 2014 13:24:53 +0000 (15:24 +0200)
commit32f51689742cdec79ad2bc41ac37bb53fbb6f199
treef002f740ac95ecad4f87e072fc7cface7d7fc138
parent42680c9906125a034c2df2d1dd106b00212a27fc
[FIX] orm: do not drop foreign keys of transient models

During the update of a module, the existing foreign keys are dropped if they have a different ondelete_rule than the one specified on the field.
The foreign keys for many2one transiant -> non-transiant are created with cascade rule by default (see `m2o_add_foreign_key_checked` method) so the check needs to be realised in the same conditions.
openerp/osv/orm.py