[FIX] website: backend editor try to save the history in readonly mode when user change the record

This commit is contained in:
Christophe Matthieu
2015-02-12 16:51:29 +01:00
parent c93664e30d
commit b84817bb78
@@ -4,8 +4,10 @@
window.top.openerp[callback+"_set_value"] = function (value, fields_values) {
var $editable = $("#wrapwrap .o_editable:first");
if (value !== $editable.html()) {
openerp.website.editor_bar.rte.historyRecordUndo($editable);
openerp.website.editor_bar.snippets.make_active(false);
if ($('body').hasClass('editor_enable')) {
openerp.website.editor_bar.rte.historyRecordUndo($editable);
openerp.website.editor_bar.snippets.make_active(false);
}
$editable.html(value);
}
};