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

Proposed by jftempo
Status: Merged
Merged at revision: 5000
Proposed branch: lp:~jfb-tempo-consulting/unifield-web/US-7243_2
Merge into: lp:unifield-web
Diff against target: 47 lines (+14/-9)
2 files modified
addons/openerp/controllers/search.py (+2/-0)
addons/openerp/controllers/templates/search.mako (+12/-9)
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-web/US-7243_2
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+393183@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/search.py'
2--- addons/openerp/controllers/search.py 2019-01-28 15:54:39 +0000
3+++ addons/openerp/controllers/search.py 2020-11-02 12:53:21 +0000
4@@ -91,6 +91,8 @@
5 proxy = rpc.RPCProxy(model)
6 params.search_text = False
7
8+ if model == 'financing.contract.account.quadruplet':
9+ proxy.gen_quadruplet(ctx)
10 # parent's search_view has no business being in m2o or m2m
11 if '_terp_context' in params and 'search_view' in params['_terp_context']:
12 params.get('_terp_context').pop('search_view', None)
13
14=== modified file 'addons/openerp/controllers/templates/search.mako'
15--- addons/openerp/controllers/templates/search.mako 2017-06-01 13:48:36 +0000
16+++ addons/openerp/controllers/templates/search.mako 2020-11-02 12:53:21 +0000
17@@ -66,18 +66,21 @@
18 }
19 </script>
20 % else:
21- <script type="text/javascript">
22+ <script type="text/javascript">
23 function close_dialog() {
24 jQuery.m2m('close');
25 }
26- function do_select(id) {
27- jQuery.m2m('close',
28- id ? [parseInt(id, 10)].concat(ListView('_terp_list').get_previously_selected())
29- : ListView('_terp_list').get_previously_selected()
30-
31- );
32- }
33- </script>
34+ function do_select(id) {
35+ var prev_selected = ListView('_terp_list').get_previously_selected();
36+ if (id) {
37+ var int_id = parseInt(id, 10);
38+ if (jQuery.inArray(int_id, prev_selected) == -1) {
39+ prev_selected.push(int_id);
40+ }
41+ }
42+ jQuery.m2m('close', prev_selected);
43+ }
44+ </script>
45 % endif
46 % endif
47 <script type="text/javascript">

Subscribers

People subscribed via source and target branches