[MIG] web_widget_datepicker_fulloptions: Migration to 16.0

This commit is contained in:
Quentin Dupont
2024-02-02 13:46:16 +01:00
parent c4c9d5dfcd
commit ab82cd7402
9 changed files with 41 additions and 57 deletions

View File

@@ -0,0 +1,11 @@
/* @odoo-module */
import {DatePicker} from "@web/core/datepicker/datepicker";
Object.assign(DatePicker.defaultProps, {
buttons: {
showClear: true,
showClose: true,
showToday: true,
},
});

View File

@@ -1,23 +0,0 @@
/* Copyright 2021 Quentin DUPONT
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */
odoo.define(
"web_widget_datepicker_fulloptions.datepicker_fulloptions",
function (require) {
"use strict";
var DatePicker = require("web.datepicker");
DatePicker.DateWidget.include({
/**
* @override
*/
init: function (parent, options) {
this._super(parent, options);
this.options.useCurrent = true;
this.options.buttons.showToday = true;
this.options.buttons.showClear = true;
this.options.buttons.showClose = true;
},
});
}
);