unaccent() is applied to integer fields

Bug #939526 reported by risto3
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Triaged
Undecided
Unassigned

Bug Description

Thought I'd try to add --unaccent to the server command line after enabling the extension on an existing database.
(perhaps it needs to be added immediately after création and prior to any operation)..
starting the server without --unaccent seems to work fine.

Via the web interface as admin, I selected 'Settings' and received no configuration and the following output:

2012-02-23 13:57:21,092 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-go-year.png HTTP/1.1" 200 -
2012-02-23 13:57:21,095 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-gtk-go-back-rtl.png HTTP/1.1" 304 -
2012-02-23 13:57:21,096 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-go-month.png HTTP/1.1" 200 -
2012-02-23 13:57:21,099 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-go-home.png HTTP/1.1" 200 -
2012-02-23 13:57:21,101 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-partner.png HTTP/1.1" 200 -
2012-02-23 13:57:21,105 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-accessories-archiver.png HTTP/1.1" 200 -
2012-02-23 13:57:21,106 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-stock_symbol-selection.png HTTP/1.1" 200 -
2012-02-23 13:57:21,107 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-gtk-jump-to-rtl.png HTTP/1.1" 200 -
2012-02-23 13:57:21,110 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-stock_effects-object-colorize.png HTTP/1.1" 200 -
2012-02-23 13:57:21,112 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/icons/terp-go-today.png HTTP/1.1" 200 -
2012-02-23 13:57:21,115 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "GET /web/static/src/img/ui/field_calendar.png HTTP/1.1" 200 -
2012-02-23 13:57:21,207 23948 ERROR ? openerp.sql_db: Programming error: function unaccent(integer) does not exist
LINE 1: ... (report_stock_move."day" > '2012-02-08')) AND (unaccent(r...
                                                             ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
, in query SELECT "report_stock_move".id FROM "report_stock_move" WHERE (((((((((report_stock_move."type" = %s) AND (report_stock_move."day" <= %s)) AND (report_stock_move."day" > %s)) AND (unaccent(report_stock_move."product_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."partner_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."location_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."location_dest_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."categ_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."stock_journal") ilike unaccent(%s))) ORDER BY id
2012-02-23 13:57:21,208 23948 ERROR ? openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/orm.py", line 2241, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/orm.py", line 4561, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/sql_db.py", line 152, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
ProgrammingError: function unaccent(integer) does not exist
LINE 1: ... (report_stock_move."day" > '2012-02-08')) AND (unaccent(r...
                                                             ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

2012-02-23 13:57:21,211 23948 ERROR ? openerp.netsvc: function unaccent(integer) does not exist
LINE 1: ... (report_stock_move."day" > '2012-02-08')) AND (unaccent(r...
                                                             ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

2012-02-23 13:57:21,216 23948 INFO ? werkzeug: 127.0.0.1 - - [23/Feb/2012 13:57:21] "POST /web/dataset/search_read HTTP/1.1" 200 -
2012-02-23 13:57:21,235 23948 ERROR ? openerp.sql_db: Programming error: function unaccent(integer) does not exist
LINE 1: ... (report_stock_move."day" > '2012-02-08')) AND (unaccent(r...
                                                             ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
, in query SELECT "report_stock_move".id FROM "report_stock_move" WHERE (((((((((report_stock_move."type" = %s) AND (report_stock_move."day" <= %s)) AND (report_stock_move."day" > %s)) AND (unaccent(report_stock_move."product_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."partner_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."location_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."location_dest_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."categ_id") ilike unaccent(%s))) AND (unaccent(report_stock_move."stock_journal") ilike unaccent(%s))) ORDER BY id
2012-02-23 13:57:21,236 23948 ERROR ? openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/osv.py", line 164, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/orm.py", line 2241, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/osv/orm.py", line 4561, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/sql_db.py", line 152, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1-py2.6.egg/openerp/sql_db.py", line 212, in execute
    res = self._obj.execute(query, params)
ProgrammingError: function unaccent(integer) does not exist
LINE 1: ... (report_stock_move."day" > '2012-02-08')) AND (unaccent(r...
                                                             ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

2012-02-23 13:57:21,236 23948 ERROR ? openerp.netsvc: function unaccent(integer) does not exist
LINE 1: ... (report_stock_move."day" > '2012-02-08')) AND (unaccent(r...
                                                             ^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Tags: unaccent
Revision history for this message
risto3 (risto3) wrote :

forgot to mention PostgreSQL 9.1.2

Vo Minh Thu (thu)
summary: - unaccent seems to break certain interfaces
+ unaccent() is applied to integer fields
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I am setting this as a "Triaged" because work with only Postgresql 9.1+, So first we have to update our postgres then after we can check it.

Thanks!

Changed in openobject-server:
status: New → Triaged
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I have checked your issue with ubuntu 12.04 with PostgreSQL 9.1.3 ( Used a --unaccent) at my end.

I didn't face this type of error at my end. So would you please check it again and notify us.

Thanks and waiting for your reply!

Changed in openobject-server:
status: Triaged → Incomplete
Revision history for this message
risto3 (risto3) wrote :

using PostgreSQL 9.1.2 here
t61=# \dx
                         List of installed extensions
   Name | Version | Schema | Description
----------+---------+------------+---------------------------------------------
 plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
 unaccent | 1.0 | public | text search dictionary that removes accents
(2 rows)

no sign of usage now with noaccent except at opening of the db:
2012-05-24 16:24:22,027 9062 INFO ? openerp: OpenERP version 6.1-1
2012-05-24 16:24:22,027 9062 INFO ? openerp: addons paths: /usr/lib/python2.6/site-packages/openerp-6.1_1-py2.6.egg/openerp/addons
2012-05-24 16:24:22,027 9062 INFO ? openerp: database hostname: localhost
2012-05-24 16:24:22,028 9062 INFO ? openerp: database port: 5432
2012-05-24 16:24:22,028 9062 INFO ? openerp: database user: richard
2012-05-24 16:24:22,029 9062 INFO ? openerp.netsvc: Starting 0 services
2012-05-24 16:24:22,057 9062 INFO ? openerp.wsgi.core: HTTP service (werkzeug) running on 0.0.0.0:8069
2012-05-24 16:24:22,415 9062 INFO ? openerp.addons.web: embedded mode
2012-05-24 16:24:23,326 9062 INFO ? openerp: OpenERP server is running, waiting for connections...
2012-05-24 16:24:28,614 9062 DEBUG t61 openerp.sql_db: create serialized cursor to 't61'
2012-05-24 16:24:28,614 9062 DEBUG t61 openerp.sql_db: ConnectionPool(used=0/count=0/max=64) Borrow connection to 'user=richard dbname=t61'
2012-05-24 16:24:28,634 9062 DEBUG t61 openerp.sql_db: ConnectionPool(used=1/count=1/max=64) Create new connection
2012-05-24 16:24:28,639 9062 DEBUG t61 openerp.sql_db: query: SELECT proname FROM pg_proc WHERE proname='unaccent'
2012-05-24 16:24:28,640 9062 DEBUG t61 openerp.sql_db: SQL LOG from:
2012-05-24 16:24:28,640 9062 DEBUG t61 openerp.sql_db: table: pg_proc: 0:00:00.003083/1
2012-05-24 16:24:28,640 9062 DEBUG t61 openerp.sql_db: SUM from:0:00:00.003083/1 [1]
2012-05-24 16:24:28,640 9062 DEBUG t61 openerp.sql_db: SUM into:0:00:00/1 [1]
2012-05-24 16:24:28,640 9062 DEBUG t61 openerp.sql_db: ConnectionPool(used=1/count=1/max=64) Give back connection to 'user=richard dbname=t61'
2012-05-24 16:24:28,641 9062 DEBUG t61 openerp.sql_db: ConnectionPool(used=0/count=1/max=64) Put connection to 'user=richard dbname=t61' in pool
2012-05-24 16:24:28,646 9062 DEBUG t61 openerp.sql_db: create serialized cursor to 't61'

d

perhaps you could share me your test procedure (yaml?) so I could try here with something that will now **use** unaccent.

Amit Parik (amit-parik)
Changed in openobject-server:
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.