[MERGE] forward port of branch 8.0 up to 27b3851
This commit is contained in:
@@ -133,7 +133,7 @@
|
|||||||
// TODO: link nodes with same content
|
// TODO: link nodes with same content
|
||||||
node.className += ' oe_translatable_text';
|
node.className += ' oe_translatable_text';
|
||||||
node.setAttribute('data-oe-translation-view-id', view_id);
|
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) {
|
var trans = this.translations.filter(function (t) {
|
||||||
return t.res_id === view_id && t.value && t.value.trim() === content;
|
return t.res_id === view_id && t.value && t.value.trim() === content;
|
||||||
});
|
});
|
||||||
@@ -163,8 +163,8 @@
|
|||||||
trans[data.oeTranslationViewId] = [];
|
trans[data.oeTranslationViewId] = [];
|
||||||
}
|
}
|
||||||
trans[data.oeTranslationViewId].push({
|
trans[data.oeTranslationViewId].push({
|
||||||
initial_content: openerp.qweb.tools.html_escape(self.getInitialContent(this)),
|
initial_content: self.getInitialContent(this),
|
||||||
new_content: openerp.qweb.tools.html_escape($node.text()),
|
new_content: $node.html(),
|
||||||
translation_id: data.oeTranslationId || null
|
translation_id: data.oeTranslationId || null
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -70,7 +70,12 @@ class WorkflowInstance(object):
|
|||||||
cr = self.session.cr
|
cr = self.session.cr
|
||||||
cr.execute("select * from wkf_workitem where inst_id=%s", (self.instance['id'],))
|
cr.execute("select * from wkf_workitem where inst_id=%s", (self.instance['id'],))
|
||||||
stack = []
|
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 = WorkflowItem(self.session, self.record, work_item_values)
|
||||||
wi.process(signal=signal, force_running=force_running, stack=stack)
|
wi.process(signal=signal, force_running=force_running, stack=stack)
|
||||||
# An action is returned
|
# An action is returned
|
||||||
|
|||||||
Reference in New Issue
Block a user