[MERGE] forward port of branch 7.0 up to 75d3ea6
This commit is contained in:
commit
db759948ff
|
@ -451,7 +451,8 @@ class email_template(osv.osv):
|
||||||
values = results[res_id]
|
values = results[res_id]
|
||||||
if 'body_html' in fields and template.user_signature:
|
if 'body_html' in fields and template.user_signature:
|
||||||
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
|
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
|
||||||
values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
|
if signature:
|
||||||
|
values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
|
||||||
if values.get('body_html'):
|
if values.get('body_html'):
|
||||||
values['body'] = tools.html_sanitize(values['body_html'])
|
values['body'] = tools.html_sanitize(values['body_html'])
|
||||||
values.update(
|
values.update(
|
||||||
|
|
|
@ -202,7 +202,7 @@
|
||||||
<para style="terp_default_9">Net Total :</para>
|
<para style="terp_default_9">Net Total :</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_total, currency_obj=o.pricelist_id.currency_id) ]]</para>
|
<para style="terp_default_Right_9">[[ formatLang(o.amount_total - o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
<para style="terp_default_Bold_9">Total:</para>
|
<para style="terp_default_Bold_9">Total:</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total + o.amount_tax, currency_obj=o.pricelist_id.currency_id) ]]</para>
|
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, currency_obj=o.pricelist_id.currency_id) ]]</para>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
|
|
|
@ -119,6 +119,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
this.mutating_mutex = new $.Mutex();
|
this.mutating_mutex = new $.Mutex();
|
||||||
this.on_change_list = [];
|
this.on_change_list = [];
|
||||||
this.save_list = [];
|
this.save_list = [];
|
||||||
|
this.render_value_defs = [];
|
||||||
this.reload_mutex = new $.Mutex();
|
this.reload_mutex = new $.Mutex();
|
||||||
this.__clicked_inside = false;
|
this.__clicked_inside = false;
|
||||||
this.__blur_timeout = null;
|
this.__blur_timeout = null;
|
||||||
|
@ -697,6 +698,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
} else if (mode === "create") {
|
} else if (mode === "create") {
|
||||||
mode = "edit";
|
mode = "edit";
|
||||||
}
|
}
|
||||||
|
this.render_value_defs = [];
|
||||||
this.set({actual_mode: mode});
|
this.set({actual_mode: mode});
|
||||||
},
|
},
|
||||||
check_actual_mode: function(source, options) {
|
check_actual_mode: function(source, options) {
|
||||||
|
@ -747,12 +749,15 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
on_button_cancel: function(event) {
|
on_button_cancel: function(event) {
|
||||||
|
var self = this;
|
||||||
if (this.can_be_discarded()) {
|
if (this.can_be_discarded()) {
|
||||||
if (this.get('actual_mode') === 'create') {
|
if (this.get('actual_mode') === 'create') {
|
||||||
this.trigger('history_back');
|
this.trigger('history_back');
|
||||||
} else {
|
} else {
|
||||||
this.to_view_mode();
|
this.to_view_mode();
|
||||||
this.trigger('load_record', this.datarecord);
|
$.when.apply(null, this.render_value_defs).then(function(){
|
||||||
|
self.trigger('load_record', self.datarecord);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.trigger('on_button_cancel');
|
this.trigger('on_button_cancel');
|
||||||
|
@ -2257,7 +2262,7 @@ instance.web.form.ReinitializeWidgetMixin = {
|
||||||
instance.web.form.ReinitializeFieldMixin = _.extend({}, instance.web.form.ReinitializeWidgetMixin, {
|
instance.web.form.ReinitializeFieldMixin = _.extend({}, instance.web.form.ReinitializeWidgetMixin, {
|
||||||
reinitialize: function() {
|
reinitialize: function() {
|
||||||
instance.web.form.ReinitializeWidgetMixin.reinitialize.call(this);
|
instance.web.form.ReinitializeWidgetMixin.reinitialize.call(this);
|
||||||
this.render_value();
|
this.view.render_value_defs.push(this.render_value());
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4452,9 +4457,8 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
||||||
self.render_tag(data);
|
self.render_tag(data);
|
||||||
}
|
}
|
||||||
if (! values || values.length > 0) {
|
if (! values || values.length > 0) {
|
||||||
this._display_orderer.add(self.get_render_data(values)).done(handle_names);
|
return this._display_orderer.add(self.get_render_data(values)).done(handle_names);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
handle_names([]);
|
handle_names([]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue