Integra la pantalla de inicio de sesión v1

Traducción fiel del diseño aprobado, por herencia de web.login y
web.login_layout. Cero core: el <form> que postea a /web/login sigue
siendo el de Odoo, entero, con su action, su method, su csrf_token y su
redirect; lo que cambia es el markup alrededor de los campos y la
envoltura donde se pinta. Las dos plantillas llevan priority="99" para
aplicarse SIEMPRE al final: auth_signup y auth_passkey también heredan
web.login, y el orden tenía que ser una decisión y no una casualidad de
ids. De ahí la dependencia explícita de auth_signup.

Tres cosas del diseño que no se implementan, a propósito:

- La validación en vivo. Todo mensaje es del servidor, después del POST;
  el <p t-if="error"> de Odoo conserva texto y condición y solo pierde la
  caja alert de Bootstrap para tomar los 14px/700 #C55A22 del diseño.
- La pantalla "Bienvenido, X". Un login correcto es una redirección y el
  usuario cae en el Menú Principal (ADR-005). La maqueta la necesitaba
  porque no tenía a dónde ir.
- El min(360px, 72%) del logo, escrito como width + max-width: Sass
  evalúa un min() pelado y se niega a comparar px con %. El ancho usado
  es idéntico.

Tres cosas que el diseño no conocía, decididas aquí:

- web.user_switch (nuevo en Odoo 19) se retira. Escondía el formulario
  tras un "Elige un usuario" con las últimas cuentas de ese navegador: en
  una terminal de turno compartido eso es la lista de nombres y caras de
  los compañeros, antes de la sesión.
- El enlace de alta pública se retira. Al personal lo da de alta la
  administración (ADR-008).
- El bloque de llaves de acceso (auth_passkey) se queda, revestido al
  lenguaje del diseño. No estaba en la maqueta, pero es una vía real de
  entrada y quitarlo dejaría fuera a quien ya registró una.

Toque >= 48px sin mover el diseño: el ojo se pinta 44x44 y lleva un área
táctil invisible de 48x48 centrada. Foco solo en :focus-visible, con el
anillo repuesto a mano porque `all: unset` se lleva el del navegador.

Todo el SCSS va anidado bajo .beyond_login / .beyond_login_body: el
paquete frontend lo carga cada página pública, incluido el portal del
empleado, y ni una regla puede escaparse. El kiosco QR queda fuera de
alcance por construcción, es una plantilla <html> que no llama a ningún
paquete.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jorem JuárezandClaude Opus 5 committed 2026-08-23 21:19:53 -06:00
1 parent 789a50cd8a
commit 71e0c85b0a
4 files changed
+747 -4

No files matched your search

+15 -4
View File
@@ -9,24 +9,28 @@ Cimientos del sistema Beyond (BRIEF §4 y §6):
administrador de sucursal y empleado. Las reglas de registro (ir.rule)
que aíslan datos por sucursal llegan en Fase 1 junto con beyond_branch.
- Branding: nombre "Beyond" de la instancia, identidad visual v1 definida
por Collina (paleta y tipografía Manrope autoalojada) y el lanzador de
aplicaciones a pantalla completa (ADR-005).
por Collina (paleta y tipografía Manrope autoalojada), el lanzador de
aplicaciones a pantalla completa (ADR-005) y la pantalla de inicio de
sesión, que hereda web.login sin tocar ni el formulario ni la ruta.
Depende de hr/hr_attendance porque el rol "empleado" se define sobre
empleados y asistencias, y las ir.rule de Fase 1 para esos modelos
vivirán en este módulo.
vivirán en este módulo. Depende de auth_signup (LGPL, el core lo
auto-instala igual) para fijar el orden de herencia sobre web.login: el
enlace de "¿Olvidaste tu contraseña?" es el suyo, con su condición real.
""",
'version': '19.0.0.1.0',
'category': 'Beyond',
'author': 'Collina Systems',
'license': 'Other proprietary',
'depends': ['base', 'web', 'hr', 'hr_attendance'],
'depends': ['base', 'web', 'auth_signup', 'hr', 'hr_attendance'],
'data': [
'security/beyond_security.xml',
'data/branding.xml',
'data/bootstrap_admin.xml',
'data/menu_cleanup.xml',
'data/idioma.xml',
'views/login_templates.xml',
],
'demo': [
'demo/demo_empleados.xml',
@@ -41,6 +45,13 @@ vivirán en este módulo.
'beyond_base/static/src/webclient/beyond_launcher.js',
'beyond_base/static/src/webclient/beyond_launcher.xml',
],
# The login screen renders before there is a session: it gets the
# frontend bundle and nothing else, so the face travels with it.
'web.assets_frontend': [
'beyond_base/static/src/scss/beyond_fonts.scss',
'beyond_base/static/src/login/beyond_login.scss',
'beyond_base/static/src/login/beyond_login.js',
],
},
'installable': True,
'application': False,
@@ -0,0 +1,44 @@
/**
* Beyond — login v1: the eye that shows the password.
*
* Core ships this behaviour (web/static/src/public/show_password.js) but it is
* bound to a Bootstrap `.input-group` wrapping a `.o_show_password` button with
* a Font Awesome icon, and it says nothing to a screen reader. The login screen
* uses the design's own pill and its own SVG, so the toggle is rewritten here —
* eight lines and the ARIA that core leaves out.
*
* Deliberately a plain script and not an Interaction: this runs on the page
* that precedes the session, where the less machinery involved in reaching the
* password field, the better. It touches nothing but the input's `type`.
*
* Not touched: the form, its action, its method or the csrf_token.
*/
(function () {
"use strict";
// Spanish, like every string a user reads (CLAUDE.md).
const LABEL_SHOW = "Mostrar contraseña";
const LABEL_HIDE = "Ocultar contraseña";
function setUpPasswordToggle() {
const eye = document.querySelector(".beyond_login .beyond_login_eye");
const password = document.querySelector(".beyond_login #password");
if (!eye || !password) {
return;
}
eye.addEventListener("click", function () {
const wasVisible = password.type === "text";
password.type = wasVisible ? "password" : "text";
eye.setAttribute("aria-pressed", String(!wasVisible));
eye.setAttribute("aria-label", wasVisible ? LABEL_SHOW : LABEL_HIDE);
// Back to typing where the user left off, not on the button.
password.focus();
});
}
if (document.readyState === "loading") {
document.addEventListener("DOMContentLoaded", setUpPasswordToggle);
} else {
setUpPasswordToggle();
}
})();
@@ -0,0 +1,500 @@
// =============================================================================
// Beyond — login v1
//
// Faithful translation of the signed-off "Iniciar sesión" (login_v1.html).
// Every colour, radius, size, gap, duration and font weight below is copied
// from that file, unrounded; the rules that have no counterpart there are
// marked ENGINEERING and say what they protect against — the design only
// covers the nominal case, and this one sits on top of Odoo's real login form.
//
// SCOPE — everything is nested under .beyond_login / .beyond_login_body. This
// file rides web.assets_frontend, which every public page loads (the employee
// portal of beyond_attendance_qr among them), so not one rule may escape the
// login screen. The QR kiosk is a standalone <html> template that calls no
// bundle at all and is out of reach by construction.
//
// PALETTE — the surfaces and the ink are the identity's own tokens; the design
// reuses them exactly. The black is NOT: the design paints the controls
// #191613 instead of the brand green, deliberately, so the pre-session screen
// reads as the product's cover rather than as another green ERP form. Per the
// rule written in scss/beyond_variables.scss ("a colour graduates to a token
// when a SECOND screen needs it") that black, the field white, the placeholder
// grey and the eye's hover stay local variables here. So does the error
// orange, even though it is byte-for-byte the launcher's "Panel General":
// same hex, unrelated meaning.
// =============================================================================
// The control black of the login and its hover/pressed states.
$beyond-login-ink: #191613;
$beyond-login-ink-hover: #33302B;
$beyond-login-ink-active: #000000;
// The brand panel behind the logo — flat black, not the ink above.
$beyond-login-brand-bg: #000000;
// Fields
$beyond-login-field-bg: #FFFFFF;
$beyond-login-placeholder: #B3ADA3;
$beyond-login-eye-hover: #F0EEE8;
// The focus ring the design draws around a field in focus.
$beyond-login-ring: rgba(25, 22, 19, 0.10);
// Error text. Same hex as $beyond-launcher-panel and unrelated to it.
$beyond-login-error: #C55A22;
// -----------------------------------------------------------------------------
// Page
//
// ENGINEERING — the class replaces Odoo's `bg-100` on <body> rather than
// joining it (see views/login_templates.xml): the utility paints the body with
// !important and there is no point in an override war on a page we own whole.
// -----------------------------------------------------------------------------
.beyond_login_body {
margin: 0;
padding: 0;
background: $beyond-surface;
color: $beyond-ink;
font-family: $beyond-font-family;
-webkit-font-smoothing: antialiased;
overflow: hidden; // the design is 100vh with no scroll
}
.beyond_login {
height: 100vh;
display: flex;
background: $beyond-surface;
color: $beyond-ink;
overflow: hidden;
// ---------------------------------------------------------------------
// Left: the brand panel
// ---------------------------------------------------------------------
.beyond_login_brand {
flex: 1 1 46%;
min-width: 0;
background: $beyond-login-brand-bg;
display: flex;
align-items: center;
justify-content: center;
padding: 56px;
}
.beyond_login_logo {
display: block;
// The design says `width: min(360px, 72%)`. Written as a pair because
// Sass evaluates a bare min() itself and refuses to compare px with %;
// the used width is identical.
width: 72%;
max-width: 360px;
height: auto;
}
// ---------------------------------------------------------------------
// Right: the form
// ---------------------------------------------------------------------
.beyond_login_panel {
flex: 1 1 54%;
min-width: 0;
display: flex;
justify-content: center;
padding: 40px;
overflow-y: auto;
}
.beyond_login_stack {
box-sizing: border-box;
width: 100%;
max-width: 440px;
margin: auto;
display: flex;
flex-direction: column;
gap: 26px;
}
// ENGINEERING — web.login ships two empty `oe_structure` drop zones around
// the form. Empty flex children still eat a 26px gap each, so they are
// hidden while empty and left alone the moment anything is dropped in.
.oe_structure:empty {
display: none;
}
.beyond_login_title {
font-size: 34px;
font-weight: 800;
letter-spacing: -0.03em;
color: $beyond-ink;
}
// The form is a column on the same 26px rhythm as the stack around it, so
// title / user / password / CTA / error / signature read as one list.
.beyond_login_form {
display: flex;
flex-direction: column;
gap: 26px;
}
// ENGINEERING — the database picker is core's, shown only when the server
// serves more than one database. It keeps its Bootstrap look (a developer
// sees it, an employee never does); all it needs is to stop fighting the
// column's own rhythm with a utility margin.
.beyond_login_form > .mb-3 {
margin-bottom: 0 !important;
}
// ---------------------------------------------------------------------
// Fields
// ---------------------------------------------------------------------
.beyond_login_field {
display: flex;
flex-direction: column;
gap: 8px;
}
.beyond_login_field_head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.beyond_login_label {
margin: 0; // ENGINEERING — Bootstrap's reboot puts a margin on <label>
font-size: 13px;
font-weight: 800;
letter-spacing: 0.02em;
color: $beyond-ink-soft;
}
.beyond_login_forgot {
font-size: 13px;
font-weight: 700;
color: $beyond-ink-softer;
text-decoration: none;
// ENGINEERING — the design's global rule is `a { #191613 }` with
// `a:hover { #7A736A }`, and this link is already painted the hover
// colour, which would leave it with no feedback at all. It uses the
// same two colours, the other way round.
&:hover {
color: $beyond-login-ink;
}
}
.beyond_login_input {
all: unset;
box-sizing: border-box;
width: 100%;
padding: 16px 18px;
border-radius: 16px;
background: $beyond-login-field-bg;
border: 1.5px solid $beyond-line;
font-size: 16px;
font-weight: 600;
color: $beyond-ink;
transition: border-color 140ms ease, box-shadow 140ms ease;
// Keyboard only, per the project rule — but a text field in focus
// always matches :focus-visible, click or Tab, because it is about to
// take keystrokes. The design's focus state survives intact.
&:focus-visible {
border-color: $beyond-login-ink;
box-shadow: 0 0 0 4px $beyond-login-ring;
}
}
// The password field is a bare input inside a pill that carries the frame,
// so that the eye button can live on the same border.
.beyond_login_pw {
display: flex;
align-items: center;
gap: 6px;
box-sizing: border-box;
width: 100%;
padding: 4px 6px 4px 18px;
border-radius: 16px;
background: $beyond-login-field-bg;
border: 1.5px solid $beyond-line;
transition: border-color 140ms ease, box-shadow 140ms ease;
// The design's rule is :focus-within; :has(:focus-visible) is the same
// thing restricted to keyboard focus, so the eye button being clicked
// does not light the whole pill.
&:has(:focus-visible) {
border-color: $beyond-login-ink;
box-shadow: 0 0 0 4px $beyond-login-ring;
}
}
.beyond_login_input_pw {
all: unset;
flex: 1;
min-width: 0;
padding: 12px 0;
font-size: 16px;
font-weight: 600;
color: $beyond-ink;
}
.beyond_login_input,
.beyond_login_input_pw {
&::placeholder {
color: $beyond-login-placeholder;
}
}
.beyond_login_eye {
all: unset;
position: relative; // ENGINEERING — anchors the touch target below
flex: none; // ENGINEERING — the pill must not squeeze it
cursor: pointer;
width: 44px;
height: 44px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
color: $beyond-ink-softer; // the icon strokes currentColor
transition: background 140ms ease, color 140ms ease;
&:hover {
background: $beyond-login-eye-hover;
}
// ENGINEERING — the design paints a 44x44 box; the project floor for a
// touch target is 48 (CLAUDE.md, "Norte de diseño"). The painted box
// stays 44 and an invisible 48x48 sits centred on it, inside the room
// the pill's own padding leaves. Nothing moves, the finger gets 48.
&::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 48px;
height: 48px;
}
// ENGINEERING — the password is on screen; say so with more than the
// characters themselves. Pairs with aria-pressed on the button.
&[aria-pressed="true"] {
color: $beyond-ink;
}
svg {
display: block;
}
}
// ---------------------------------------------------------------------
// Call to action
// ---------------------------------------------------------------------
// ENGINEERING — core wraps the CTA and everything auth_signup/auth_passkey
// bolt onto it in one `oe_login_buttons` div. That div has to survive (it
// is their xpath anchor) but it must not be a box, or its contents cannot
// be interleaved with the server's messages. `display: contents` dissolves
// it: the CTA and the passkey block become items of the form's own column,
// on its 26px rhythm, and `order` below can place the message between them
// — under the CTA, where the design puts it.
.beyond_login_actions {
display: contents;
}
.beyond_login_submit {
all: unset;
cursor: pointer;
box-sizing: border-box;
width: 100%;
padding: 18px;
border-radius: 16px;
background: $beyond-login-ink;
color: #FFFFFF;
text-align: center;
font-size: 17px;
font-weight: 800;
letter-spacing: 0.01em;
transition: background 140ms ease, transform 120ms ease;
&:hover {
background: $beyond-login-ink-hover;
}
&:active {
background: $beyond-login-ink-active;
transform: translateY(1px);
}
}
// ENGINEERING — `all: unset` strips the browser's own focus ring off every
// control on this screen, so the keyboard ring has to be put back by hand.
// :focus-visible only, so a click leaves no outline. The text fields are
// excluded: they light up through the design's own focus state above.
.beyond_login_submit,
.beyond_login_eye,
.beyond_login_forgot,
.o_login_auth .list-group-item {
&:focus-visible {
outline: 3px solid $beyond-login-ink;
outline-offset: 3px;
}
}
// ---------------------------------------------------------------------
// Server messages
//
// Odoo writes these after the POST — "Wrong login/password", the reset
// mail confirmation, an access notice. There is no client-side validation
// on this screen and no invented copy: whatever the server says, in the
// design's voice.
//
// ENGINEERING — `order` because the design puts the message under the CTA
// while web.login emits it above. Visual order follows the design, source
// order stays the accessible one (a screen reader meets the error before
// the button that produced it).
// ---------------------------------------------------------------------
.beyond_login_error,
.beyond_login_message,
.o_caps_lock_warning_text {
order: 1;
margin: 0;
font-size: 14px;
font-weight: 700;
}
// ...and the passkey block after it, so the message stays glued to the CTA
// that produced it instead of being pushed below an alternative way in.
.o_login_auth {
order: 2;
}
.beyond_login_error,
.o_caps_lock_warning_text {
color: $beyond-login-error;
}
// Success is the brand green — the only place on this screen it appears.
.beyond_login_message {
color: $beyond-primary;
}
.o_caps_lock_warning_text {
display: block;
}
// ---------------------------------------------------------------------
// Passkeys
//
// Not in the design, and kept anyway: auth_passkey is installed and this
// block is a real way into the system. Dropping it would lock out anyone
// who registered a key. Dressed in the field's own clothes instead.
// ---------------------------------------------------------------------
.o_login_auth {
display: flex;
flex-direction: column;
gap: 14px;
> em {
margin: 0;
font-style: normal;
text-align: center;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.04em;
color: $beyond-ink-muted;
}
.list-group {
display: flex;
flex-direction: column;
gap: 10px;
}
.list-group-item {
all: unset;
cursor: pointer;
box-sizing: border-box;
width: 100%;
// ENGINEERING — core builds this link from a dict and hangs
// Bootstrap utilities on it (`py-2`, `d-flex`, `gap-2`), which are
// !important. min-height carries the 48px touch floor without
// joining an !important war; the horizontal padding is ours
// because no utility sets it.
min-height: 56px;
padding-left: 18px;
padding-right: 18px;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
border-radius: 16px;
background: $beyond-login-field-bg;
border: 1.5px solid $beyond-line;
font-size: 15px;
font-weight: 700;
color: $beyond-ink;
text-align: center;
transition: background 140ms ease, border-color 140ms ease;
&:hover {
background: $beyond-surface-hover;
border-color: $beyond-ink-softer;
}
}
}
// ---------------------------------------------------------------------
// The signature, at the foot
// ---------------------------------------------------------------------
.beyond_login_sign {
text-align: center;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.04em;
color: $beyond-ink-muted;
}
}
// -----------------------------------------------------------------------------
// Narrow
//
// ENGINEERING — the design is one desktop artboard. Below the tablet
// breakpoint the 46% black column would leave the form a strip too thin to
// fill, so the panel collapses into a short band above the form and the form
// takes the whole width. Checked at 768px and at 390px.
// -----------------------------------------------------------------------------
@media (max-width: 991.98px) {
.beyond_login_body {
overflow: auto; // stacked, the page is allowed to be taller than the viewport
}
.beyond_login {
height: auto;
min-height: 100vh;
flex-direction: column;
overflow: visible;
.beyond_login_brand {
flex: 0 0 auto;
padding: 28px 24px;
}
.beyond_login_logo {
width: 60%;
max-width: 240px;
}
.beyond_login_panel {
flex: 1 1 auto;
padding: 32px 24px 40px;
overflow: visible;
}
}
}
// A phone on its side, or a short window: the band would take the screen the
// form needs, so the logo goes and the form gets everything.
@media (max-width: 991.98px) and (max-height: 520px) {
.beyond_login .beyond_login_brand {
display: none;
}
}
@@ -0,0 +1,188 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--
Beyond — login v1.
The signed-off "Iniciar sesión" screen, built by inheriting web.login
and web.login_layout. No core file is touched and no controller is
overridden: the form that posts to /web/login is Odoo's own, kept whole
with its action, its method, its csrf_token and its redirect. What
changes is the markup around the fields and the shell it renders in.
Both templates carry priority="99" so they are the LAST arch applied to
web.login. auth_signup and auth_passkey also inherit it, and the order
has to be a decision rather than a coincidence of module ids: this file
replaces the block that auth_signup drops its "Restablecer contraseña"
link into, and it can only do that reliably if the link is already
there when it runs. beyond_base depends on auth_signup for the same
reason (see __manifest__.py).
THREE THINGS THE DESIGN ASKS FOR THAT ARE NOT HERE, on purpose:
1. Live validation. The mock decides on its own that the fields are
empty and writes its own message. Here every message is the
server's, after the POST — a wrong password is Odoo's string,
rendered in the design's voice by scss/../login/beyond_login.scss.
The only client-side check left is core's own `required`.
2. The "Bienvenido, X" screen. There is nothing to build: a correct
login is a 303 out of /web/login and the browser lands on the Menú
Principal (the launcher, ADR-005). The mock needed that screen
because it had nowhere to go.
3. The eye's own logic. It lives in login/beyond_login.js, because the
type of an input is not something a template can toggle.
AND THREE THINGS THE DESIGN DID NOT KNOW ABOUT, decided here:
- web.user_switch (Odoo 19) is removed. It is the "Choose a user"
screen that hides the form behind the last accounts to log in on this
browser. On a shop terminal shared by a shift that is a list of
colleagues' names and faces on the pre-session screen, and the design
has no such state.
- The signup link ("¿No tienes una cuenta?") is removed. Beyond staff
are provisioned by the branch administrator (ADR-008); nobody signs
themselves up. NOTE this only takes the link off this screen — the
/web/signup route stays open until `auth_signup.invitation_scope` is
set to b2b in Ajustes.
- The passkey block (auth_passkey) STAYS. It is not in the design, but
it is a real way in, and removing it would lock out anyone who
registered a key. It is restyled, not dropped.
-->
<!--
The shell. web.login_layout wraps its content in a centred 300px card
with the company logo on top and an "Con la tecnología de Odoo" footer
under it. The login screen is a full-bleed two-column page, so on this
page the card is not overridden, it is not rendered at all.
`beyond_login` is set by the template below, inside the body of the
t-call — QWeb renders that body first and the t-set reaches here. The
other pages that share this layout (restablecer contraseña, alta,
sesión iniciada) never set it and are left exactly as they were.
-->
<template id="login_layout_beyond" inherit_id="web.login_layout" priority="99"
name="Beyond — envoltura de inicio de sesión">
<xpath expr="//t[@t-set='body_classname']" position="attributes">
<attribute name="t-value">'beyond_login_body' if beyond_login else 'bg-100'</attribute>
</xpath>
<xpath expr="//div[hasclass('container')]" position="attributes">
<attribute name="t-if">not beyond_login</attribute>
</xpath>
<xpath expr="//div[hasclass('container')]" position="after">
<div t-if="beyond_login" class="beyond_login">
<div class="beyond_login_brand">
<!--
Absolute path on purpose: this page precedes the
session and resolves nothing through the backend.
20 KB PNG, white type on transparency, from the 1.2 MB
JPEG the design shipped.
-->
<img class="beyond_login_logo" alt="Look Capital"
src="/beyond_base/static/img/logo_login.png"/>
</div>
<div class="beyond_login_panel">
<div class="beyond_login_stack">
<t t-out="0"/>
</div>
</div>
</div>
</xpath>
</template>
<!-- The form itself. -->
<template id="login_beyond" inherit_id="web.login" priority="99"
name="Beyond — iniciar sesión">
<!-- Read by the layout above. `disable_footer` takes out the "Gestionar
bases de datos" and Odoo branding line under the card. -->
<xpath expr="//form[@role='form']" position="before">
<t t-set="beyond_login" t-value="True"/>
<t t-set="disable_footer" t-value="True"/>
<span class="beyond_login_title">Iniciar sesión</span>
</xpath>
<xpath expr="//form[@role='form']" position="after">
<span class="beyond_login_sign">Tecnología de Collina Systems</span>
</xpath>
<!-- See note 1 at the top of this file. -->
<xpath expr="//owl-component[@name='web.user_switch']" position="replace"/>
<!-- Core hides the form with `d-none` and lets the user switcher decide
whether to show it. With the switcher gone the form is the screen,
so the class stops being computed. -->
<xpath expr="//form[@role='form']" position="attributes">
<attribute name="t-attf-class"/>
<attribute name="class">oe_login_form beyond_login_form</attribute>
</xpath>
<xpath expr="//div[hasclass('field-login')]" position="replace">
<div class="beyond_login_field">
<div class="beyond_login_field_head">
<label for="login" class="beyond_login_label">Nombre de usuario</label>
</div>
<!-- name="login" is what /web/login reads. The design calls it
"Nombre de usuario" because that is what the staff type;
Odoo accepts the login, mail or not. -->
<input type="text" name="login" id="login" class="beyond_login_input"
t-att-value="login" placeholder="Usuario"
required="required" autocapitalize="off" autocomplete="username"
t-att-autofocus="'autofocus' if not login else None"/>
</div>
</xpath>
<!-- The o_caps_lock_warning class rides along: core's interaction hangs
its "¡Bloq Mayús está activado!" off it, which is worth keeping on
a screen where you type blind. -->
<xpath expr="//div[hasclass('o_caps_lock_warning')]" position="replace">
<div class="beyond_login_field o_caps_lock_warning">
<div class="beyond_login_field_head">
<label for="password" class="beyond_login_label">Contraseña</label>
<!-- The real reset route, behind the real switch: Ajustes →
"Restablecer contraseña" (auth_signup.reset_password).
Off, and the link is not rendered — the same condition
core uses, only the copy is the design's. -->
<a t-if="reset_password_enabled" class="beyond_login_forgot"
t-attf-href="/web/reset_password?{{ keep_query() }}">¿Olvidaste tu contraseña?</a>
</div>
<div class="beyond_login_pw">
<input type="password" name="password" id="password"
class="beyond_login_input_pw" placeholder="••••••••••"
required="required" autocomplete="current-password"
maxlength="4096"
t-att-autofocus="'autofocus' if login else None"/>
<button type="button" class="beyond_login_eye"
aria-label="Mostrar contraseña" aria-pressed="false">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true">
<path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"
stroke="currentColor" stroke-width="2"/>
<circle cx="12" cy="12" r="3.2" stroke="currentColor" stroke-width="2"/>
</svg>
</button>
</div>
</div>
</xpath>
<!-- The server's own messages, stripped of Bootstrap's alert box so the
design's 14px/700 can show. The text and the t-if stay core's. -->
<xpath expr="//p[hasclass('alert-danger')]" position="attributes">
<attribute name="class">beyond_login_error</attribute>
</xpath>
<xpath expr="//p[hasclass('alert-success')]" position="attributes">
<attribute name="class">beyond_login_message</attribute>
</xpath>
<!-- oe_login_buttons is kept in the class list: auth_signup and
auth_passkey both hang their arch off it. -->
<xpath expr="//div[hasclass('oe_login_buttons')]" position="attributes">
<attribute name="class">oe_login_buttons beyond_login_actions</attribute>
</xpath>
<xpath expr="//div[hasclass('oe_login_buttons')]/button[@type='submit']" position="attributes">
<attribute name="class">beyond_login_submit</attribute>
</xpath>
<!-- See the third note at the top of this file. -->
<xpath expr="//a[contains(@t-attf-href, '/web/signup')]" position="replace"/>
</template>
</odoo>