odoo icon indicating copy to clipboard operation
odoo copied to clipboard

[FIX] hr_expense: show Create Report, Scan buttons in mobile

Open mairasalazar opened this issue 1 year ago • 1 comments

Current behavior: In hr_expenses, list and kanban views have different buttons being shown: list view displays 'New', 'Scan' and 'Create Report', while kanban view displays only 'New' and 'Upload'. In mobile, list view shows only 'New', and kanban shows 'Scan' and 'New'.

Expected behavior: 'Create Report' button should be displayed in both list and kanban view, in mobile or desktop. In mobile list view, 'Scan' should also be displayed.

Cause of the issue: The static view for list includes only button 'Scan' with display utility classes that hide the button in mobile. Similarly for 'Create Report' button in list. In Kanban, the button 'Create Report' has not been added.

Fix: In the list view, 'Upload' button was added for desktop view, and the classes of the 'Scan' button were changed to display it in mobile view. The display utility classes for 'Create Report' were removed, so the button is displayed in mobile.

In kanban view, button 'Create Report' was added. The main div of web.KanbanView.Buttons is replaced to ensure that the mobile view buttons are also displayed correctly. Without replacing it, the buttons 'New' and 'Scan' do not match the height of 'Create Report'.


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

mairasalazar avatar Jun 14 '24 08:06 mairasalazar

Pull request status dashboard

robodoo avatar Jun 14 '24 08:06 robodoo

@mairasalazar @oco-odoo because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward

robodoo avatar Jul 09 '24 09:07 robodoo

@robodoo rebase-ff

oco-odoo avatar Jul 09 '24 09:07 oco-odoo

Merge method set to rebase and fast-forward.

robodoo avatar Jul 09 '24 09:07 robodoo