summaryrefslogtreecommitdiff
path: root/addons/mrp/static/src/js
diff options
context:
space:
mode:
authorWilliam Henrotin <whe@odoo.com>2020-07-01 15:10:02 +0000
committerWilliam Henrotin <whe@odoo.com>2020-07-03 11:22:16 +0000
commit878a92b528327b8dfad0dd49a80ce73f2ff2db94 (patch)
treef383df2ca9f845f1517af447448118a2edea2e56 /addons/mrp/static/src/js
parent59531bc10a9e53692c95654b1e6ab785b0a42ea4 (diff)
[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: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/mrp/static/src/js')
-rw-r--r--addons/mrp/static/src/js/mrp_should_consume.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp/static/src/js/mrp_should_consume.js b/addons/mrp/static/src/js/mrp_should_consume.js
index 50b4f3f893b..d0503eac3f2 100644
--- a/addons/mrp/static/src/js/mrp_should_consume.js
+++ b/addons/mrp/static/src/js/mrp_should_consume.js
@@ -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;
};