diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 0f53254ba0..d81a32fee3 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -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, ' \