Files
odoo_source/addons/web/static/tests
Pierre Paridans 9d920ee859 [FIX] web: control panel create button shouldn't be shown in dialog
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

closes odoo/odoo#149329

X-original-commit: c21c600189b36b7b4b352f8017467c8ef7d07c87
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2024-01-14 18:05:05 +00:00
..
…
…