Commit Graph

7 Commits

Author SHA1 Message Date
Stéphan Sainléger
5fcc128e73 [IMP] partner_gogocarto_export_api: add button to open the export URL
Add an ``action_open_gogocarto_export`` method on ``res.config.settings``
returning an ``ir.actions.act_url`` (``target="new"``) pointing at the
selected company's export endpoint, exposed as a link-style button next
to the exported fields in the GogoCarto settings block.

Re-add the ``base_setup`` dependency: the new method uses
``res.config.settings.company_id``, which is defined by ``base_setup``
(so is the ``company_id`` our ``export_gogocarto_fields`` related field
already relies on). Its removal in 057e7a2 only worked because
``base_setup`` was pulled in transitively.

Regenerate ``i18n/fr.po`` and the ``.pot`` from a live 18.0 instance,
with the French translation for the new "Open export URL" string. The
stale "Mass Edit In Gogocarto Field" translation (wrongly worded) is
not carried over by the regenerated catalog.

Verified on a local 18.0 instance: 11 tests, 0 failed, 0 error, and the
settings arch renders "Ouvrir l'URL d'export" in French.
2026-10-19 00:17:04 +02:00
Stéphan Sainléger
29e9299940 [FIX] partner_gogocarto_export_api: restore GogoCarto entry in settings menu
The migration to 18.0 anchored the settings block inside the
"General Settings" app (after Contacts). In 18.0 the settings side
menu is built exclusively from ``<app>`` elements
(``web/static/src/webclient/settings_form_view/settings_form_compiler.js``),
so the block rendered but the dedicated "GogoCarto" menu entry the
16.0 view provided (``app_settings_block`` with ``data-key``) was
gone.

Declare a dedicated ``<app>`` injected at form level (same pattern as
core ``calendar``), which restores the menu entry; the block and its
translatable strings are unchanged. The ``base_setup`` dependency is
no longer needed and is dropped.

Add a regression test asserting the app exists in the combined arch.
Verified on a local 18.0 instance: 10 tests, 0 failed, 0 error, and
the combined form arch exposes the app at top level.
2026-10-19 00:17:04 +02:00
Stéphan Sainléger
0db0870f2b [MIG] partner_gogocarto_export_api: migrate to 18.0
Migrated from 16.0.1.0.1 following the OCA migration guidelines:

- ``with_context(force_company=...)`` replaced by ``.with_company(...)``
  in the controller: the ``force_company`` context key is no longer
  supported and logs a warning in 18.0.
- Settings view rewritten for the 17.0+ settings structure: the legacy
  ``<div class="app_settings_block">`` / ``hasclass('settings')`` anchor
  is gone. The block now follows the ``<block>``/``<setting>`` idiom and
  inherits ``base_setup.res_config_settings_view_form``; the
  ``base_setup`` dependency was added accordingly. Translatable strings
  are kept verbatim so the ``fr.po`` catalog stays valid.
- Fixed the ``posiion`` -> ``position`` typo in the company form
  inheritance (silently defaulted to ``inside`` since 16.0).
- Version bumped to ``18.0.1.0.0``; author normalized to a
  comma-separated string (pylint manifest-author-string).

Dependencies verified on 18.0: ``jsonifier`` (OCA server-tools) still
provides ``jsonify(parser)``, ``server_action_mass_edit`` (OCA
server-ux) still provides ``ir.actions.server.mass.edit.line`` and the
core ``ir.actions.server.create_action`` used by the mass-edit record.

Verified on a local 18.0 instance: clean install, and
``GET /web/<company_id>/get_http_gogocarto_elements`` returns the
expected JSON payload (flagged partners only, unknown company yields
``[]``, no ``force_company`` warnings in logs).
2026-10-19 00:17:04 +02:00
Stéphan Sainléger
9ac67a2788 [MIG] initiate branch 18.0 2025-12-16 23:12:36 +01:00
Stéphan Sainléger
e6dbf49a7f [FIX] partner_gogocarto_export_api: add missing dependency on server_action_mass_edit 2025-04-01 22:53:45 +02:00
b42fc550b9 [IMP]partner_gogocarto_export_api: add mass edit in_gogocarto field 2025-02-28 12:23:15 +01:00
Boris Gallet
70694c19de [MIG] partner_gogocarto_export_api : Migration to 16.0 2024-03-22 10:08:12 +01:00