Skip to content
Snippets Groups Projects
Commit 878a92b5 authored by William Henrotin's avatar William Henrotin
Browse files

[FIX] mrp: 'To consume' field disappear


The custom 'to consume' widget wrap the classic float widget into a
<span> tag to add a non editable part to display. The issue this commit
fix is the following: the float widget element is this.$el in
_renderEdit. Appending it to a new element make it loose its link to the
DOM. The custom widget is totally blank.
This commit clone this.$el before surrounding it by the new span

Task : 2278147

closes odoo/odoo#54042

X-original-commit: 01bb1fce77cce3d54cd969e643b7c720673f2b22
Related: odoo/upgrade#1451
Related: odoo/enterprise#11645
Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
parent 59531bc1
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ var MrpShouldConsume = FieldFloat.extend({
// without losing track of the actual input.
var def = this._super.apply(this, arguments);
if (this.displayShouldConsume) {
var $container = this._addShouldConsume(this.$el, this.should_consume_qty);
var $container = this._addShouldConsume(this.$el.clone(), this.should_consume_qty);
$container.addClass('o_row');
this.$el = $container;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment