[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) <boi@odoo.com>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<t t-name="calendar.AttendeeCalendarController.controlButtons" t-inherit="web.CalendarController.controlButtons" owl="1">
|
||||
<xpath expr="//span[hasclass('o_calendar_navigation_buttons')]" position="before">
|
||||
<span class="o_calendar_create_buttons">
|
||||
<button class="btn btn-primary o-calendar-button-new me-1" t-on-click="onClickAddButton" aria-label="Add" title="Add">Add</button>
|
||||
<button class="btn btn-primary o-calendar-button-new me-1" t-on-click="onClickAddButton">New</button>
|
||||
</span>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</t>
|
||||
<t t-set-slot="control-panel-create-button">
|
||||
<t t-if="canCreate">
|
||||
<button type="button" class="btn btn-outline-primary o_form_button_create" data-hotkey="c" t-on-click.stop="create" t-att-disabled="state.isDisabled">Create</button>
|
||||
<button type="button" class="btn btn-outline-primary o_form_button_create" data-hotkey="c" t-on-click.stop="create" t-att-disabled="state.isDisabled">New</button>
|
||||
</t>
|
||||
</t>
|
||||
<t t-component="props.Renderer" record="model.root" Compiler="props.Compiler" archInfo="archInfo" translateAlert="translateAlert" enableViewButtons.bind="enableButtons" disableViewButtons.bind="disableButtons" onNotebookPageChange.bind="onNotebookPageChange" activeNotebookPages="props.state and props.state.activeNotebookPages"/>
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div t-elif="canCreate" class="o_form_buttons_view">
|
||||
<button type="button" class="btn btn-secondary o_form_button_create" data-hotkey="c" t-on-click.stop="create">
|
||||
Create
|
||||
New
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div t-if="props.showButtons" class="o_cp_buttons d-flex align-items-baseline" role="toolbar" aria-label="Main actions">
|
||||
<t t-if="canCreate">
|
||||
<button type="button" class="btn btn-primary o-kanban-button-new" accesskey="c" t-on-click="() => this.createRecord(null)" data-bounce-button="">
|
||||
Create
|
||||
New
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</t>
|
||||
<t t-elif="activeActions.create and (!model.root.isGrouped or !editable)">
|
||||
<button type="button" class="btn btn-primary o_list_button_add" data-hotkey="c" t-on-click="onClickCreate" data-bounce-button="">
|
||||
Create
|
||||
New
|
||||
</button>
|
||||
</t>
|
||||
<t t-foreach="archInfo.headerButtons" t-as="button" t-key="button.id">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</button>
|
||||
</t>
|
||||
<t t-if="!props.noCreate">
|
||||
<button class="btn btn-primary o_create_button" data-hotkey="c" t-on-click="createEditRecord">Create</button>
|
||||
<button class="btn btn-primary o_create_button" data-hotkey="c" t-on-click="createEditRecord">New</button>
|
||||
</t>
|
||||
<button class="btn o_form_button_cancel" t-att-class="(!props.multiSelect && props.noCreate) ? 'btn-primary' : 'btn-secondary'" data-hotkey="z" t-on-click="() => this.props.close()">Close</button>
|
||||
</t>
|
||||
|
||||
@@ -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", ""]
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user