[FIX] hr_attendance: Kiosk mode

After #56a8c9e4311d24c33b7ad08b8230e4be345a85b8 we check access rights in function fields_view_get,
so a user with only 'Kiosk Attendance' right can't see public
employee profile.

After this commit:
In attendance application, we always show public employee profile
as it not usefull to show more information in this application.

closes odoo/odoo#55341

Taskid: 2298803
X-original-commit: 1fbb8f1ebcb805317b93e0b4ea363aaec8e3e36e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
jbm-odoo
2020-08-03 15:11:54 +00:00
parent 01f93f7a4b
commit a9a64ffc0c
2 changed files with 2 additions and 2 deletions
@@ -14,7 +14,7 @@ KanbanRecord.include({
* @private
*/
_openRecord: function () {
if (this.modelName === 'hr.employee' && this.$el.parents('.o_hr_employee_attendance_kanban').length) {
if (this.modelName === 'hr.employee.public' && this.$el.parents('.o_hr_employee_attendance_kanban').length) {
// needed to diffentiate : check in/out kanban view of employees <-> standard employee kanban view
var action = {
type: 'ir.actions.client',
@@ -152,7 +152,7 @@
<record id="hr_employee_attendance_action_kanban" model="ir.actions.act_window">
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="res_model">hr.employee.public</field>
<field name="view_mode">kanban</field>
<field name="view_id" ref="hr_employees_view_kanban"/>
<field name="target">fullscreen</field>