Odoo Hilfe

0

0
1 Antwort
3
Jigar Patel Indien
17.07.19, 01:14

Hello Rick,

I have not tested it. But it may work and help you a lot.
If you want to get performance then you can make one python method rather then RPC batch in js.


odoo.define('anser_ricardo', function (require) {

"use strict";

var CalendarModel = require('web.CalendarModel');

CalendarModel.include({

_getFullCalendarOptions: function () {
var res = this._super.apply(this, arguments);
return _.extend(res, {
minTime: this.custom_fc_options.start_time_key,
maxTime: this.custom_fc_options.stop_time_key,
slotDuration: this.custom_fc_options.slotDuration_time_key,
});
},
_loadCalendar: function () {
var self = this;
var args = arguments;
var sup = this._super;
var defs = [];
this.custom_fc_options = {};

_.each(['start_time_key', 'stop_time_key', 'slotDuration_time_key], function (param) {
var def = self._rpc({
model: 'ir.config_parameter',
method: 'get_param',
args: [param]
}).then(function (res) {
self.custom_fc_options[param] = res;
});
defs.push(def);
});

return $.when.apply($, defs).then(function () {
return sup.apply(self, args);
});
},

});

});
1 Kommentar
Rick Portugal
18.07.19, 04:16

it works perfectly! Thank you so much!

Fragen Sie
Writer
2582
Rick
Stichwörter
Keep Informed
1 Verfolger
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now