[FIX] web: always display handle widget

Before this commit, a list containing a handle widget would only display
the handles associated with non-zero integer values. This is due to the
fact that unset fields are hidden in Odoo, while a field is by default
considered 'defined' if its value is truthy.

We override the isSet method for the handle widget to always return
true. This tells the handle widget that the associated integer value is
always defined, thereby ensuring that the handle will always be shown.
This commit is contained in:
Khoi Nguyen
2017-08-29 11:41:32 +02:00
parent d93726f9ac
commit 5149e18ec7
2 changed files with 25 additions and 0 deletions
@@ -846,6 +846,13 @@ var HandleWidget = AbstractField.extend({
tagName: 'span',
description: "",
supportedFieldTypes: ['integer'],
/*
* @override
*/
isSet: function () {
return true;
},
});
var FieldEmail = InputField.extend({