[IMP] base_ux: default user tz to creator's when missing#415
Closed
les-adhoc wants to merge 1 commit into
Closed
Conversation
res.partner only defaults tz from context['tz'] (the browser cookie set on web login). Users created by scripts/provisioning get no such context and are born with tz=False, which then clashes with the required that hr enforces in the Preferences view. Override res.users create to fall back to the creator's tz so it is never empty. Task #69983
Contributor
Contributor
Author
|
Cierro: el enfoque de defaultear tz en res.users.create rompe 14 tests de hr_attendance (corrimiento de 1h porque el tz del usuario alimenta el cálculo de jornada/overtime del empleado). Vamos por setear tz en el provisioning de bases nuevas. Ver tarea #69983. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Cuando
hrestá instalado, la vista de Preferencias / cambio de contraseña marcatzcomo requerido. Un usuario creado por script/provisioning nace contz=False(el partner solo defaulteatzdesdecontext['tz'], la cookie del navegador en el login web) y queda trabado al abrir Preferencias.Este cambio overridea
res.users.createpara que, sitzno viene en los vals ni en el context, haga fallback altzdel usuario creador. Así el campo nunca nace vacío sin depender de la cookie ni del método de creación, y sin tocar elrequiredquehrimpone a propósito.Verificación
Probado vía
odoo shellsobre base conbase_ux+hrinstalados:Task #69983