Activity log for bug #558528

Date Who What changed Old value New value Message
2010-04-08 16:37:09 Alberto Luengo Cabanillas (Pexego) bug added bug
2010-04-08 16:37:09 Alberto Luengo Cabanillas (Pexego) attachment added orm.diff http://launchpadlibrarian.net/43448221/orm.diff
2010-04-09 15:09:45 Jay Vora (Serpent Consulting Services) openobject-server: milestone 6.0
2010-04-28 06:39:42 Jay Vora (Serpent Consulting Services) description Hi community. Using OpenERP server version 5.2dev. and trying to create a new project (not filling all fields), I found myself with following error: [2010-04-08 17:36:01,799] ERROR:web-services:[01]: Traceback (most recent call last): [2010-04-08 17:36:01,800] ERROR:web-services:[02]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/osv.py", line 57, in wrapper [2010-04-08 17:36:01,800] ERROR:web-services:[03]: return f(self, dbname, *args, **kwargs) [2010-04-08 17:36:01,800] ERROR:web-services:[04]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/osv.py", line 120, in execute [2010-04-08 17:36:01,800] ERROR:web-services:[05]: res = pool.execute_cr(cr, uid, obj, method, *args, **kw) [2010-04-08 17:36:01,800] ERROR:web-services:[06]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/osv.py", line 110, in execute_cr [2010-04-08 17:36:01,801] ERROR:web-services:[07]: return getattr(object, method)(cr, uid, *args, **kw) [2010-04-08 17:36:01,801] ERROR:web-services:[08]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/orm.py", line 3072, in create [2010-04-08 17:36:01,801] ERROR:web-services:[09]: self.pool.get(table).write(cr, user, [record_id], tocreate[table], context=context) [2010-04-08 17:36:01,801] ERROR:web-services:[10]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/orm.py", line 2890, in write [2010-04-08 17:36:01,801] ERROR:web-services:[11]: cr.execute('SELECT id FROM "'+self._table+'" WHERE id IN ('+ids_str+')') [2010-04-08 17:36:01,801] ERROR:web-services:[12]: File "/opt/openerp/5.2/openobject-server-trunk/bin/sql_db.py", line 74, in wrapper [2010-04-08 17:36:01,801] ERROR:web-services:[13]: return f(self, *args, **kwargs) [2010-04-08 17:36:01,802] ERROR:web-services:[14]: File "/opt/openerp/5.2/openobject-server-trunk/bin/sql_db.py", line 119, in execute [2010-04-08 17:36:01,802] ERROR:web-services:[15]: res = self._obj.execute(query, params) [2010-04-08 17:36:01,802] ERROR:web-services:[16]: ProgrammingError: operator does not exist: integer = boolean [2010-04-08 17:36:01,802] ERROR:web-services:[17]: LÍNEA 1: ...ELECT id FROM "account_analytic_account" WHERE id IN (False) [2010-04-08 17:36:01,802] ERROR:web-services:[18]: ^ [2010-04-08 17:36:01,802] ERROR:web-services:[19]: SUGERENCIA: No operator matches the given name and argument type(s). You might need to add explicit type casts. Exploring "orm.py" file in "<server_path>/bin/osv" dir, it seemed that, in "create" method, when collecting all "to_create" record ds it was performed an "if record_id is None:" condition, without checking, for example, that record_id could be False (like mentioned example). In this case, flow entered "else" branch and tried to write an -yet- inexisting id. Considering this, there is a patch attached that replace this condition for "if not bool(record_id):" so both "None" and "False" cases are controlled (because although None != False, bool(None)=bool(False)=False). Regards. Hi community. Using OpenERP server version 5.2dev. and trying to create a new project (not filling all fields), I found myself with following error: [2010-04-08 17:36:01,799] ERROR:web-services:[01]: Traceback (most recent call last): [2010-04-08 17:36:01,800] ERROR:web-services:[02]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/osv.py", line 57, in wrapper [2010-04-08 17:36:01,800] ERROR:web-services:[03]: return f(self, dbname, *args, **kwargs) [2010-04-08 17:36:01,800] ERROR:web-services:[04]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/osv.py", line 120, in execute [2010-04-08 17:36:01,800] ERROR:web-services:[05]: res = pool.execute_cr(cr, uid, obj, method, *args, **kw) [2010-04-08 17:36:01,800] ERROR:web-services:[06]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/osv.py", line 110, in execute_cr [2010-04-08 17:36:01,801] ERROR:web-services:[07]: return getattr(object, method)(cr, uid, *args, **kw) [2010-04-08 17:36:01,801] ERROR:web-services:[08]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/orm.py", line 3072, in create [2010-04-08 17:36:01,801] ERROR:web-services:[09]: self.pool.get(table).write(cr, user, [record_id], tocreate[table], context=context) [2010-04-08 17:36:01,801] ERROR:web-services:[10]: File "/opt/openerp/5.2/openobject-server-trunk/bin/osv/orm.py", line 2890, in write [2010-04-08 17:36:01,801] ERROR:web-services:[11]: cr.execute('SELECT id FROM "'+self._table+'" WHERE id IN ('+ids_str+')') [2010-04-08 17:36:01,801] ERROR:web-services:[12]: File "/opt/openerp/5.2/openobject-server-trunk/bin/sql_db.py", line 74, in wrapper [2010-04-08 17:36:01,801] ERROR:web-services:[13]: return f(self, *args, **kwargs) [2010-04-08 17:36:01,802] ERROR:web-services:[14]: File "/opt/openerp/5.2/openobject-server-trunk/bin/sql_db.py", line 119, in execute [2010-04-08 17:36:01,802] ERROR:web-services:[15]: res = self._obj.execute(query, params) [2010-04-08 17:36:01,802] ERROR:web-services:[16]: ProgrammingError: operator does not exist: integer = boolean [2010-04-08 17:36:01,802] ERROR:web-services:[17]: LÍNEA 1: ...ELECT id FROM "account_analytic_account" WHERE id IN (False) [2010-04-08 17:36:01,802] ERROR:web-services:[18]: ^ [2010-04-08 17:36:01,802] ERROR:web-services:[19]: SUGERENCIA: No operator matches the given name and argument type(s). You might need to add explicit type casts. Exploring "orm.py" file in "<server_path>/bin/osv" dir, it seemed that, in "create" method, when collecting all "to_create" record ds it was performed an "if record_id is None:" condition, without checking, for example, that record_id could be False (like mentioned example). In this case, flow entered "else" branch and tried to write an -yet- inexisting id. Considering this, there is a patch attached that replace this condition for "if not bool(record_id):" so both "None" and "False" cases are controlled (because although None != False, bool(None)=bool(False)=False). Regards.
2010-04-28 09:26:37 Jay Vora (Serpent Consulting Services) summary [TRUNK]Error when creating a new project Error when relational field to _inherits is FALSE!
2010-04-28 09:26:45 Jay Vora (Serpent Consulting Services) openobject-server: status New Confirmed
2010-04-28 09:27:19 Launchpad Janitor branch linked lp:openobject-server
2010-04-28 09:27:37 Jay Vora (Serpent Consulting Services) openobject-server: status Confirmed Fix Released