openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #23962
[Bug 1153628] Re: can't set default value for many2many fields
** Summary changed:
- [7.0] can't set default value for many2many fields
+ can't set default value for many2many fields
** Changed in: openobject-server
Importance: Undecided => Medium
** Changed in: openobject-server
Status: New => Confirmed
** Changed in: openobject-server
Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1153628
Title:
can't set default value for many2many fields
Status in OpenERP Server:
Confirmed
Bug description:
openobject-server/7.0 4887
openobject-addons/7.0 8832
postgresql 9.1
Steps:
- Install account_accountant
- Go to settings, technical, actions, user-defined defaults. Open 'taxes_id'
- Change value from [1L] (e.g.) to [2L]
- Go to products and click on 'create'
Get
2013-03-11 14:59:24,299 18180 ERROR test_70 openerp.sql_db: bad query: SELECT "account_tax".id FROM "account_tax" WHERE (("account_tax"."active" = 'True') AND "account_tax".id = '[') ORDER BY "account_tax"."sequence"
Traceback (most recent call last):
File "/home/elbati/workspace/openerp/7.0/server/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "["
LINE 1: ..._tax"."active" = 'True') AND "account_tax".id = '[') ORDER...
^
2013-03-11 14:59:24,299 18180 ERROR test_70 openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/orm.py", line 1617, in default_get
field_value[i])]):
File "/home/elbati/workspace/openerp/7.0/addons/account/account.py", line 1963, in search
return super(account_tax, self).search(cr, uid, args, offset, limit, order, context, count)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/orm.py", line 2354, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/orm.py", line 4856, in _search
cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
File "/home/elbati/workspace/openerp/7.0/server/openerp/sql_db.py", line 161, in wrapper
return f(self, *args, **kwargs)
File "/home/elbati/workspace/openerp/7.0/server/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "["
LINE 1: ..._tax"."active" = 'True') AND "account_tax".id = '[') ORDER...
^
2013-03-11 14:59:24,300 18180 ERROR test_70 openerp.netsvc: invalid input syntax for integer: "["
LINE 1: ..._tax"."active" = 'True') AND "account_tax".id = '[') ORDER...
^
Traceback (most recent call last):
File "/home/elbati/workspace/openerp/7.0/server/openerp/netsvc.py", line 293, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/elbati/workspace/openerp/7.0/server/openerp/service/web_services.py", line 618, in dispatch
res = fn(db, uid, *params)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/orm.py", line 1617, in default_get
field_value[i])]):
File "/home/elbati/workspace/openerp/7.0/addons/account/account.py", line 1963, in search
return super(account_tax, self).search(cr, uid, args, offset, limit, order, context, count)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/orm.py", line 2354, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/home/elbati/workspace/openerp/7.0/server/openerp/osv/orm.py", line 4856, in _search
cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
File "/home/elbati/workspace/openerp/7.0/server/openerp/sql_db.py", line 161, in wrapper
return f(self, *args, **kwargs)
File "/home/elbati/workspace/openerp/7.0/server/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
DataError: invalid input syntax for integer: "["
LINE 1: ..._tax"."active" = 'True') AND "account_tax".id = '[') ORDER...
^
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1153628/+subscriptions
References