~fabien-morin/unifield-web/fm-us-3172

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/form.js

  • Committer: jf
  • Date: 2017-08-21 10:12:40 UTC
  • mfrom: (4850.1.3 fm-us-3203)
  • Revision ID: jfb@tempo-consulting.fr-20170821101240-vubzt2qxlnvj610n
US-3203 [IMP] Windows action: don't reload the initial page

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
            openobject.dom.get('_terp_id').value = ids[0];
179
179
        }
180
180
    }
181
 
    submit_form(get_form_action('switch', {
182
 
        '_terp_source': src,
183
 
        '_terp_source_view_type': view_type
184
 
    }));
 
181
    if (!openobject.dom.get('_terp_view_type') || openobject.dom.get('_terp_view_type').value != view_type) {
 
182
        submit_form(get_form_action('switch', {
 
183
            '_terp_source': src,
 
184
            '_terp_source_view_type': view_type
 
185
        }));
 
186
    }
185
187
}
186
188
 
187
189
function validate_required(form){