Skip to content

Commit

Permalink
[ADD] allow adding the attendance widget to dashboards
Browse files Browse the repository at this point in the history
fixes #82
  • Loading branch information
hbrunn committed Jan 22, 2024
1 parent 172b932 commit cf92715
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions verdigado_attendance/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"verdigado_attendance/static/src/scss/backend.scss",
"verdigado_attendance/static/src/js/systray.esm.js",
"verdigado_attendance/static/src/js/time_off_calendar.js",
"verdigado_attendance/static/src/js/board_renderer.js",
],
"web.assets_qweb": [
"verdigado_attendance/static/src/xml/hr_holidays.xml",
Expand Down
24 changes: 24 additions & 0 deletions verdigado_attendance/static/src/js/board_renderer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
odoo.define("verdigado_attendance.BoadRenderer", function (require) {
"use strict";
var BoardView = require("board.BoardView");
var core = require("web.core");

BoardView.prototype.config.Renderer.include({
_createController: function (params) {
if (params.viewType === "hr_attendance_my_attendances") {
var client_action = core.action_registry.get(
"hr_attendance_my_attendances"
);
var attendances = new client_action(this, {}, {});
attendances.do_action = function () {
params.$node.empty();
return attendances.appendTo(params.$node).then(function () {
return attendances.willStart();
});
};
return attendances.appendTo(params.$node);
}
return this._super.apply(this, arguments);
},
});
});
9 changes: 9 additions & 0 deletions verdigado_attendance/static/src/scss/backend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ span[data-menu-xmlid="mail.menu_root_discuss"] {
background-color: #e7f7eb !important;
}
}

.oe_dashboard .o_hr_attendance_kiosk_mode_container {
position: relative;
margin-top: 90px;
}

.oe_dashboard .o_hr_attendance_kiosk_backdrop {
background: none;
}

0 comments on commit cf92715

Please sign in to comment.