Merge lp:~unifield-team/unifield-web/uf_606_get_selection_on_m2o into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4589
Proposed branch: lp:~unifield-team/unifield-web/uf_606_get_selection_on_m2o
Merge into: lp:unifield-web
Diff against target: 14 lines (+4/-0)
1 file modified
addons/openerp/widgets/form/_form.py (+4/-0)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/uf_606_get_selection_on_m2o
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+86950@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/_form.py'
2--- addons/openerp/widgets/form/_form.py 2011-08-22 10:15:06 +0000
3+++ addons/openerp/widgets/form/_form.py 2011-12-27 13:30:33 +0000
4@@ -979,6 +979,10 @@
5 if self.readonly:
6 attrs['readonly'] = True
7
8+ if attrs.get('get_selection') and kind == 'selection' and attrs.get('type2') == 'many2one' and self.id:
9+ proxy = rpc.RPCProxy(self.model)
10+ attrs['selection'] = getattr(proxy, attrs['get_selection'])(self.id, name)
11+
12 field = get_widget(kind)(**attrs)
13
14 if isinstance(field, TinyInputWidget):

Subscribers

People subscribed via source and target branches

to all changes: