Update ir_model with object information

This commit is contained in:
Cédric Krier committed 2008-09-05 00:09:36 +02:00
1 parent 675d808f93
commit f3bd15703b
1 file changed
+8 -1
+8 -1
View File
@@ -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, ' \