Sunday, January 14, 2024
1 change · 17.0
Resolved issues and error corrections
This fix resolves an issue where the "New" button was appearing twice in selection dialogs on mobile devices - once in the top control panel and once in the footer. The problem occurred because list and kanban views were using different conditions to determine when to show the create button. The fix standardizes this behavior across both view types so the button only appears in the footer where it belongs in dialogs.
Original PR description
The kanban's create button ("New") is usually displayed in the ControlPanel. But in the select/create dialog (like many2one dialog), the create button is moved to the footer. On small screen, the…
The kanban's create button ("New") is usually displayed in the ControlPanel. But in the select/create dialog (like many2one dialog), the create button is moved to the footer.
On small screen, the Many2X fields' selection view switches from a list view to a kanban one but a different condition was used to display (or not) the create button in the ControlPanel, which explains why the ControlPanel's create button appears only on small screen (and not in the same dialog open on desktop-like screen size).
This commit fixes it by reviewing the condition applied in both the list and kanban views and normalizing them to be based on the (existing) `showButtons` prop that controls the additional buttons added to the ControlPanel.
Steps to reproduce (with a smartphone like screen size):
- open Contacts app
- open a contact
- open the company's selection => two "New" buttons are displayed (top and bottom)
opw-3431221
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#149081
Forward-Port-Of: odoo/odoo#149010