[FIX] orm: remove unused module parameter when creating constraints

This argument was not always present in the context
(e.g when _auto_init is invoked for newly created
custom fields via ir.model.field.create()), and was
thus preventing the creation of custom fields.
It was currently unused, and may be reintroduced
soon after the cleanup of model metadata storage.

bzr revid: odo@openerp.com-20120606141908-bdqxsarfb61yfw8m
This commit is contained in:
Olivier Dony
2012-06-06 16:19:08 +02:00
parent a0225b6c77
commit 484cf746a5
+2 -2
View File
@@ -3076,7 +3076,7 @@ class BaseModel(object):
cr.commit() # start a new transaction
self._add_sql_constraints(cr, context["module"])
self._add_sql_constraints(cr)
if create:
self._execute_sql(cr)
@@ -3203,7 +3203,7 @@ class BaseModel(object):
_schema.debug("Create table '%s': m2m relation between '%s' and '%s'", m2m_tbl, self._table, ref)
def _add_sql_constraints(self, cr, module):
def _add_sql_constraints(self, cr):
"""
Modify this model's database table constraints so they match the one in