Skip to content

[18.0][FIX] spreadsheet_oca: inherit parent components in SpreadsheetControlPanel - #112

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
waikiservicios:18.0-fix-controlpanel-dropdown
Jul 28, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:18.0from
waikiservicios:18.0-fix-controlpanel-dropdown

Conversation

@nericervin

Copy link
Copy Markdown
Contributor

Summary

SpreadsheetControlPanel extends ControlPanel but overrides its static components property with only SpreadsheetName, losing Dropdown and DropdownItem that the parent template (web.ControlPanel) uses.

This causes:

OwlError: Cannot find the definition of component "Dropdown"

The error occurs when opening a spreadsheet from certain navigation paths (e.g., from a form view or a custom action), where the parent template's Dropdown component is needed.

Fix

Spread parent components before adding custom ones:

// Before (bug)
SpreadsheetControlPanel.components = {
    SpreadsheetName,
};

// After (fix)  
SpreadsheetControlPanel.components = {
    ...ControlPanel.components,
    SpreadsheetName,
};

This follows the same pattern used for SpreadsheetControlPanel.props which already spreads ControlPanel.props.

Test plan

  • Open a spreadsheet from the kanban view — works before and after
  • Open a spreadsheet from a form view (e.g., linked record) — fails before, works after
  • Edit spreadsheet name in the control panel — works
  • Breadcrumb navigation — works

…lPanel

SpreadsheetControlPanel extends ControlPanel but overrides
its static components property, losing Dropdown and
DropdownItem that the parent template uses.

This causes "Cannot find the definition of component
Dropdown" when opening a spreadsheet from certain
navigation paths (e.g. from a form view).

Fix: spread parent components before adding custom ones.
@pedrobaeza pedrobaeza added this to the 18.0 milestone Apr 13, 2026
@pedrobaeza
pedrobaeza requested a review from CarlosRoca13 April 13, 2026 18:34

@CarlosRoca13 CarlosRoca13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

Thanks!

@pedrobaeza pedrobaeza changed the title [FIX] spreadsheet_oca: inherit parent components in SpreadsheetControlPanel [18.0][FIX] spreadsheet_oca: inherit parent components in SpreadsheetControlPanel Apr 14, 2026
@pedrobaeza
pedrobaeza requested a review from etobella April 14, 2026 06:14

@arielbarreiros96 arielbarreiros96 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves #124 , is simple and it works 👌🏻. @nericervin I'll cherry-pick this commit to v19 which has the same problem

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-112-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit e49eb08 into OCA:18.0 Jul 28, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 6663df2. Thanks a lot for contributing to OCA. ❤️

@Codeleiche

Copy link
Copy Markdown

Hello there, I have the same problem on Odoo 17, how could I use this fix there?

susaglam added a commit to susaglam/spreadsheet that referenced this pull request Sep 17, 2026
The OCA 18.0 based frontend used o-spreadsheet and web client APIs that no
longer exist in saas-19.4. Every API was checked against the 19.4 source;
OCA 19.0 was used as an idea reference only.

spreadsheet_oca
- Global filters: globalFieldMatchingRegistry (getters first) replaces the
  removed globalFiltersFieldMatchers / RELATIVE_DATE_RANGE_TYPES; default
  values use {operator, ids|strings}; date defaults use DefaultDateValue;
  FilterValue gets globalFilterValue / setGlobalFilterValue; string domains
  for DomainSelector. The edit panel no longer crashes on open.
- Insert flows: pivots use getCollapsed/ExpandedTableStructure (dynamic vs
  static), lists use listId and the flat 19.4 definition, graphs create native
  bar/line/pie charts with an "odoo" data source and a valid CREATE_CHART
  payload. Re-insert from the side panels works; SELECT_ODOO_LIST removed.
- List "Add to spreadsheet" moved to the ListController and waits for the
  lazily loaded model (clicks before the renderer mounted were lost); x2many
  lists in forms never react (OCA OCA#88 root cause).
- Side panels: OWL3 hooks pass the component scope as first argument, so the
  pivot/list panels no longer bind loaders with default parameters.
- Charts: a community "odoo" chart data-source side panel is registered
  (community 19.4 only ships "range"); the ChartTypePicker patch that let Odoo
  charts become scorecard/gauge and the dead odoo_* chart panels are removed.
- Control panel: parent components are inherited (OCA OCA#112), breadcrumbs and
  Dropdown use the 19.4 markup (desktop and 375px), t-slot -> t-call-slot,
  graph "Add to spreadsheet" is enabled/disabled on real data.
- getExtraModelCustom() hook lets add-ons extend the model config (OCA OCA#127
  idea); image store implements getFile for clipboard copies.

spreadsheet_forecast_oca, spreadsheet_period_comparison_oca
- toNumber with locale, EvaluationError instead of Error, eslint errors
  fixed, missing _t strings added to the catalogs.

Tests (throwaway saas-19.4 databases on the test clone, Chrome)
- New browser tours for filters, pivot/list/graph insertion into new and
  existing spreadsheets, side-panel re-insert and domain edit, chart panel,
  breadcrumbs (desktop + mobile); hoot suites for the formula modules.
- Fresh install with demo: 491 tests, 0 failed, 0 errors.
- Upgrade of the pre-fix database: 489 tests, 0 failed, 0 errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants