OpenERP v6 (trunk revison 3461) error with _sql_constraints

Bug #797690 reported by Manfred Rockel
34
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

I use the following in res.partner
    _sql_constraints = [
        ('ref_uniq', 'unique (ref)', 'Die eingegebene Nummer ist schon vorhanden!'),
    ]
after update to rev 3461 i get a new error

Environment Information :
System : Linux-2.6.35.13-92.fc14.i686-i686-with-fedora-14-Laughlin
OS Name : posix
Operating System Release : 2.6.35.13-92.fc14.i686
Operating System Version : #1 SMP Sat May 21 17:39:42 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : de_DE.UTF8
Python Version : 2.7.0
OpenERP-Client Version : 6.1-dev
Last revision No. & ID :1909 <email address hidden>
Traceback (most recent call last):
  File "/home/openerp/trunk/server/openerp/service/netrpc_server.py", line 70, in run
    result = self.dispatch(msg[0], msg[1], msg[2:])
  File "/home/openerp/trunk/server/openerp/netsvc.py", line 434, in dispatch
    tb_s = cgitb.text(tb)
  File "/usr/lib/python2.7/cgitb.py", line 245, in text
    exception = ['%s: %s' % (str(etype), str(evalue))]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 14: ordinal not in range(128)

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Manfred,

I have checked your issue at my end with Gtk and web-client both But all are working as expected.

I have put a constraint in res.partner object which you have gives in bug specification and try to create a new partner with same reference but the constraint call successfully and I am not able to faced any traceback.

I have attached a video for your more reference so would you please check it and notify us where you faced the problem.

Thanks and waiting for your reply!

Revision history for this message
Amit Parik (amit-parik) wrote :
Changed in openobject-client-web:
status: New → Incomplete
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello amit,

you will be able to reproduce the bug if your user language is other then "en_US" . Try to load de_DE and then go to account open any account with parent_id =False then assign the same account as its parent you will have a contraint fired something like "You can not create recursive accounts." but here you will face the traceback as reported in the original bug.

Hope this helps you !

Amit Parik (amit-parik)
affects: openobject-client-web → openobject-server
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: Incomplete → Confirmed
Changed in openobject-server:
importance: Low → Medium
Changed in openobject-server:
status: Confirmed → Fix Committed
Changed in openobject-server:
status: Fix Committed → Confirmed
Revision history for this message
Vo Minh Thu (thu) wrote :

The fix is available in trunk at revision 3472 (revision-id: <email address hidden>).

It reverts a previous patch where we introduced the use of cgitb to format exception. Unfortunately, cgitb use the str() function which breaks on unicode data.

Sorry for the inconvenience, and thanks a lot for the bug report.

Changed in openobject-server:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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