← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 701298] Re: Deleting a new, unsaved record causes ValueError

 

** Changed in: openobject-client
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/701298

Title:
  Deleting a new, unsaved record causes ValueError

Status in OpenObject GTK Client:
  Fix Released

Bug description:
  Here's a detailed description of one way to cause this error:
1. Create a new database with sample data and any profile. Complete the installation.
2. Go to the Partners screen and click the New button to create a new partner.
3. Type "Foo" in the Name field.
4. Click the Delete button.
5. A dialog box appears, "Record is not saved ! Do you want to clear current record?" Click the OK button.

Expected behaviour:
Either all the fields are cleared back to default values, or the screen loads an existing partner and takes you out of the "new record" mode.

Actual behaviour:
None of the fields change value. An error appears in the client error log:
Traceback (most recent call last):
  File "/mnt/workspace/don/openerp-bzr/client/delete-new-record/bin/modules/gui/main.py", line 1334, in _sig_child_call
    res = wid.handlers[button_name]()
  File "/mnt/workspace/don/openerp-bzr/client/delete-new-record/bin/modules/gui/window/form.py", line 263, in sig_remove
    id = self.screen.remove(unlink=True)
  File "/mnt/workspace/don/openerp-bzr/client/delete-new-record/bin/widget/screen/screen.py", line 507, in remove
    idx = self.models.models.index(self.current_model)
ValueError: list.index(x): x not in list

I am testing this with OpenERP 5.0.15 running on Ubuntu 5.0.15.





References