Activity log for bug #976909

Date Who What changed Old value New value Message
2012-04-09 00:19:22 GEM bug added bug
2012-04-09 00:21:18 GEM description Hi, this bug is for web client 6.0 (perhaps for 5.0 too) I saw some bugs with this message "object of type 'int' has no len()" , but seems to be not this I had, I explain : I have 2 classes. For each class, I have 2 fields type many2many (then, there is a total of 4 m2m for the 2 classes) I want to update values of the first class with values of the second class (there is a common key between them naturally), the first field of the class one is updated with the first field of the class two, the second field of the class one is updated with the second field of the class two, using the common key of the 2 classes. to update the first class with the second I use an on_change method, inwhich I return the result with return {'value': res} This return works with client gtk, but with client web I have this error when I do "save" for the form : 84 if (self.ids or self.id) and self.count == 0: 85 if self.ids and len(self.ids) < self.limit: 86 self.count = len(self.ids) 87 else: self = Screen, self.ids = 11, builtin len = <built-in function len>, self.limit = 50 <type 'exceptions.TypeError'>: object of type 'int' has no len() args = ("object of type 'int' has no len()",) message = "object of type 'int' has no len()" If I try to return just one field (the one or the second), it works in client web too. I find a patch to solve this bug by changing in client web (in fact I do a list of integer which can be read by method len() : in openerp-web/addons/openerp/widgets/screen.py line 85 : - if self.ids and len(self.ids) < self.limit: +if isinstance(self.ids, (int, long)): + self.ids = [self.ids] +if self.ids and len(self.ids) < self.limit: Bye Hi, this bug is for web client 6.0 (perhaps for 5.0 too) I saw some bugs with this message "object of type 'int' has no len()" , but seems to be not this I had, I explain : I have 2 classes. For each class, I have 2 fields type many2many (then, there is a total of 4 m2m for the 2 classes) I want to update values of the first class with values of the second class (there is a common key between them naturally), the first field of the class one is updated with the first field of the class two, the second field of the class one is updated with the second field of the class two, using the common key of the 2 classes. to update the first class with the second I use an on_change method, inwhich I return the result with return {'value': res} This return works with client gtk, but with client web I have this error when I do "save" for the form :    84 if (self.ids or self.id) and self.count == 0:    85 if self.ids and len(self.ids) < self.limit:    86 self.count = len(self.ids)    87 else: self = Screen, self.ids = 11, builtin len = <built-in function len>, self.limit = 50 <type 'exceptions.TypeError'>: object of type 'int' has no len()       args = ("object of type 'int' has no len()",)       message = "object of type 'int' has no len()" If I try to return just one field (the one or the second), it works in client web too. I find a patch to solve this bug by changing in client web (in fact I do a list of integer which can be read by method len() : in openerp-web/addons/openerp/widgets/screen.py line 85 : -if self.ids and len(self.ids) < self.limit: +if isinstance(self.ids, (int, long)): + self.ids = [self.ids] +if self.ids and len(self.ids) < self.limit: Bye
2012-04-09 00:22:55 GEM description Hi, this bug is for web client 6.0 (perhaps for 5.0 too) I saw some bugs with this message "object of type 'int' has no len()" , but seems to be not this I had, I explain : I have 2 classes. For each class, I have 2 fields type many2many (then, there is a total of 4 m2m for the 2 classes) I want to update values of the first class with values of the second class (there is a common key between them naturally), the first field of the class one is updated with the first field of the class two, the second field of the class one is updated with the second field of the class two, using the common key of the 2 classes. to update the first class with the second I use an on_change method, inwhich I return the result with return {'value': res} This return works with client gtk, but with client web I have this error when I do "save" for the form :    84 if (self.ids or self.id) and self.count == 0:    85 if self.ids and len(self.ids) < self.limit:    86 self.count = len(self.ids)    87 else: self = Screen, self.ids = 11, builtin len = <built-in function len>, self.limit = 50 <type 'exceptions.TypeError'>: object of type 'int' has no len()       args = ("object of type 'int' has no len()",)       message = "object of type 'int' has no len()" If I try to return just one field (the one or the second), it works in client web too. I find a patch to solve this bug by changing in client web (in fact I do a list of integer which can be read by method len() : in openerp-web/addons/openerp/widgets/screen.py line 85 : -if self.ids and len(self.ids) < self.limit: +if isinstance(self.ids, (int, long)): + self.ids = [self.ids] +if self.ids and len(self.ids) < self.limit: Bye Hi, this bug is for web client 6.0 (perhaps for 5.0 too) I saw some bugs with this message "object of type 'int' has no len()" , but seems to be not this I had, I explain : I have 2 classes. For each class, I have 2 fields type many2many (then, there is a total of 4 m2m for the 2 classes) I want to update values of the first class with values of the second class (there is a common key between them naturally), the first field of the class one is updated with the first field of the class two, the second field of the class one is updated with the second field of the class two, using the common key of the 2 fields of the two classes. to update the first class with the second I use an on_change method, inwhich I return the result with return {'value': res} This return works with client gtk, but with client web I have this error when I do "save" for the form :    84 if (self.ids or self.id) and self.count == 0:    85 if self.ids and len(self.ids) < self.limit:    86 self.count = len(self.ids)    87 else: self = Screen, self.ids = 11, builtin len = <built-in function len>, self.limit = 50 <type 'exceptions.TypeError'>: object of type 'int' has no len()       args = ("object of type 'int' has no len()",)       message = "object of type 'int' has no len()" If I try to return just one field (the one or the second), it works in client web too. I find a patch to solve this bug by changing in client web (in fact I do a list of integer which can be read by method len() : in openerp-web/addons/openerp/widgets/screen.py line 85 : -if self.ids and len(self.ids) < self.limit: +if isinstance(self.ids, (int, long)): + self.ids = [self.ids] +if self.ids and len(self.ids) < self.limit: Bye
2012-04-09 00:24:15 GEM description Hi, this bug is for web client 6.0 (perhaps for 5.0 too) I saw some bugs with this message "object of type 'int' has no len()" , but seems to be not this I had, I explain : I have 2 classes. For each class, I have 2 fields type many2many (then, there is a total of 4 m2m for the 2 classes) I want to update values of the first class with values of the second class (there is a common key between them naturally), the first field of the class one is updated with the first field of the class two, the second field of the class one is updated with the second field of the class two, using the common key of the 2 fields of the two classes. to update the first class with the second I use an on_change method, inwhich I return the result with return {'value': res} This return works with client gtk, but with client web I have this error when I do "save" for the form :    84 if (self.ids or self.id) and self.count == 0:    85 if self.ids and len(self.ids) < self.limit:    86 self.count = len(self.ids)    87 else: self = Screen, self.ids = 11, builtin len = <built-in function len>, self.limit = 50 <type 'exceptions.TypeError'>: object of type 'int' has no len()       args = ("object of type 'int' has no len()",)       message = "object of type 'int' has no len()" If I try to return just one field (the one or the second), it works in client web too. I find a patch to solve this bug by changing in client web (in fact I do a list of integer which can be read by method len() : in openerp-web/addons/openerp/widgets/screen.py line 85 : -if self.ids and len(self.ids) < self.limit: +if isinstance(self.ids, (int, long)): + self.ids = [self.ids] +if self.ids and len(self.ids) < self.limit: Bye Hi, this bug is for web client 6.0 (perhaps for 5.0 too) I saw some bugs with this message "object of type 'int' has no len()" , but seems to be not this I had, I explain : I have 2 classes. For each class, I have 2 fields type many2many (then, there is a total of 4 m2m for the 2 classes) I want to update values of the first class with values of the second class (there is a common key between them naturally), the first field of the class one is updated with the first field of the class two, the second field of the class one is updated with the second field of the class two, using the common key of the 2 fields of the two classes (the key is a type integer). to update the first class with the second I use an on_change method, inwhich I return the result with return {'value': res} This return works with client gtk, but with client web I have this error when I do "save" for the form :    84 if (self.ids or self.id) and self.count == 0:    85 if self.ids and len(self.ids) < self.limit:    86 self.count = len(self.ids)    87 else: self = Screen, self.ids = 11, builtin len = <built-in function len>, self.limit = 50 <type 'exceptions.TypeError'>: object of type 'int' has no len()       args = ("object of type 'int' has no len()",)       message = "object of type 'int' has no len()" If I try to return just one field (the one or the second), it works in client web too. I find a patch to solve this bug by changing in client web (in fact I do a list of integer which can be read by method len() : in openerp-web/addons/openerp/widgets/screen.py line 85 : -if self.ids and len(self.ids) < self.limit: +if isinstance(self.ids, (int, long)): + self.ids = [self.ids] +if self.ids and len(self.ids) < self.limit: Bye
2012-04-12 11:25:48 Amit Parik openobject-client-web: status New Won't Fix
2012-04-14 02:38:20 Sukmaya bug added subscriber Sukmaya
2012-04-14 02:39:00 Sukmaya removed subscriber Sukmaya
2012-04-14 02:39:03 Sukmaya bug added subscriber Sukmaya