Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] resource: update default calendar timezone on first admin login (follow-up) #162498

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 18, 2024

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: #84258

task-3793313


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #157583

… (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: odoo#84258

task-3793313

X-original-commit: b280a9b
@robodoo
Copy link
Contributor

robodoo commented Apr 18, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 18, 2024

This PR targets saas-16.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 18, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 18, 2024
robodoo pushed a commit that referenced this pull request Apr 22, 2024
… (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: #84258

task-3793313

closes #162498

X-original-commit: b280a9b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
@robodoo robodoo closed this Apr 22, 2024
nd-dew pushed a commit to odoo-dev/odoo that referenced this pull request Apr 30, 2024
… (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: odoo#84258

task-3793313

closes odoo#162498

X-original-commit: b280a9b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants