Merge lp:~unifield-team/unifield-web/uf-844 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4634
Proposed branch: lp:~unifield-team/unifield-web/uf-844
Merge into: lp:unifield-web
Diff against target: 22 lines (+6/-5)
1 file modified
addons/openerp/controllers/listgrid.py (+6/-5)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/uf-844
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+99787@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/listgrid.py'
2--- addons/openerp/controllers/listgrid.py 2011-12-30 08:51:35 +0000
3+++ addons/openerp/controllers/listgrid.py 2012-03-28 16:44:45 +0000
4@@ -74,12 +74,13 @@
5 data = {fld : [(id and 1, id, data.copy())]}
6 proxy.write([params.parent.id], data, ctx)
7
8- all_ids = proxy.read([params.parent.id], [fld])[0][fld]
9- new_ids = [i for i in all_ids if i not in ids]
10+ if not id:
11+ all_ids = proxy.read([params.parent.id], [fld])[0][fld]
12+ new_ids = [i for i in all_ids if i not in ids]
13
14- ids = all_ids
15- if new_ids:
16- id = new_ids[0]
17+ ids = all_ids
18+ if new_ids:
19+ id = new_ids[0]
20
21 else:
22 data = frm.copy()

Subscribers

People subscribed via source and target branches

to all changes: