OCA / helpdesk

Odoo modules for managing a HelpDesk system
GNU Affero General Public License v3.0
151 stars 318 forks source link

allow_timesheet field is not accessible for user without 'hr_timesheet.group_hr_timesheet_user' #624

Open sergiocorato opened 2 months ago

sergiocorato commented 2 months ago

The field is added in this view:

https://github.com/OCA/helpdesk/blob/4c012b6db65ef5741d5c6c33795885080be4237e/helpdesk_mgmt_timesheet/views/helpdesk_ticket_view.xml#L87

wich is accessible only from 'hr_timesheet.group_hr_timesheet_user', so this domain cannot be applied:

https://github.com/OCA/helpdesk/blob/4c012b6db65ef5741d5c6c33795885080be4237e/helpdesk_mgmt_timesheet/views/helpdesk_ticket_view.xml#L260

with this error:

Error: While parsing modifiers for field project_id: for modifier "required": Unknown field allow_timesheet in domain
    at Class._registerModifiers (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:1690:160)
    at Class._renderFieldWidget (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:1698:296)
    at Class._renderFieldWidget (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:2274:13)
    at prototype.<computed> [as _renderFieldWidget] (https://odoo.pretecno.com/web/content/23034-d908d5b/web.assets_common.js:4660:488)
    at Class._renderInnerGroupField (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:2284:381)
    at https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:2281:44
    at Array.forEach (<anonymous>)
    at Class._renderInnerGroup (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:2278:75)
    at Class._renderTagGroup (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:2294:248)
    at Class._renderNode (https://odoo.pretecno.com/web/content/23035-9ca47e3/web.assets_backend.js:2286:244