Skip to content

[FIX/UPDT] code_backend_theme, web_login_styles: sync fixes from odoodevs#424

Open
maurorosero wants to merge 8 commits into
CybroOdoo:19.0from
maurorosero:19.0-sync-odoodevs-updates
Open

[FIX/UPDT] code_backend_theme, web_login_styles: sync fixes from odoodevs#424
maurorosero wants to merge 8 commits into
CybroOdoo:19.0from
maurorosero:19.0-sync-odoodevs-updates

Conversation

@maurorosero

Copy link
Copy Markdown

Title

[FIX/UPDT] code_backend_theme, web_login_styles: sync fixes from odoodevs

Description

Summary

Sync two small fixes from the local odoodevs/addons/base checkout back
into CybroAddons. Both modules already exist in CybroAddons but were
slightly out of date compared to the working copies.

Changes

code_backend_theme

The asset path for webNavbarAppMenu.js in __manifest__.py was split
across two adjacent string literals, producing an invalid path (and, in
strict parsers, a SyntaxError at module load).

-    'code_backend_theme/static/src/js/web_navbar_appmenu'
-    '/webNavbarAppMenu.js',
+    'code_backend_theme/static/src/js/web_navbar_appmenu/webNavbarAppMenu.js',

Version: 19.0.1.0.019.0.1.0.1.

web_login_styles

Modernize models/res_config_settings.py:

  • super(ResConfigSettings, self)super() (Python 3 style).
  • res.update(image=params.get_param(...))res['image'] = params.get_param(...)
    to preserve the default dict shape from the parent.

Version: 19.0.1.0.119.0.1.0.2.

Test plan

  • Update code_backend_theme to 19.0.1.0.1, install, hard-refresh
    the browser, confirm the backend theme loads without console errors
    and the navbar appmenu renders correctly.
  • Update web_login_styles to 19.0.1.0.2, install, open Settings →
    Website → Login Styles, change the background image, save, reload
    and confirm the image is preserved on the login page.

…model

- Use babel.dates to render month names in the user's language instead of
  hardcoded English via calendar.month_name / TO_CHAR.
- Read mail_activity_type.name from the user's lang (translate=True field)
  with fallback to en_US instead of forcing 'en_US'.
- Wrap 'Expected without Won', 'Won', 'Lost' with _() for translation.
- Group lost-leads query by month number (locale-independent) and label
  months on the Python side to keep ordering stable across DB locales.
- Import _t from @web/core/l10n/translation.
- Pre-translate all visible UI strings (titles, period labels, chart
  legends, action names) into a state.texts map so they can be looked
  up from the QWeb template, which has no _t in its context.
- Wrap action.doAction 'name' and Chart.js 'label' strings with _t().
…le strings

Replace all hardcoded English text in dashboard_templates.xml with
state.texts.* lookups, which are pre-translated in crm_dashboard.js
via _t(). This allows the dashboard UI to be translated per-user.
Minor version bump for translation/i18n improvements.
Add .po files for English (en), Spanish variants (es, es_419, es_AR,
es_CL, es_CO, es_MX, es_PA, es_PE, es_VE) and Portuguese variants
(pt, pt_BR, pt_PT).
[UPDT] crm_dashboard: add i18n support and localize UI strings
The 'webNavbarAppMenu.js' asset path was split across two adjacent string
literals, which produces a SyntaxError at module load. Concatenate into a
single valid path.

Bump version 19.0.1.0.0 → 19.0.1.0.1.
- Replace 'super(ResConfigSettings, self)' with 'super()' (Python 3 style).
- Replace 'res.update(image=...)' with 'res['image'] = ...' to keep the
  default dict shape intact when extending it.

Bump version 19.0.1.0.1 → 19.0.1.0.2.
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.

1 participant