Merge lp:~openerp-dev/openobject-client/6.1-opw-582620-rgo into lp:openobject-client/6.1

Proposed by Ravi Gohil (OpenERP)
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 2102
Merged at revision: 2103
Proposed branch: lp:~openerp-dev/openobject-client/6.1-opw-582620-rgo
Merge into: lp:openobject-client/6.1
Diff against target: 23 lines (+3/-3)
1 file modified
bin/widget/view/form_gtk/one2many_list.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.1-opw-582620-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Numérigraphe (community) bug reference in bzr commit Needs Fixing
Review via email: mp+137793@code.launchpad.net

Description of the change

Hello,

Steps to reproduce:
- Install project_scrum module,
- Open a record from "Project/Product Backlogs" in form view,
- Double click on a record from "Task" tab and cancel it and try to re-open that record

You wont be able to open it second time and a traceback is thrown client side saying,
"RuntimeError: dictionary changed size during iteration"

I have fixed this issue, kindly review it.

Thanks.

To post a comment you must log in.
2101. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Will you please be so kind as to add the bug reference in the bazaar history with the following command ?
   bzr commit --unchanged --fixes lp:1091301
Lionel Sausin.

review: Needs Fixing (bug reference in bzr commit)
2102. By Ravi Gohil (OpenERP)

[FIX]: If we open an o2m field and close it without changing it, we wont be able to open it again. : (Maintenance Case : 582620)

Revision history for this message
Ravi Gohil (OpenERP) (rgo-openerp) wrote :

Hi Lionel,

I have updated this branch with --fixes lp:1091301.

Thanks.

Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/widget/view/form_gtk/one2many_list.py'
2--- bin/widget/view/form_gtk/one2many_list.py 2012-10-03 06:39:32 +0000
3+++ bin/widget/view/form_gtk/one2many_list.py 2012-12-18 11:03:21 +0000
4@@ -312,8 +312,8 @@
5 models = []
6 for o2m_model in models:
7 values = o2m_model.value.copy()
8- model_value.setdefault(o2m_model, values)
9- group_model.setdefault(o2m_model, {})
10+ model_value[o2m_model] = values.copy()
11+ group_model[o2m_model] = {}
12 for key, val in values.iteritems():
13 if isinstance(val, ModelRecordGroup):
14 group_model[o2m_model][key] = val.models[:]
15@@ -324,7 +324,7 @@
16 def _restore_values(self, modified_model_values, group_model):
17 for model, value in modified_model_values.iteritems():
18 model.set(value, modified=True)
19- for f_name, models in group_model.get(model, {}):
20+ for f_name, models in group_model.get(model, {}).iteritems():
21 model.value[f_name].clear()
22 for sub_model in models:
23 # add model in ModelRecordGroup

Subscribers

People subscribed via source and target branches