[FIX] fields: add a type to field Id; this fixes #990
authorRaphael Collet <rco@openerp.com>
Tue, 8 Jul 2014 11:29:45 +0000 (13:29 +0200)
committerRaphael Collet <rco@openerp.com>
Tue, 8 Jul 2014 11:29:45 +0000 (13:29 +0200)
openerp/fields.py

index ede066e..ce28041 100644 (file)
@@ -1542,6 +1542,9 @@ class Id(Field):
     store = True
     readonly = True
 
+    def __init__(self, string=None, **kwargs):
+        super(Id, self).__init__(type='integer', string=string, **kwargs)
+
     def to_column(self):
         return fields.integer('ID')