[MERGE] forward port of branch 8.0 up to 27b3851

This commit is contained in:
Christophe Simonis
2015-11-03 12:58:02 +01:00
2 changed files with 9 additions and 4 deletions
@@ -133,7 +133,7 @@
// TODO: link nodes with same content
node.className += ' oe_translatable_text';
node.setAttribute('data-oe-translation-view-id', view_id);
var content = $(node).text().trim();
var content = $(node).html().trim();
var trans = this.translations.filter(function (t) {
return t.res_id === view_id && t.value && t.value.trim() === content;
});
@@ -163,8 +163,8 @@
trans[data.oeTranslationViewId] = [];
}
trans[data.oeTranslationViewId].push({
initial_content: openerp.qweb.tools.html_escape(self.getInitialContent(this)),
new_content: openerp.qweb.tools.html_escape($node.text()),
initial_content: self.getInitialContent(this),
new_content: $node.html(),
translation_id: data.oeTranslationId || null
});
});
+6 -1
View File
@@ -70,7 +70,12 @@ class WorkflowInstance(object):
cr = self.session.cr
cr.execute("select * from wkf_workitem where inst_id=%s", (self.instance['id'],))
stack = []
for work_item_values in cr.dictfetchall():
for i, work_item_values in enumerate(cr.dictfetchall()):
if i > 0:
# test if previous workitem has already processed this one
cr.execute("select id from wkf_workitem where id=%s", (work_item_values['id'],))
if not cr.fetchone():
continue
wi = WorkflowItem(self.session, self.record, work_item_values)
wi.process(signal=signal, force_running=force_running, stack=stack)
# An action is returned