From 464968de36df259ddf03e56e259f7fb17a2dc5b9 Mon Sep 17 00:00:00 2001 From: Adrien Dieudonne Date: Thu, 27 Feb 2020 13:14:15 +0000 Subject: [PATCH] [FIX] account, hr_expense: amounts on multiple lines in the dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, the amount currency could be wrapped on a second line (on mobile). To fix this, we had to find a way to have more space: - Buttons are now displayed at the top (mobile only). - Amounts can grow (col-auto) and the other column will take the space left (col) and add "..." when there is not enough space. (mobile + desktop) We also had to remove a button from a div tag in order to display the buttons next to each other on mobile (buttons are "inline-block" but div is a "block"). The main flow tour has been adapted accordingly and the typo has been fixed too... closes odoo/odoo#46680 Task-id: 2184243 X-original-commit: 159e3d4cb8a301c908f7718a56138528033e75d4 Related: odoo/enterprise#8963 Signed-off-by: Adrien Dieudonné (adr) --- .../src/scss/account_journal_dashboard.scss | 7 ++- .../views/account_journal_dashboard_view.xml | 48 +++++++++---------- .../views/account_journal_dashboard.xml | 4 +- .../static/tests/tours/main_flow.js | 2 +- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/addons/account/static/src/scss/account_journal_dashboard.scss b/addons/account/static/src/scss/account_journal_dashboard.scss index b842a94f058..36d8dbfd171 100644 --- a/addons/account/static/src/scss/account_journal_dashboard.scss +++ b/addons/account/static/src/scss/account_journal_dashboard.scss @@ -1,8 +1,11 @@ .o_kanban_view.o_kanban_dashboard.o_account_kanban { .o_kanban_record { - .oe_kanban_action_button { - margin-bottom: 5px; + @include media-breakpoint-up(sm) { + .oe_kanban_action_button { + display: block; + margin-bottom: 5px; + } } .o_kanban_card_settings { diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index 0136f959254..8b31b018e72 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -209,19 +209,19 @@ -
+
-
+
-
+ -
+
@@ -233,10 +233,10 @@ -
+
-
- + +
Create Statements
@@ -250,31 +250,31 @@
-
+
-
+
Balance in GL
-
+
-
+
Latest Statement
-
+
-
+
Balance in GL
-
+
@@ -285,12 +285,12 @@
-
+
- @@ -298,25 +298,25 @@ -
-
+
-
+ -
+
-
+ -
+
-
+ -
+
diff --git a/addons/hr_expense/views/account_journal_dashboard.xml b/addons/hr_expense/views/account_journal_dashboard.xml index 921a2a8a6bb..e589a4f674d 100644 --- a/addons/hr_expense/views/account_journal_dashboard.xml +++ b/addons/hr_expense/views/account_journal_dashboard.xml @@ -8,12 +8,12 @@
-
+ -
+
diff --git a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js index 26800770c3e..e32a70ace08 100644 --- a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js +++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js @@ -692,7 +692,7 @@ tour.register('main_flow_tour', { position: 'bottom', }, { edition: "enterprise", - trigger: 'div[name=bank_journal_cta] > button[data-name=action_cofigure_bank_journal], div[name=bank_journal_cta] > button[data-name=action_configure_bank_journal]', + trigger: 'button[data-name=action_configure_bank_journal]', content: _t('Configure Bank Journal'), position: 'bottom', }, {