summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/framework/utils.js')
-rw-r--r--addons/web/static/src/js/framework/utils.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/utils.js b/addons/web/static/src/js/framework/utils.js
index 5caf995c988..393f3766bed 100644
--- a/addons/web/static/src/js/framework/utils.js
+++ b/addons/web/static/src/js/framework/utils.js
@@ -332,6 +332,11 @@ function assert (bool) {
}
}
+/* Logical XOR */
+function xor (a, b) {
+ return (a && !b) || (!a && b);
+}
+
var DropMisordered = Class.extend({
/**
* @constructs instance.web.DropMisordered
@@ -393,6 +398,7 @@ return {
round_decimals: round_decimals,
float_is_zero: float_is_zero,
assert: assert,
+ xor: xor,
DropMisordered: DropMisordered,
};