mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
Steps to reproduce: 1. Go to any Pivot or Graph view. 2. Add a custom filter, for example, Company. 3. Use the "is equal to" operator. Result: Uncaught Promise > Cannot find the definition of component "RecordPicker" --- This happens because in Odoo 15.0 there are two versions of the FilterMenu and CustomFilterItem widgets: one implemented in the legacy widget framework [^1] and another implemented in Owl [^2]. The legacy version is used for `tree` views, for example; whilst the Owl version is used for `pivot` and `graph` views. Confusing as it is, before this commit only the legacy version was being overriden, making it work for `tree` views (most common case), but not for `pivot` views. Since both versions share the same QWeb template, though, not only it wasn't working for `pivot`, but it also raised an Exception. [^1]: https://github.com/odoo/odoo/blob/21a2dfd90/addons/web/static/src/legacy/js/control_panel/custom_filter_item.js#L45 [^2]: https://github.com/odoo/odoo/blob/21a2dfd90/addons/web/static/src/search/filter_menu/custom_filter_item.js#L107