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

service/db: [IMP] add set user timezone in unambigous cases #23077

Closed
wants to merge 1 commit into from

Conversation

blaggacao
Copy link
Contributor

There is no better description than the commit message.

/cc @odony

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

When the company's country has only onw time zone it is more often
than not true, that the users of this database will also use the
single timezone of the main company.

When the company's country has only onw time zone it is more often
than not true, that the users of this database will also use the
single timezone of the main company.
@blaggacao
Copy link
Contributor Author

Test fail unrelated...

@@ -72,6 +73,10 @@ def _initialize_db(id, db_name, demo, lang, user_password, login='admin', countr
countries = env['res.country'].search([('code', 'ilike', country_code)])
if countries:
env['res.company'].browse(1).country_id = countries[0]
if len(country_timezones[country_code]) == 1:
users = env['res.users'].search(['|', ('active','=', True), ('active','=', False)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use active_test context key to do so but I do not think it is a good idea anyway. Just leave no tz for the inactive users.

@blaggacao blaggacao closed this Aug 13, 2018
@blaggacao blaggacao deleted the db-service-set-user-timzone branch August 13, 2018 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants