Friday, January 5, 2024
2 changes · master
Resolved issues and error corrections
Fixed an issue in Knowledge where selecting an item from the Search list could trigger an error and interrupt the workflow. The duplicate option now checks user permissions using the current user information, keeping the list view stable for users.
Original PR description
The user service has recently been removed, but it is still utilized in the main list controller of Knowledge to verify if the logged-in user is an admin before displaying the 'duplicate' option. As the service no longer exists, the service can not be loaded and any function call on that service will trigger an error. This commit addresses the issue by using the new `user` object instead of the outdated service. Steps to reproduce the error: 1. Go on Knowledge 2. Click on the "Search" menu item of the navbar 3. In the list view, select a record by checking a checkbox => TypeError: `this.userService` is `undefined` TO BE: There should be no error when checking a checkbox. Reference: https://github.com/odoo/enterprise/pull/52372/ task-3663517
This update aligns the mobile popover behavior with a simplified underlying structure. It helps keep the interface stable after internal cleanup, without introducing visible changes for users.
Original PR description
The PopoverController/Popover separation added a layer of complexity which doesn't seem to be needed. This commit removes the PopoverController and moves the needed logic to the Popover component. Community: https://github.com/odoo/odoo/pull/141413