Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- odoo.define('custom_maintenance.custom_stage_confirm', function (require) {
- "use strict";
- //require the module to modify:
- var relational_fields = require('web.relational_fields');
- var core = require('web.core');
- var Dialog = require('web.Dialog');
- var _t = core._t;
- //override the method:
- relational_fields.FieldStatus.include({
- /**
- * Called when on status stage is clicked -> sets the field value.
- * @private
- * @param {MouseEvent} e
- */
- _onClickStage: function (e) {
- var self = this;
- Dialog.confirm(this, _t("You sure mate?"), {
- confirm_callback: function () {
- self._setValue($(e.currentTarget).data("value"));
- },
- });
- },
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement