[FIX] Missing part of the revision 5f6fc473

This commit is contained in:
Samus CTO 2014-08-25 15:24:21 +02:00 committed by Martin Trigaux
parent 18068a5e79
commit c6df857533
1 changed files with 1 additions and 1 deletions

View File

@ -2675,7 +2675,7 @@ class BaseModel(object):
dest_model = self.pool[f._obj]
ref = dest_model._table
# ir_actions is inherited so foreign key doesn't work on it
if ref != 'ir_actions':
if dest_model._auto and ref != 'ir_actions':
self._m2o_add_foreign_key_checked(k, dest_model, f.ondelete)
if f.select:
cr.execute('CREATE INDEX "%s_%s_index" ON "%s" ("%s")' % (self._table, k, self._table, k))