Hi,

I found a problem and I would like to know if I did something wrong or 
if it's a bug I should report in launchpad.
here is the context : openerp server 5.0.6 on ubuntu 8.04, gtk client 
5.0.6 on ubuntu 8.04.

in sale.order, I created a new field with a new module in python :

'csr_mairie_id': fields.many2one('res.partner', 'Mairie', readonly=True, 
states={'draft': [('readonly', False)]}, change_default=True),


in the form view, I want to filtrer the partner with category :
<field name="csr_mairie_id" 
on_change="onchange_mairie_id(csr_mairie_id)" 
domain="[('category_id','=','Mairie')]"/>


It works fine.
Except when i want to create a new partner from this field :
- i click on the "search a resource" button at the right side of the 
field 'csr_mairie_id'
- I click on the "new" button at the bottom of the list of partners
- i got the error :

Environment Information :
System : Linux-2.6.24-26-generic-i686-with-debian-lenny-sid
OS Name : posix
Distributor ID:    Ubuntu
Description:    Ubuntu 8.04.3 LTS
Release:    8.04
Codename:    hardy
Operating System Release : 2.6.24-26-generic
Operating System Version : #1 SMP Tue Dec 1 18:37:31 UTC 2009
Operating System Architecture : 32bit
Operating System Locale : fr_FR.UTF8
Python Version : 2.5.2
OpenERP-Client Version : 5.0.6
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent 
call last):
   File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", 
line 244, in dispatch
     result = LocalService(service_name)(method, *params)
   File "/usr/lib/python2.5/site-packages/openerp-server/netsvc.py", 
line 73, in __call__
     return getattr(self, method)(*params)
   File 
"/usr/lib/python2.5/site-packages/openerp-server/service/web_services.py", 
line 583, in execute
     res = service.execute(db, uid, object, method, *args)
   File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", 
line 59, in wrapper
     return f(self, dbname, *args, **kwargs)
   File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", 
line 118, in execute
     res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
   File "/usr/lib/python2.5/site-packages/openerp-server/osv/osv.py", 
line 110, in execute_cr
     return getattr(object, method)(cr, uid, *args, **kw)
   File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", 
line 2084, in read
     result = self._read_flat(cr, user, select, fields, context, load)
   File "/usr/lib/python2.5/site-packages/openerp-server/osv/orm.py", 
line 2138, in _read_flat
     self._order), sub_ids)
   File "/usr/lib/python2.5/site-packages/openerp-server/sql_db.py", 
line 76, in wrapper
     return f(self, *args, **kwargs)
   File "/usr/lib/python2.5/site-packages/openerp-server/sql_db.py", 
line 120, in execute
     res = self._obj.execute(query, params)
ProgrammingError:  syntaxe en entrée invalide pour l'entier : « M »



Note that the letter of the error ("M" in the example) is the first 
letter of the domain of the field (I tested with others domain's name)
What is surprising is that this error occurs only with the gtk client, 
not with the web client !

Thanks for any information,

Michel
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman2/listinfo/tinyerp-users

Reply via email to