<commit_before>openerp.crm_partner_assign = function (instance) {
	instance.crm_partner_assign = instance.crm_partner_assign || {};
	instance.crm_partner_assign.next_or_list = function(parent) {
		if (parent.inner_widget.active_view === "form"){
			var form = parent.inner_widget.views.form.controller;
			form.dataset.remove_ids([form.dataset.ids[form.dataset.index]]);
			form.reload();
			if (!form.dataset.ids.length){
				parent.inner_widget.switch_mode('list');
			}
		}
		else{
			parent.inner_widget.views[parent.inner_widget.active_view].controller.reload();
		}
		parent.do_action({ type: 'ir.actions.act_window_close' });
	};
	instance.web.client_actions.add("next_or_list", "instance.crm_partner_assign.next_or_list");
}<commit_msg>[MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 9138 revid:d<EMAIL>-20140221161633-634gj6mlyyahg867<commit_after>openerp.crm_partner_assign = function (instance) {
	instance.crm_partner_assign = instance.crm_partner_assign || {};
	instance.crm_partner_assign.next_or_list = function(parent) {
		var view = parent.inner_widget.active_view;
		var controller = parent.inner_widget.views[view].controller;
		if (view === "form"){
			if (controller.dataset.size()) {
	            controller.execute_pager_action('next');
	        } else {
	            controller.do_action('history_back');
	        }
    	}
		controller.do_action({ type: 'ir.actions.act_window_close' });
		if (view === "list"){
    		controller.records.remove(controller.records.get(parent.dialog_widget.action.context.active_id));
    	}
	};
	instance.web.client_actions.add("next_or_list", "instance.crm_partner_assign.next_or_list");
}
{'fraction_non_alphanumeric': 0.14182257091128544, 'fraction_numerical': 0.015691007845503924, 'mean_word_length': 4.838028169014085, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4433122', 'n_tokens_mistral': 624, 'n_tokens_neox': 570, 'n_words': 65}