[FIX] web: list: multi edit input of date(time) fields
The Date(Time)Fields listen to 'input' and 'change' events (like all InputFields) to keep track of changes. However, the datepicker already listens to the 'change' event. As a consequence, in multi edition in a list view, if the user changed the value of a date(time) field by directly editing the input, the fieldChanged event was triggered twice, and there were 2 dialogs asking the user if he wanted to save the change. This rev. makes the Date(Time)Fields stop listening themselves to 'input' and 'change' events, and instead completely rely on the datepicker widget. Task 2068280
This commit is contained in:
@@ -684,6 +684,9 @@ var FieldDate = InputField.extend({
|
||||
className: "o_field_date",
|
||||
tagName: "span",
|
||||
supportedFieldTypes: ['date', 'datetime'],
|
||||
// we don't need to listen on 'input' nor 'change' events because the
|
||||
// datepicker widget is already listening, and will correctly notify changes
|
||||
events: AbstractField.prototype.events,
|
||||
|
||||
/**
|
||||
* @override
|
||||
|
||||
Reference in New Issue
Block a user