Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet

Hi

Is it possible to define the calendar event colors in System Parameters?

I've set up the colors in a css file, but only changes in my Database, in others the values of color is different and i need to set a javascript to use System Parameters that i define in those colors.

I once did this with calendar hours and define the min Time and maxTime in parameters, like this:

CalendarModel.include({

_getFullCalendarOptions: function () {
var res = this._super.apply(this, arguments);
return _.extend(res, {
minTime: this.custom_fc_options['calendar.start_time'],
maxTime: this.custom_fc_options['calendar.end_time'],
slotDuration: this.custom_fc_options['calendar.slot_duration'],
});
},
_loadCalendar: function () {
var self = this;
var args = arguments;
var sup = this._super;
var defs = [];
this.custom_fc_options = {};

_.each(['calendar.start_time', 'calendar.end_time', 'calendar.slot_duration'], 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);
});
},

});


But i can't do it with colors, can anyone help me?


Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
4
Juli 24
10898
1
Mai 21
15880
1
Juli 19
4335
1
Juli 19
267
1
Juli 24
2876