Regression on Delivery module: 'active_id' can cause error on context for a new unsaved record.

Bug #681773 reported by Manu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Fix Released
High
Jay Vora (Serpent Consulting Services)
Trunk
Fix Released
High
OpenERP R&D Addons Team 3

Bug Description

Install The Delivery Module:

Stable: Sales Management/Sales Orders/New Order.....
Trunk : Sales/Sale Orders/Click New.....

Do not enter any value(though it doesn't matter, but do not save the SO)

Go to others(Or Other information) tab, Click on search icon of delivery method.

bzr: ERROR: Not a branch: "/openerp/openerp-client/bin/".
No LSB modules are available.
ERROR:common.message:Message Ver detalles:
Environment Information :
System : Linux-2.6.32-25-generic-pae-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-25-generic-pae
Operating System Version : #44-Ubuntu SMP Fri Sep 17 21:57:48 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : es_ES.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.15
Last revision No. & ID :Bazaar Package not Found !cannot marshal None unless allow_none is enabled
Traceback (most recent call last):
  File "/openerp/openerp-client/bin/widget/view/form_gtk/many2one.py", line 246, in sig_find
    ids = rpc.session.rpc_exec_auth('/object', 'execute', self.attrs['relation'], 'name_search', name_search, domain, 'ilike', context)
  File "/openerp/openerp-client/bin/rpc.py", line 170, in rpc_exec_auth
    return sock.exec_auth(method, *args)
  File "/openerp/openerp-client/bin/rpc.py", line 84, in exec_auth
    res = self.execute(method, self._uid, self._passwd, *args)
  File "/openerp/openerp-client/bin/rpc.py", line 102, in execute
    result = getattr(self._sock,method)(self._db, *args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1483, in __request
    allow_none=self.__allow_none)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 780, in dump_struct
    dump(v, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 703, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled

Any ideas?

Tags: delivery

Related branches

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

Hello Manu,

I have tried the same way out. I did not meet to this error.
I fear this is due to delivery method property of partner.
Can you provide more information?

Our R&D Teams are focused on the latest OpenERP version, and this issue does not affect it.
Our policy is to keep the changes applied on stable branches to a minimum, in order to limit the regression risks for customers that are in production. This means that bugs reported on Launchpad are fixed in the trunk branch only by default, even if they were reported against other stable versions.
We stand of course ready to backport the change to stable releases if it has an impact on any customer. In this case please report it to our maintenance team via the OpenERP Publisher's Warranty. They will quickly help solve the issue and backport the fix if needed.
Thank you for your understanding!

Changed in openobject-addons:
status: Triaged → Won't Fix
Revision history for this message
Manu (manu-tiedra) wrote :

Hello Jay,

It happened to me with a fresh install with minimal profile after adding the modules needed for the company, mainly: HR, CRM, sales, purchases, accounting, payments, analytic accounting, point of sale, document, stock and delivery.

If I enter a partner I can select the delivery method without any problem.

However, if I go to Sales Management->Sales Order->New Quotation, whenever I click in the button that has a binocular to open the list of delivery methods (in the right of the Delivery Method text box in the Other Data tab), it crashes.

If I select a partner that has a delivery method set and then I go to the Other Data tab, I can see the name of the delivery method in the Delivery Method text box without any problem. However If I try to open the Delivery Method with the first button at the right, it crashes with the same message.

However, today I have found something that may help you to find the bug. If I save the new quotation and then try to open the delivery method or use the other button to get the list of delivery methods it works fine. So, the bug appears to be present only when the quotation is not saved.

Please help me as an implementation without the delivery module working is useless.

Revision history for this message
Manu (manu-tiedra) wrote :

The log if I try to open an existing delivery method in the new quotation view is (this can be done if I select a partner with a deliver method set):

ERROR:common.message:Message Ver detalles:
Environment Information :
System : Linux-2.6.32-25-generic-pae-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-25-generic-pae
Operating System Version : #44-Ubuntu SMP Fri Sep 17 21:57:48 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : es_ES.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.15
Last revision No. & ID :Bazaar Package not Found !cannot marshal None unless allow_none is enabled
Traceback (most recent call last):
  File "/openerp/openerp-client/bin/widget/view/form_gtk/many2one.py", line 271, in sig_edit
    dia = dialog(self.attrs['relation'], self._view.modelfield.get(self._view.model), attrs=self.attrs, window=self._window, domain=domain, context=context)
  File "/openerp/openerp-client/bin/widget/view/form_gtk/many2one.py", line 81, in __init__
    self.screen = Screen(model, view_ids=view_ids, domain=domain, context=context, window=self.dia, view_type=view_type)
  File "/openerp/openerp-client/bin/widget/screen/screen.py", line 101, in __init__
    view = self.add_view_id(view_id, view_type[0])
  File "/openerp/openerp-client/bin/widget/screen/screen.py", line 349, in add_view_id
    self.hastoolbar)
  File "/openerp/openerp-client/bin/rpc.py", line 349, in __call__
    return session.rpc_exec_auth('/object', 'execute', self.object, self.func, *args)
  File "/openerp/openerp-client/bin/rpc.py", line 170, in rpc_exec_auth
    return sock.exec_auth(method, *args)
  File "/openerp/openerp-client/bin/rpc.py", line 84, in exec_auth
    res = self.execute(method, self._uid, self._passwd, *args)
  File "/openerp/openerp-client/bin/rpc.py", line 102, in execute
    result = getattr(self._sock,method)(self._db, *args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1483, in __request
    allow_none=self.__allow_none)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1132, in dumps
    data = m.dumps(params)
  File "/usr/lib/python2.6/xmlrpclib.py", line 677, in dumps
    dump(v, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 780, in dump_struct
    dump(v, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 699, in __dump
    f(self, value, write)
  File "/usr/lib/python2.6/xmlrpclib.py", line 703, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"
TypeError: cannot marshal None unless allow_none is enabled

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

Tried again but failed to get the error.
Can you attach the dump of your DB?
Thanks.

Revision history for this message
Manu (manu-tiedra) wrote :

Jay,

I don't want to post it publically. Can I send it to you privately?

Thanks.

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

You can send us a demo database, not your own original one.
Thanks.

Revision history for this message
Manu (manu-tiedra) wrote :

I'm attaching a database where the error still happen.

Revision history for this message
Manu (manu-tiedra) wrote :

I forgot to say that the admin password is test

summary: - error in sale order form after installing delivery module
+ Regression on Delivery module: 'active_id' can cause error on context
+ for a new unsaved record.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thanks Mr. Manu,

After tracing the error coming from your DB, I could find and fix the original error.
It was a Regression from Bug 532673.

It has been fixed by revision 2889 <email address hidden>.

Thanks again.

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

Herewith is an attached patch for trunk.
Thanks.

description: updated
Revision history for this message
Manu (manu-tiedra) wrote :

Jay,

Thank you very much for your patience and work on this one!

I can confirm the patch fixed it.

Keep on your great work!

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello Manu,

I have applied the patch given by jvo (thanks to him) in Addons3.

revision-id: mra@mra-laptop-20101217052433-k28zhwag0zijezze

Thank you,
Mustufa

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.