Browse Source

[REM] Remove inheritance on DateTimeWidget

The inheritance of the start function is not needed, because
the function is already inherited from DateWidget.
pull/685/head
Stephan Rozendaal 7 years ago
parent
commit
b13a91ad0e
  1. 16
      web_widget_datepicker_options/static/src/js/datepicker.js

16
web_widget_datepicker_options/static/src/js/datepicker.js

@ -24,24 +24,8 @@ odoo.define('web_widget_datepicker_options', function (require) {
var core = require('web.core');
var DateTimeWidget = require('web.datepicker').DateTimeWidget;
var DateWidget = require('web.datepicker').DateWidget;
DateTimeWidget.include({
start: function(parent, options) {
this._super.apply(this, arguments);
var self = this;
if (this.__parentedParent.options.datepicker) {
var options = this.__parentedParent.options.datepicker;
$.each(options, function(value, key) {
self.options[value] = key;
self.picker[value] = key;
self.picker.options[value] = key;
});
}
},
});
DateWidget.include({
init: function(parent, options) {
this._super.apply(this, arguments);

Loading…
Cancel
Save