Custom fields when created behave badly for select attribute

Bug #489573 reported by t.o
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
Unassigned

Bug Description

Hello,

I tried to reproduce the building a school management application.
The bug occurs on ubuntu with the last revision on point #24 of the attached pdf file.

With the last stable 5.0.6 with windows XP it's OK

>>>>> OpenERP Server: Updating latest stable revisions from launchpad.net <<<<<
 M bin/sql_db.py
All changes applied successfully.
Using saved location: http://bazaar.launchpad.net/~openerp/openobject-server/5.0/
Now on revision 1886.
Tree is up to date at revision 1886.

Related branches

Revision history for this message
t.o (emailbox4oerp) wrote :
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello oli,

I have created 3 objects and added the fields which you have define in pdf with that objects But When i try to create x_training_session object with adding the field x_subscri_stud which has many2many relation with the res.partner.contact then getting this error.

[2009-11-30 14:20:07,862] ERROR:web-services:[36]: File "/home/sma/workspace/server_5.0/bin/sql_db.py", line 125, in execute
[2009-11-30 14:20:07,862] ERROR:web-services:[37]: res = self._obj.execute(query, params)
[2009-11-30 14:20:07,862] ERROR:web-services:[38]: ProgrammingError: relation "x_res_partner_contact_x_training_session_x_subscri_students_rel" already exists

Note:
I have tested with another object (res.partner) and create one new many2many (object relation: res.partner.address) field and its working without any unicode error.

So kindly tell me why i m getting above error, so that i can reproduce your problem ?

Also update your code or check with the stable version of web client. You can get the stable branch from this path
https://code.launchpad.net/~openerp/openobject-client-web/5.0

Thanks.

Revision history for this message
t.o (emailbox4oerp) wrote :

Hello sma,

I tried with the last stable and I can't reproduce this bug but I have still the following one :

If I select 'Always Searchable' in the fields description window, by saving this field becomes 'Not Searchable' in the object description window (see point#9 and #14in the pdf file).

Thanks

Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello Oli,

If you want to change from web-client so, you can set the Searchable options from the Customise/Manage Views.
Select aproprite view or create new view and select the searchable options from selection box.
You can get this searchable fields on your view.

For the "select 'Always Searchable' in the fields description window, by saving this field becomes 'Not Searchable' in the object description window" i have ask to sever team.

I will late you know.

Thanks.

affects: openobject-client-web → openobject-server
Changed in openobject-server:
status: New → Confirmed
summary: - unicode() argument 2 must be string, not None when creating objects
+ Custom fields when created behave badly for select attribute
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello bug reporter,

We appreciate your input and thank you for the report.

I would like to request you to apply these patches and notify us for the behavior.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :
Changed in openobject-server:
importance: Undecided → Medium
Revision history for this message
t.o (emailbox4oerp) wrote :

hello jay,

I tested your patch1 & 2
I created a new DB (minimal profil/ english/ demo data) i followed the part 1 tutorial see the link below :

http://www.mediafire.com/?sharekey=b39f7aac1f728fa7d1014a7a667fa2b40f37db57df47ed14ea4ac78345cbe4ce

then the part 2. The first bug :unicode() argument 2 must be string, not None doesn't occur but the second bug
 "select 'Always Searchable' in the fields description window, by saving this field becomes 'Not Searchable' in the object description window" still occurs.

Revision history for this message
Husen Daudi (husendaudi) wrote :

Fixed With revision No.
<email address hidden>

Changed in openobject-server:
status: Confirmed → Fix Released
Revision history for this message
Carlos Almeida (cmsa) wrote :

Hi,

I was following a tutorial about doing the school management in 17 minutes :)
I couldn't pass the objects creation because i always get this error.
I'v read the documentation before, and after to see if there is something wrong in the tutorial, but seems ok.

Thanks in advance,

------ERROR MESSAGE-----------------------------------
Environment Information :
System : Linux-2.6.32-22-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-22-generic
Operating System Version : #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : pt_PT.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/lib/openerp-server/netsvc.py", line 244, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/lib/openerp-server/netsvc.py", line 73, in __call__
    return getattr(self, method)(*params)
  File "/usr/lib/openerp-server/addons/base_module_record/base_module_record.py", line 38, in execute
    res = super(recording_objects_proxy, self).execute(*args, **argv)
  File "/usr/lib/openerp-server/service/web_services.py", line 583, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/lib/openerp-server/osv/osv.py", line 59, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/openerp-server/osv/osv.py", line 118, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/openerp-server/osv/osv.py", line 110, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/openerp-server/osv/orm.py", line 1267, in fields_view_get
    result['arch'] = etree.fromstring(xml)
  File "lxml.etree.pyx", line 2532, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48270)
  File "parser.pxi", line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71723)
ValueError: Unicode strings with encoding declaration are not supported.

Revision history for this message
Carlos Almeida (cmsa) wrote :

I forgot to say I only have the base, base_setup, process, base_contact, base_record installed and recording enabled.

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.