ci before merge
bzr revid: ahu@openerp.com-20111130102811-87venjx5ez3d46hp
This commit is contained in:
commit
4ceed8ea6b
|
@ -373,6 +373,12 @@ QWeb2.Engine = (function() {
|
|||
if (!this.jQuery) {
|
||||
return this.tools.exception("Can't extend template " + template + " without jQuery");
|
||||
}
|
||||
var template_dest = this.templates[template],
|
||||
msie_trololo = false;
|
||||
if (template_dest.xml !== undefined) {
|
||||
template_dest = this.jQuery(template_dest.xml);
|
||||
msie_trololo = true;
|
||||
}
|
||||
for (var i = 0, ilen = extend_node.childNodes.length; i < ilen; i++) {
|
||||
var child = extend_node.childNodes[i];
|
||||
if (child.nodeType === 1) {
|
||||
|
@ -382,7 +388,7 @@ QWeb2.Engine = (function() {
|
|||
target,
|
||||
error_msg = "Error while extending template '" + template;
|
||||
if (jquery) {
|
||||
target = this.jQuery(jquery, this.templates[template]);
|
||||
target = this.jQuery(jquery, template_dest);
|
||||
} else if (xpath) {
|
||||
// NOTE: due to the XPath implementation, extending a template will only work once
|
||||
// when using XPath because XPathResult won't match objects with other constructor than 'Element'
|
||||
|
@ -415,6 +421,9 @@ QWeb2.Engine = (function() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (msie_trololo) {
|
||||
this.templates[template] = template_dest[0];
|
||||
}
|
||||
}
|
||||
});
|
||||
return Engine;
|
||||
|
|
|
@ -113,6 +113,8 @@ $(document).ready(function () {
|
|||
equal(g("12345678", [2, 0, 1], '.'), '12.34.56.78');
|
||||
equal(g("12345678", [2, 0, 0], '.'), '12.34.56.78');
|
||||
equal(g("12345678", [2, 0, -1], '.'), '12.34.56.78');
|
||||
equal(g("12345678", [3,3,3,3], '.'), '12.345.678');
|
||||
equal(g("12345678", [3,0], '.'), '12.345.678');
|
||||
});
|
||||
test('format_integer', function () {
|
||||
openerp.web._t.database.parameters.grouping = [3, 3, 3, 3];
|
||||
|
|
|
@ -380,7 +380,11 @@ openerp.web_kanban.KanbanRecord = openerp.web.Widget.extend({
|
|||
new_record = {};
|
||||
_.each(record, function(value, name) {
|
||||
var r = _.clone(self.view.fields_view.fields[name] || {});
|
||||
r.raw_value = value;
|
||||
if ((r.type === 'date' || r.type === 'datetime') && value) {
|
||||
r.raw_value = openerp.web.auto_str_to_date(value);
|
||||
} else {
|
||||
r.raw_value = value;
|
||||
}
|
||||
r.value = openerp.web.format_value(value, r);
|
||||
new_record[name] = r;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue