summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
diff options
context:
space:
mode:
authorjvm-odoo <jvm@odoo.com>2019-10-24 09:34:52 +0000
committerfw-bot <otis@odoo.com>2019-10-28 11:54:10 +0000
commite2176749f6774196c76955319c753f28e849942d (patch)
tree1b45f1f15cc657870b2cf3ebe69f5f3eba007abe /addons/web/static/src/js/fields
parent5fef9d27d05027d3e1d9598cf51a0f7d23d74251 (diff)
[FIX] web: fix relational field slow connection multi-edit
To reproduce the issue, go in the settings of the employee app, simulate a slow 3G connection, modify the working hours: * Select the first one, modify it but don't save it, * Click on some others working hours consecutively They will be all editable * Edit them quickly Before this commit: - You get an error After this commit: - You get no error and the behavior is the same than in V12: the working hours are updated consecutively Note: when you stress the relational field quickly, there is a moment where this.$el is undefined. This is the reason why the error is raised. OPW-2088558 closes odoo/odoo#39435 X-original-commit: 2acb76ffbb2f1ca2a6af0e316da15ce605f2273a Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields')
-rw-r--r--addons/web/static/src/js/fields/relational_fields.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js
index 4a68c140056..49fe8cff00d 100644
--- a/addons/web/static/src/js/fields/relational_fields.js
+++ b/addons/web/static/src/js/fields/relational_fields.js
@@ -2721,7 +2721,7 @@ var FieldSelection = AbstractField.extend({
* @returns {jQuery}
*/
getFocusableElement: function () {
- return this.$el.is('select') ? this.$el : $();
+ return this.$el && this.$el.is('select') ? this.$el : $();
},
/**
* @override