Skip to content
Snippets Groups Projects
Commit fd3febe2 authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[fix] error JS action view theoretical time

parent 0a50756d
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,7 @@ class ScopMonthTimesheet(models.Model):
lambda x: {
"year": x.year,
"num_month": x.month,
"month": self._fields["month"].selection[x.month - 1][1],
"month": self._fields["month"].selection[int(x.month) - 1][1],
}
),
"values": month_values.mapped("working_time"),
......
......@@ -11,18 +11,17 @@ odoo.define("cgscop_timesheet.ur_month_timesheet", function (require) {
template: "ScopMonthTimesheet",
willStart: function () {
var deferred = new jQuery.Deferred();
var superDef = this._super.apply(this, arguments);
var self = this;
this.values = {};
this._rpc({
var def = this._rpc({
model: "ur.month.timesheet",
method: "get_month_values",
args: [],
}).then(function (results) {
self.values = results;
deferred.resolve();
});
return jQuery.when(this._super.apply(this, arguments), deferred);
return Promise.all([superDef, def]);
},
// Start: function () {},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment