[product configurator] 'NoneType' object is unsubscriptable when used with web-client

Bug #496959 reported by Raphaël Valyi - http://www.akretion.com
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Invalid
Undecided
Navrang Oza

Bug Description

Hello,

DESCRIPTION:
I recently learnt about the target="new" feature from that bug report https://bugs.launchpad.net/openobject-client-web/+bug/380589 , so I made the required changes to have the 'product_variant_confirgurator' from stable extra addons 5.0 working on the web-client. So I made the following change: http://bazaar.launchpad.net/~openerp-commiter/openobject-addons/stable_5.0-extra-addons/revision/4124

Part if the target="new" fix is working: so the variant lines wizard is now properly returning back to the sale.order.line view in the web client.

However, the target="new" on the validate button of the "Validate" button (see changeset), is now causing the web-client to blows up instead of returning to the current sale order view. See stack trace at the end.

HOW TO REPRODUCE:
install a fresh database with demo data and with product_variant_confirgurator module, last revisions from that branch:
https://code.launchpad.net/~openerp-commiter/openobject-addons/stable_5.0-extra-addons

Then create a new sale order, set a partner and click on "configure new product". In the wizard that pops up, selecting a template won't do the job because of that other pending web client bug: https://bugs.launchpad.net/openobject-client-web/+bug/485304
So instead, just select a variant directly to keep avancing in the conifigurator regardless of the feature loss.

Then click on OK that brings you back to the sale order line view, which is already good (that is thanks to one of the target="new").

But in that order line view, if you click on "Validate", instead of bringing you back on the current order line (validate has a target="new" button), unlike the GTK client, it will blow up with the following stack:

127.0.0.1 - - [15/Dec/2009:10:43:41] "POST /form/save?_terp_button%2Fname=configurator_line_write&_terp_button%2Fbtype=object&_terp_button%2Fmodel=sale.order.line&_terp_button%2Fid=15 HTTP/1.1" 200 480 "http://localhost:8080/form/save?_terp_button%2Fname=configure_line&_terp_button%2Fbtype=object&_terp_button%2Fmodel=product_variant_configurator.configurator&_terp_button%2Fid=" "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.6 (KHTML, like Gecko) Chrome/4.0.266.0 Safari/532.6"
[15/Dec/2009:10:43:41] HTTP Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/rvalyi/DEV/openerp5.0/openobject-client-web-5.0/openerp/controllers/base.py", line 130, in wrapper
    return fn(*args, **kw)
  File "/home/rvalyi/DEV/openerp5.0/openobject-client-web-5.0/openerp/tools/expose.py", line 204, in func_wrapper
    res = func(*args, **kw)
  File "/home/rvalyi/DEV/openerp5.0/openobject-client-web-5.0/openerp/tools/utils.py", line 109, in func_wrapper
    form = init_form(args and args[0] or kw["self"])
  File "/home/rvalyi/DEV/openerp5.0/openobject-client-web-5.0/openerp/tools/utils.py", line 99, in <lambda>
    init_form = lambda self: form(self)
  File "/home/rvalyi/DEV/openerp5.0/openobject-client-web-5.0/openerp/controllers/form.py", line 158, in get_validation_schema
    form = self.create_form(params)
  File "/home/rvalyi/DEV/openerp5.0/openobject-client-web-5.0/openerp/controllers/form.py", line 199, in create_form
    params.view_type = params.view_type or params.view_mode[0]
TypeError: 'NoneType' object is unsubscriptable

Hope this helps

Changed in openobject-client-web:
assignee: nobody → noz (Tiny) (noz-tiny)
Revision history for this message
Navrang Oza (noz-tiny) wrote :

Hello,

I am not facing any problem.
Yes, order line window is not close after clicking on Validate button.

Thanks.

Navrang Oza (noz-tiny)
Changed in openobject-client-web:
status: New → Invalid
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.