[19.0][FIX] spreadsheet_oca: fix breadcrumbs Owl error - #126
Conversation
…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.
|
@nericervin a check on this is appreciated, is basically the same commit, just on 19.0 branch |
nericervin
left a comment
There was a problem hiding this comment.
Checked it. Confirmed the same root cause is present on 19.0: SpreadsheetControlPanel.components overrides the parent's without spreading it, while props right above it already did ...ControlPanel.props.
On 19.0 ControlPanel.components declares Pager, SearchBar, Dropdown, DropdownItem, Breadcrumbs, AccordionItem, CheckBox, Transition, and our own spreadsheet_oca.SpreadsheetControlPanel template instantiates Pager, Dropdown and DropdownItem — so all three were undefined, not just the dropdowns.
I also swept the rest of the module for the same pattern: every other place that sets .components on an inherited class (SpreadsheetListController, and the chart config panels in chart_panels.esm.js) already spreads the parent, so this was the last one left.
The diff is identical to #112 and the fix is forward-compatible: if the parent's component set changes again, the spread picks it up. LGTM.
Thanks for taking care of the v19 backport 👍
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 68550ca. Thanks a lot for contributing to OCA. ❤️ |
This PR is basically a cherry-pick of #112 , which solves the problem on #124 for v19, since #112 fixes the issue on v18
The solution itlself is really simple