From e089cda98d275ae4685fe36cd90b0e9b2922af76 Mon Sep 17 00:00:00 2001 From: "Michael (mcm)" Date: Mon, 19 Dec 2022 11:44:00 +0000 Subject: [PATCH] [IMP] web,*: rename Create button to New *calendar,test_main_flows This commit tries to unify the name of the create buttons in different apps. "New" is used over "Create" to avoid confusion regarding its effect. "Create" could be interpreted as we want the current record to create a new one. But "New" implies that the user will land on an empty page that can be filled. task id: 3074472 closes odoo/odoo#108439 Related: odoo/enterprise#35139 Signed-off-by: Bruno Boi (boi) --- .../attendee_calendar/attendee_calendar_controller.xml | 2 +- addons/web/static/src/views/form/form_controller.xml | 4 ++-- .../web/static/src/views/kanban/kanban_controller.xml | 2 +- addons/web/static/src/views/list/list_controller.xml | 2 +- .../src/views/view_dialogs/select_create_dialog.xml | 2 +- addons/web/static/tests/views/list_view_tests.js | 6 +++--- .../test_main_flows/static/tests/tours/main_flow.js | 10 +++++----- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/calendar/static/src/views/attendee_calendar/attendee_calendar_controller.xml b/addons/calendar/static/src/views/attendee_calendar/attendee_calendar_controller.xml index 2184962d6f8..cef61afbe2e 100644 --- a/addons/calendar/static/src/views/attendee_calendar/attendee_calendar_controller.xml +++ b/addons/calendar/static/src/views/attendee_calendar/attendee_calendar_controller.xml @@ -25,7 +25,7 @@ - + diff --git a/addons/web/static/src/views/form/form_controller.xml b/addons/web/static/src/views/form/form_controller.xml index dcaadc930ea..69e8bde22af 100644 --- a/addons/web/static/src/views/form/form_controller.xml +++ b/addons/web/static/src/views/form/form_controller.xml @@ -34,7 +34,7 @@ - + @@ -58,7 +58,7 @@
diff --git a/addons/web/static/src/views/kanban/kanban_controller.xml b/addons/web/static/src/views/kanban/kanban_controller.xml index d5bffbc75e6..e44abc58231 100644 --- a/addons/web/static/src/views/kanban/kanban_controller.xml +++ b/addons/web/static/src/views/kanban/kanban_controller.xml @@ -25,7 +25,7 @@ diff --git a/addons/web/static/src/views/list/list_controller.xml b/addons/web/static/src/views/list/list_controller.xml index 321acc1b399..cac502b6734 100644 --- a/addons/web/static/src/views/list/list_controller.xml +++ b/addons/web/static/src/views/list/list_controller.xml @@ -44,7 +44,7 @@
diff --git a/addons/web/static/src/views/view_dialogs/select_create_dialog.xml b/addons/web/static/src/views/view_dialogs/select_create_dialog.xml index cce9b7b91fb..35c1fcae729 100644 --- a/addons/web/static/src/views/view_dialogs/select_create_dialog.xml +++ b/addons/web/static/src/views/view_dialogs/select_create_dialog.xml @@ -15,7 +15,7 @@ - + diff --git a/addons/web/static/tests/views/list_view_tests.js b/addons/web/static/tests/views/list_view_tests.js index 8b652fc3f50..8f315a8d6af 100644 --- a/addons/web/static/tests/views/list_view_tests.js +++ b/addons/web/static/tests/views/list_view_tests.js @@ -848,7 +848,7 @@ QUnit.module("Views", (hooks) => { [...cpButtons.querySelectorAll("button")].map((button) => button.textContent.trim() ), - ["Create", "display", ""] + ["New", "display", ""] ); await click( @@ -859,7 +859,7 @@ QUnit.module("Views", (hooks) => { [...cpButtons.querySelectorAll("button")].map((button) => button.textContent.trim() ), - ["Create", "display", "default-selection"] + ["New", "display", "default-selection"] ); await click( @@ -870,7 +870,7 @@ QUnit.module("Views", (hooks) => { [...cpButtons.querySelectorAll("button")].map((button) => button.textContent.trim() ), - ["Create", "display", ""] + ["New", "display", ""] ); } ); 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 99dc151cab9..56fe18095a9 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 @@ -110,7 +110,7 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_saved'), position: "bottom", }, { mobile: true, - trigger: ".modal-dialog .btn:contains('Create')", + trigger: ".modal-dialog .btn:contains('New')", extra_trigger: ".modal-dialog", content: _t("Click here to add new line."), position: "left", @@ -169,7 +169,7 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_saved'), position: "bottom", }, { mobile: true, - trigger: ".modal-footer .btn:contains('Create')", + trigger: ".modal-footer .o_create_button", extra_trigger: ".modal:not(.o_inactive_modal) .modal-title:contains('Vendor')", content: _t("Select a vendor, or create a new one on the fly."), position: "right", @@ -236,7 +236,7 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_saved'), position: "bottom", }, { mobile: true, - trigger: ".modal-dialog .btn:contains('Create')", + trigger: ".modal-dialog .btn:contains('New')", extra_trigger: ".modal-dialog", content: _t("Click here to add new line."), position: "left", @@ -393,7 +393,7 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_saved'), position: 'left', }, { mobile: true, - trigger: ".modal-dialog .btn:contains('Create')", + trigger: ".modal-dialog .btn:contains('New')", extra_trigger: ".modal-dialog", content: _t("Click here to add new line."), position: "left", @@ -449,7 +449,7 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_saved'), position: "left", }, { mobile: true, - trigger: ".modal-dialog .btn:contains('Create')", + trigger: ".modal-dialog .btn:contains('New')", extra_trigger: ".modal-dialog", content: _t("Click here to add new line."), position: "left",