Merge lp:~fabien-morin/unifield-web/fm-us-3203 into lp:unifield-web

Proposed by jftempo
Status: Merged
Merged at revision: 4854
Proposed branch: lp:~fabien-morin/unifield-web/fm-us-3203
Merge into: lp:unifield-web
Diff against target: 33 lines (+7/-5)
2 files modified
addons/openerp/static/javascript/form.js (+6/-4)
addons/openerp/widgets/templates/sidebar.mako (+1/-1)
To merge this branch: bzr merge lp:~fabien-morin/unifield-web/fm-us-3203
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+328308@code.launchpad.net
To post a comment you must log in.
4852. By Fabien MORIN

US-3203 [FIX] revert previous change, do the submit form with the new view only
if the new view is different from the current or can not be read.

4853. By Fabien MORIN

US-3203 [FIX] missing parenthesis

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/static/javascript/form.js'
2--- addons/openerp/static/javascript/form.js 2017-04-19 14:36:32 +0000
3+++ addons/openerp/static/javascript/form.js 2017-07-31 15:16:52 +0000
4@@ -178,10 +178,12 @@
5 openobject.dom.get('_terp_id').value = ids[0];
6 }
7 }
8- submit_form(get_form_action('switch', {
9- '_terp_source': src,
10- '_terp_source_view_type': view_type
11- }));
12+ if (!openobject.dom.get('_terp_view_type') || openobject.dom.get('_terp_view_type').value != view_type) {
13+ submit_form(get_form_action('switch', {
14+ '_terp_source': src,
15+ '_terp_source_view_type': view_type
16+ }));
17+ }
18 }
19
20 function validate_required(form){
21
22=== modified file 'addons/openerp/widgets/templates/sidebar.mako'
23--- addons/openerp/widgets/templates/sidebar.mako 2016-12-13 10:44:54 +0000
24+++ addons/openerp/widgets/templates/sidebar.mako 2017-07-31 15:16:52 +0000
25@@ -1,7 +1,7 @@
26 <%def name="sidebox_action_item(item, model, submenu, icon)">
27 % if submenu != 1:
28 <li action_id="${item['id']}" relation="${model}" domain="${item.get('domain')}" empty_ids="${item.get('empty_ids') and 1 or 0}"
29- context="${item.get('context')}" onclick="validate_action(this, do_action)">
30+ context="${item.get('context')}" onclick="validate_action(this, do_action);">
31 % if icon:
32 <img src="${icon}" alt=""/>
33 % endif

Subscribers

People subscribed via source and target branches