Merge lp:~jfb-tempo-consulting/unifield-web/US-1282 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4965
Proposed branch: lp:~jfb-tempo-consulting/unifield-web/US-1282
Merge into: lp:unifield-web
Diff against target: 36 lines (+6/-2)
2 files modified
addons/openerp/widgets/form/_m2m.py (+4/-2)
addons/openerp/widgets/templates/listgrid/button.mako (+2/-0)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-web/US-1282
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+367333@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/widgets/form/_m2m.py'
2--- addons/openerp/widgets/form/_m2m.py 2018-10-24 17:37:27 +0000
3+++ addons/openerp/widgets/form/_m2m.py 2019-05-13 07:25:32 +0000
4@@ -86,7 +86,8 @@
5 ids = attrs.get('value') or []
6
7 id = (ids or None) and ids[0]
8-
9+
10+ parent_id = params.get('_terp_id')
11 pprefix = ''
12 if '/' in self.name:
13 pprefix = self.name[:self.name.rindex('/')]
14@@ -137,7 +138,8 @@
15 self.context,
16 dict(cherrypy.request.terp_record,
17 context=current.context,
18- active_id=current.id or False))
19+ active_id=current.id or False,
20+ parent_id=parent_id))
21 current.context.update(ctx)
22 except:
23 pass
24
25=== modified file 'addons/openerp/widgets/templates/listgrid/button.mako'
26--- addons/openerp/widgets/templates/listgrid/button.mako 2018-08-03 15:34:01 +0000
27+++ addons/openerp/widgets/templates/listgrid/button.mako 2019-05-13 07:25:32 +0000
28@@ -10,6 +10,8 @@
29
30 if btype == 'openform':
31 onclickAction="new One2Many('%s', false).edit(%s, 0, 1);" % (parent_grid, id)
32+ elif btype == 'deletem2m':
33+ onclickAction="new Many2Many('%s').remove(%s); return false;" % (parent_grid, id)
34 else:
35 onclickAction="new ListView('%s').onButtonClick('%s', '%s', %s, getNodeAttribute(this, 'confirm'), getNodeAttribute(this, 'context'));" % (parent_grid, name, btype, ids)
36 oncontextmenuAction="showBtnSdref(event, '%s', '%s', '%s', '%s');" % (name, model, ids, parent_grid)

Subscribers

People subscribed via source and target branches