Many2One component causes exception

Bug #525967 reported by Jim Norman
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

When using a many2one widget with XML-RPC, the following occurs:

OpenPGP: *Attachments to this message have not been signed or encrypted*

Sharoon,

I've encountered another problem - this one is with client!

I installed product_variant_multi, product_variant_configurator, and
sale_product_multistep_configurator. I'm getting the following
exception thrown after choosing a product template.

Sql to create db is attached. (need to do a createdb with owner openerp
first)

I'm hoping you've seen this before and can point me to a quick answer.

Jim Norman

WARNING:rpc.exception:CODE 1: <type 'exceptions.TypeError'>:cannot
marshal None unless allow_none is enabled
No handlers could be found for logger "bzr"
No LSB modules are available.
ERROR:common.message:Message 1:
Environment Information :
System : Linux-2.6.31-19-generic-i686-with-Ubuntu-9.10-karmic
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
Operating System Release : 2.6.31-19-generic
Operating System Version : #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.4
OpenERP-Client Version : 5.0.7
Last revision No. & ID :1046 <email address hidden>
<type 'exceptions.TypeError'>:cannot marshal None unless allow_none is
enabled
DEBUG_RPC:rpc.request:('execute', 'muddadvertising', 1, 'openerp',
('maintenance.contract', 'status'))
DEBUG_RPC_ANSWER:rpc.result:{'status': 'none', 'uncovered_modules': []}
Traceback (most recent call last):
  File "/opt/openerp/client/bin/widget/view/form_gtk/many2one.py", line
240, in sig_find
    context = self._view.modelfield.context_get(self._view.model)
  File "/opt/openerp/client/bin/widget/model/field.py", line 77, in
context_get
    field_context = model.expr_eval('dict(%s)' % field_context_str,
check_load=check_load)
  File "/opt/openerp/client/bin/widget/model/record.py", line 253, in
expr_eval
    d[name] = mfield.get(self, check_load=check_load)
  File "/opt/openerp/client/bin/widget/model/field.py", line 360, in get
    result.append((1,model2.id, model2.get(check_load=check_load,
get_readonly=readonly)))
  File "/opt/openerp/client/bin/widget/model/record.py", line 105, in get
    self._check_load()
  File "/opt/openerp/client/bin/widget/model/record.py", line 89, in
_check_load
    self.reload()
  File "/opt/openerp/client/bin/widget/model/record.py", line 233, in reload
    return self._reload(self.mgroup.mfields.keys() +
[CONCURRENCY_CHECK_FIELD])
  File "/opt/openerp/client/bin/widget/model/record.py", line 241, in
_reload
    res = self.rpc.read([self.id], fields, c)
  File "/opt/openerp/client/bin/rpc.py", line 351, in __call__
    return session.rpc_exec_auth('/object', 'execute', self.object,
self.func, *args)
  File "/opt/openerp/client/bin/rpc.py", line 186, in rpc_exec_auth
    common.error(_('Application Error'), e.faultCode, e.faultString)
  File "/opt/openerp/client/bin/common/common.py", line 419, in error
    xmlGlade.get_widget('title_error').set_markup("<i>%s</i>" %
escape(message))
  File "/usr/lib/python2.6/cgi.py", line 1035, in escape
    s = s.replace("&", "&amp;") # Must be done first!
AttributeError: 'int' object has no attribute 'replace'

The code works fine when using NET-RPC. I suspect that the XML-RPC code starts off using a file interface, then looks at a socket for a response, and has none, causing the exception.

I have not located the exact cause of the problem.

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Looks like the bug directly addresses me
:-)

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Jim,

Have you added your own module to work with?
The Suspect is NONE,rather it should be returning False.

Thanks.

Changed in openobject-client:
status: New → Incomplete
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Jim,

Kindly provide more information. Have you checked with latest version?
It would be great too if you can trace.
I have tried to check this , but I could not face the error.

Thanks.

Revision history for this message
Jim Norman (jim-jsnorman) wrote : Re: [SPAM] [Bug 525967] Re: Many2One component causes exception

Jay,

The problem occurred with (I believe) 5.07. Originally encountered on
19 Feb. I will check with 5.09 to see if it still exists. The
environment I used was on Rackspace and that environment no longer exists.

The sql to create the database is attached.

Jim Norman
Jay (Open ERP) wrote:
> Hello Jim,
>
> Kindly provide more information. Have you checked with latest version?
> It would be great too if you can trace.
> I have tried to check this , but I could not face the error.
>
> Thanks.
>

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Jim,

Would you please re-attach the backup?

I can't restore the file,it says its not a valid archive.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Reopen the bug if its still a problem.
I guess problem exists no more.
Thanks.

Changed in openobject-client:
milestone: none → 5.0.10
status: Incomplete → Invalid
Revision history for this message
Jose Moreno (jmoreno-8) wrote :

 I fixed this error changing the value in the file http_server.py

Line 65: allow_none = True
Line 71: allow_none = True

Thanks...

Revision history for this message
Jose Moreno (jmoreno-8) wrote :

I attachment the file with the fix

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.