odoo/odoo#162561
Created by fw-bot
- label
- odoo-dev:saas-17.2-15.0-fix_resource_default_admin_calendar_tz-mane-qBE8-fw
- head
- ef5a9742337a577c91f3084a7ab965b0588e2eef
- target
- saas-17.2
- merged
- 4 weeks ago by Fun Services, Xavier Bol (xbo)
- forward-port of
- odoo/odoo#157583
[FW][FIX] resource: update default calendar timezone on first admin login (follow-up)
Steps to reproduce:
-------------------
1. Install the resource module without demo data (or install any module which depends on it, again without demo data).
2. Login with the administrator user for the first time.
3. The default resource calendar (e.g. "Standard 40 hours/week") timezone will be set to 'UTC' by default while it should be set to the timezone of the administrator.
Fix:
-------------------
When there is no demo data, no resource_calendar_id is linked to the admin. In this case, we need to retrieve the record of the default working calendar and set its timezone to the one of the admin user on the first login.
This is a follow-up of this fix: https://github.com/odoo/odoo/pull/84258
task-3793313
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#157583