diff --git a/odoo/models.py b/odoo/models.py index 2090ee93f6a..e5d81a5ac3f 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -2040,7 +2040,7 @@ class BaseModel(object): _logger.debug("column %s is in the table %s but not in the corresponding object %s", row['attname'], self._table, self._name) if row['attnotnull']: - tools.drop_not_null(self._cr, self._table, row['attname']) + tools.drop_not_null(cr, self._table, row['attname']) @api.model_cr_context def _init_column(self, column_name):