diff --git a/addons/beyond_base/__manifest__.py b/addons/beyond_base/__manifest__.py index bbf0a8d..38814d5 100644 --- a/addons/beyond_base/__manifest__.py +++ b/addons/beyond_base/__manifest__.py @@ -8,8 +8,9 @@ Cimientos del sistema Beyond (BRIEF §4 y §6): - Tres grupos de seguridad del modelo de roles: administrador general, 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 mínimo: nombre "Beyond" de la instancia y paleta placeholder - (se sustituye cuando el cliente entregue su identidad visual). +- 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). 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 diff --git a/addons/beyond_base/static/fonts/manrope-cyrillic-ext.woff2 b/addons/beyond_base/static/fonts/manrope-cyrillic-ext.woff2 new file mode 100644 index 0000000..fc82004 Binary files /dev/null and b/addons/beyond_base/static/fonts/manrope-cyrillic-ext.woff2 differ diff --git a/addons/beyond_base/static/fonts/manrope-cyrillic.woff2 b/addons/beyond_base/static/fonts/manrope-cyrillic.woff2 new file mode 100644 index 0000000..1cece61 Binary files /dev/null and b/addons/beyond_base/static/fonts/manrope-cyrillic.woff2 differ diff --git a/addons/beyond_base/static/fonts/manrope-greek.woff2 b/addons/beyond_base/static/fonts/manrope-greek.woff2 new file mode 100644 index 0000000..29a1a72 Binary files /dev/null and b/addons/beyond_base/static/fonts/manrope-greek.woff2 differ diff --git a/addons/beyond_base/static/fonts/manrope-latin-ext.woff2 b/addons/beyond_base/static/fonts/manrope-latin-ext.woff2 new file mode 100644 index 0000000..bdade6d Binary files /dev/null and b/addons/beyond_base/static/fonts/manrope-latin-ext.woff2 differ diff --git a/addons/beyond_base/static/fonts/manrope-latin.woff2 b/addons/beyond_base/static/fonts/manrope-latin.woff2 new file mode 100644 index 0000000..9d7abb1 Binary files /dev/null and b/addons/beyond_base/static/fonts/manrope-latin.woff2 differ diff --git a/addons/beyond_base/static/fonts/manrope-vietnamese.woff2 b/addons/beyond_base/static/fonts/manrope-vietnamese.woff2 new file mode 100644 index 0000000..3eca77a Binary files /dev/null and b/addons/beyond_base/static/fonts/manrope-vietnamese.woff2 differ diff --git a/addons/beyond_base/static/src/scss/beyond_variables.scss b/addons/beyond_base/static/src/scss/beyond_variables.scss index a7b7422..4c12e8c 100644 --- a/addons/beyond_base/static/src/scss/beyond_variables.scss +++ b/addons/beyond_base/static/src/scss/beyond_variables.scss @@ -1,18 +1,43 @@ // ============================================================================= -// Paleta placeholder Beyond (Fase 0) — SUSTITUIR cuando el cliente entregue -// su identidad visual definitiva (BRIEF §3, riesgo R2). +// Beyond — visual identity v1 (defined by Collina Systems) // -// Este archivo se antepone (prepend) a web._assets_primary_variables, por lo -// que colorea tanto el backend como el POS: las variables de Odoo se declaran -// con !default y respetan lo definido aquí. +// This is no longer a placeholder waiting on the client: Beyond never handed +// over a brand manual (BRIEF §3, risk R2), so Collina defined the identity and +// signed it off through the launcher v2 design (ADR-005 / tickets C-005–C-006). +// Every value below is taken from that design. If the client ever delivers a +// brand of their own, this file is the single place to swap it. +// +// This file is prepended to web._assets_primary_variables, so it colours both +// the backend and the POS: Odoo's own variables are declared with !default and +// therefore respect whatever is defined here. +// +// SCOPE — only cross-cutting brand tokens live here. The launcher's orange +// (#C55A22) and purple (#8C4A72) are deliberately NOT tokens: they are not +// brand colours, they are the colour-coding of the three launcher blocks and +// mean nothing outside that screen. Publishing them in this bundle would push +// them into the backend and POS and invite their use as semantic colours. +// They live as local variables in webclient/beyond_launcher.scss. +// +// TYPOGRAPHY — the design uses Manrope. The @font-face rules are declared in +// webclient/beyond_launcher.scss because the woff2 files are only wired into +// web.assets_backend so far; there is no font-family token here yet on purpose, +// a token would promise a face that other bundles (POS) cannot resolve. // ============================================================================= -// Tokens de marca (placeholder) -$beyond-primary: #0f6b5c; // verde esmeralda profundo -$beyond-primary-dark: #0a4a40; // variante oscura (navbar POS, énfasis) -$beyond-accent: #c79a3b; // dorado (acentos, precios, badges) -$beyond-surface: #f7f5f0; // fondo cálido de superficies +// Brand green. The launcher's "Venta" block and its hover/pressed states. +$beyond-primary: #0E6B57; +$beyond-primary-dark: #0A5B49; +$beyond-primary-darker: #084C3D; -// Color de marca del cliente web: de aquí derivan $o-brand-primary, $o-action -// y el $primary de Bootstrap en los bundles de backend y POS. +// Surfaces +$beyond-surface: #F6F5F1; // warm page background +$beyond-surface-hover: #ECEAE3; // hover on a surface-coloured control + +// Ink +$beyond-ink: #23201D; // primary text, icon strokes, focus ring +$beyond-ink-soft: #4A453E; // secondary labels +$beyond-ink-muted: #A39C91; // supporting text (signature, metadata) + +// Web client brand colour: $o-brand-primary, $o-action and Bootstrap's +// $primary derive from this in both the backend and POS bundles. $o-community-color: $beyond-primary; diff --git a/addons/beyond_base/static/src/webclient/beyond_launcher.scss b/addons/beyond_base/static/src/webclient/beyond_launcher.scss index c8bad25..9023ba9 100644 --- a/addons/beyond_base/static/src/webclient/beyond_launcher.scss +++ b/addons/beyond_base/static/src/webclient/beyond_launcher.scss @@ -1,14 +1,92 @@ // ============================================================================= -// C-005/C-006 · Lanzador Beyond (ADR-005) +// C-005/C-006 · Beyond launcher v2 (ADR-005) // -// Pantalla completa con DOS BANDAS alineadas (C-006): apps diarias en -// tarjetas grandes de un solo tamaño; ocasionales en tarjetas chicas de un -// solo tamaño. Sin mezclar tamaños en la misma fila, sin huecos: tarjetas -// de ancho fijo por banda, centradas y repartidas de forma pareja. -// :has() está soportado por los navegadores objetivo (BRIEF §8). Los -// !important pisan el posicionamiento inline del popover. +// Faithful translation of the signed-off "Lanzador v2" design. Every colour, +// radius, size, gap, duration and font weight below comes from that file; the +// few rules that have no counterpart there are marked ENGINEERING and explain +// what they protect against (an app-less band, a long fallback row, a short +// viewport) — the design only covers the nominal case. +// +// It is still the native apps dropdown, restyled: the popover is forced full +// screen with :has() + !important, which beats the inline positioning the +// popover service writes. :has() is supported by the target browsers +// (BRIEF §8). +// +// Local, on purpose: the orange and purple below are the launcher's block +// colour-coding, not brand colours, so they are NOT tokens in +// scss/beyond_variables.scss. See the SCOPE note there. // ============================================================================= +// "Panel General" block +$beyond-launcher-panel: #C55A22; +$beyond-launcher-panel-hover: #B14E1B; +$beyond-launcher-panel-active: #984115; + +// "QR" block +$beyond-launcher-qr: #8C4A72; +$beyond-launcher-qr-hover: #7C3E64; +$beyond-launcher-qr-active: #6B3556; + +$beyond-font-family: Manrope, ui-sans-serif, system-ui, sans-serif; + +// ----------------------------------------------------------------------------- +// Manrope, self-hosted. NOT loaded from Google Fonts on purpose: the branch +// terminals have to keep working with no internet. These are the same variable +// woff2 subsets the design shipped (one file per unicode range, weight axis +// 500–800), so the four weights the design uses all resolve from one file. +// ----------------------------------------------------------------------------- +@font-face { + font-family: 'Manrope'; + font-style: normal; + font-weight: 500 800; + font-display: swap; + src: url('/beyond_base/static/fonts/manrope-cyrillic-ext.woff2') format('woff2'); + unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; +} +@font-face { + font-family: 'Manrope'; + font-style: normal; + font-weight: 500 800; + font-display: swap; + src: url('/beyond_base/static/fonts/manrope-cyrillic.woff2') format('woff2'); + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} +@font-face { + font-family: 'Manrope'; + font-style: normal; + font-weight: 500 800; + font-display: swap; + src: url('/beyond_base/static/fonts/manrope-greek.woff2') format('woff2'); + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; +} +@font-face { + font-family: 'Manrope'; + font-style: normal; + font-weight: 500 800; + font-display: swap; + src: url('/beyond_base/static/fonts/manrope-vietnamese.woff2') format('woff2'); + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; +} +@font-face { + font-family: 'Manrope'; + font-style: normal; + font-weight: 500 800; + font-display: swap; + src: url('/beyond_base/static/fonts/manrope-latin-ext.woff2') format('woff2'); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} +@font-face { + font-family: 'Manrope'; + font-style: normal; + font-weight: 500 800; + font-display: swap; + src: url('/beyond_base/static/fonts/manrope-latin.woff2') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +// ----------------------------------------------------------------------------- +// Full-screen shell +// ----------------------------------------------------------------------------- .o-dropdown--menu:has(.beyond_launcher_band) { position: fixed !important; inset: 0 !important; @@ -18,82 +96,179 @@ max-height: none !important; transform: none !important; margin: 0 !important; + padding: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; - gap: 2.5rem; - padding: 3.5rem clamp(1.5rem, 8vw, 8rem); - overflow-y: auto; background: $beyond-surface; -} + color: $beyond-ink; + font-family: $beyond-font-family; + -webkit-font-smoothing: antialiased; + // ENGINEERING — the design assumes a viewport tall enough for the whole + // layout, where nothing scrolls. Below that, scrolling the shell beats + // clipping tiles out of reach (see .beyond_launcher_primary). + overflow-x: hidden; + overflow-y: auto; -.beyond_launcher_band { - display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: stretch; - gap: 1rem; + // The signature strip + .beyond_launcher_brand { + flex: none; + padding: 18px 22px 6px; - // Una banda sin apps (según rol) no deja franja fantasma - &:empty { + span { + font-size: 13px; + font-weight: 600; + letter-spacing: 0.04em; + color: $beyond-ink-muted; + } + } + + // ENGINEERING — a band with no apps for this role must not leave a ghost + // strip. :has() rather than :empty so template whitespace cannot fool it. + .beyond_launcher_primary:not(:has(.beyond_block)), + .beyond_launcher_secondary:not(:has(.beyond_tile)) { display: none; } -} -// Banda inferior: separador sutil entre lo diario y lo ocasional -.beyond_launcher_ocasional { - padding-top: 2rem; - border-top: 1px solid rgba(0, 0, 0, 0.08); -} - -.beyond_app_card { - display: flex !important; - flex-direction: column; - align-items: center; - justify-content: center; - gap: 0.75rem; - padding: 1rem; - background: #fff; - border-radius: 1rem; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); - font-weight: 600; - text-align: center; - - &:hover, - &.focus { - background: #fff; - box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14); + .beyond_launcher_primary { + // Design says `flex: 1; min-height: 0`. `1 0 auto` renders identically + // wherever the layout fits and, when it does not, pushes the shell into + // scrolling instead of squashing the blocks. + flex: 1 0 auto; + display: flex; + gap: 6px; + padding: 8px 6px 0; } - .beyond_app_name { - white-space: normal; - line-height: 1.2; + .beyond_launcher_secondary { + flex: none; + height: 128px; + display: flex; + align-items: center; + gap: 8px; + padding: 0 6px; + // ENGINEERING — the row also catches every unmapped app, so it can grow + // past the viewport. Scrolling sideways keeps them reachable without + // breaking the fixed 128px band. The design's centring is done with + // auto margins rather than justify-content on purpose: centred flex + // content overflows in BOTH directions, pushing the first tiles off + // the left edge where scrolling cannot reach them. Auto margins + // collapse to 0 once there is no free space, so the row simply starts + // at the left and scrolls right. + justify-content: flex-start; + overflow-x: auto; + + .beyond_tile:first-child { margin-inline-start: auto; } + .beyond_tile:last-child { margin-inline-end: auto; } } -} -// Tamaño único por banda (C-006): diarias grandes… -.beyond_launcher_daily .beyond_app_card { - width: 14rem; - min-height: 11.5rem; - font-size: 1.25rem; + // Shared reset: DropdownItem renders an , so Bootstrap's + // block layout, padding, colour and nowrap have to go before the design's + // own box takes over. + .beyond_block, + .beyond_tile { + box-sizing: border-box; + display: flex !important; + flex-direction: column; + align-items: center; + width: auto; + background: none; + border: 0; + text-align: center; + text-decoration: none; + cursor: pointer; + } - .beyond_app_icon { - width: 5rem; - height: 5rem; - object-fit: contain; + // ------------------------------------------------------------------------- + // Main band: three colour-coded blocks sharing the width + // ------------------------------------------------------------------------- + .beyond_block { + flex: 1 1 0; + min-width: 0; + justify-content: center; + gap: 34px; + padding: 0; + border-radius: 28px; + transition: flex-grow 220ms ease, background 180ms ease; + + &:hover, + &:active { + flex-grow: 1.18; + } + + // The design has one "you are here" affordance, the focus ring, so the + // current app (.focus, set by the navbar) reuses it. :focus is the + // literal design state and keeps arrow-key navigation visible. + &:focus, + &.focus { + outline: 4px solid $beyond-ink; + outline-offset: -6px; + } } -} -// …ocasionales chicas -.beyond_launcher_ocasional .beyond_app_card { - width: 10rem; - min-height: 8rem; - font-size: 0.95rem; + .beyond_block_name { + font-size: 30px; + font-weight: 800; + letter-spacing: -0.02em; + color: #FFFFFF; + } + + .beyond_block_venta { + background: $beyond-primary; + + &:hover { background: $beyond-primary-dark; } + &:active { background: $beyond-primary-darker; } + } + + .beyond_block_panel { + background: $beyond-launcher-panel; + + &:hover { background: $beyond-launcher-panel-hover; } + &:active { background: $beyond-launcher-panel-active; } + } + + .beyond_block_qr { + background: $beyond-launcher-qr; + + &:hover { background: $beyond-launcher-qr-hover; } + &:active { background: $beyond-launcher-qr-active; } + } + + // ------------------------------------------------------------------------- + // Secondary row: small tiles (~132x98, well over the 48px touch floor) + // ------------------------------------------------------------------------- + .beyond_tile { + flex: none; + width: 132px; + padding: 14px 0; + gap: 10px; + border-radius: 20px; + transition: background 140ms ease; + + &:hover, + &:focus, + &.focus { + background: $beyond-surface-hover; + } + } + + .beyond_tile_name { + font-size: 13px; + font-weight: 700; + color: $beyond-ink-soft; + // ENGINEERING — fallback app names are arbitrary; clip them rather than + // let a long one wrap and push the tile out of the 128px band. + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } - .beyond_app_icon { - width: 3rem; - height: 3rem; + // Native icon, sized like the designed 42px glyphs it stands in for. + .beyond_tile_icon { + width: 42px; + height: 42px; object-fit: contain; } } diff --git a/addons/beyond_base/static/src/webclient/beyond_launcher.xml b/addons/beyond_base/static/src/webclient/beyond_launcher.xml index 0a04267..4f171d4 100644 --- a/addons/beyond_base/static/src/webclient/beyond_launcher.xml +++ b/addons/beyond_base/static/src/webclient/beyond_launcher.xml @@ -1,10 +1,24 @@ - - -
+ + + +
+ Powered by Collina Systems +
+ + +
- - + + Venta + + + + + + Panel General + + + + + + QR
-
+ + +
- - + + Inventario + + + + + + Contactos + + + + + + Mensajes + + + + + + + Empleados + + + + + + Tableros + + + + + + +