Update ir_model with object information
This commit is contained in:
1 parent
675d808f93
commit
f3bd15703b
1 file changed
+8
-1
+8
-1
@@ -310,7 +310,14 @@ class ORM(object):
|
||||
module_name))
|
||||
cursor.execute("SELECT id FROM ir_model WHERE model = %s",
|
||||
(self._name,))
|
||||
(model_id,) = cursor.fetchone()
|
||||
(model_id,) = cursor.fetchone()
|
||||
else:
|
||||
(model_id,) = cursor.fetchone()
|
||||
cursor.execute('UPDATE ir_model ' \
|
||||
'SET name = %s, ' \
|
||||
'info = %s ' \
|
||||
'WHERE id = %s',
|
||||
(self._description, self.__doc__, model_id))
|
||||
|
||||
cursor.execute('SELECT f.id AS id, f.name AS name, ' \
|
||||
'f.field_description AS field_description, ' \
|
||||
|
||||
Reference in new issue
Block a user