mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 13:52:05 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -0,0 +1,59 @@
|
|||
import { registry } from "@web/core/registry";
|
||||
import { stepUtils } from "@web_tour/tour_utils";
|
||||
|
||||
registry.category("web_tour.tours").add('project_create_sol_tour', {
|
||||
url: "/odoo",
|
||||
steps: () => [
|
||||
stepUtils.showAppsMenuItem(), {
|
||||
trigger: ".o_app[data-menu-xmlid='project.menu_main_pm']",
|
||||
content: 'Select Project main menu.',
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: ".o_kanban_record:contains(Test History Project):first",
|
||||
content: "Open the project dropdown of project name 'Test History Project'.",
|
||||
run: "hover && click .o_kanban_record:contains(Test History Project):first .o_dropdown_kanban .dropdown-toggle",
|
||||
}, {
|
||||
trigger: ".o_kanban_card_manage_settings a:contains('Settings')",
|
||||
content: 'Start editing the project.',
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: ".o_field_widget[name='partner_id'] input",
|
||||
content: "Add the customer for this project",
|
||||
run: "click",
|
||||
}, {
|
||||
isActive: ["auto"],
|
||||
trigger: ".ui-autocomplete > li > a:not(:has(i.fa))",
|
||||
content: "Select the customer in the autocomplete dropdown",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: 'div.o_notebook_headers',
|
||||
},
|
||||
{
|
||||
trigger: 'a.nav-link[name="settings"]',
|
||||
content: 'Click on Settings tab to configure this project.',
|
||||
run: "click",
|
||||
}, {
|
||||
id: "project_sale_timesheet_start",
|
||||
trigger: "div[name='sale_line_id'] input",
|
||||
content: 'Add the Sales Order Item',
|
||||
run: "fill New Sale order line",
|
||||
}, {
|
||||
trigger: ".o_field_widget[name=sale_line_id] .o-autocomplete--dropdown-menu .o_m2o_dropdown_option_create a",
|
||||
content: "Create an Sales Order Item in the autocomplete dropdown.",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
trigger: "body:not(:has(.modal))",
|
||||
},
|
||||
{
|
||||
trigger: ".o_form_button_save:enabled",
|
||||
content: "Save project",
|
||||
run: "click",
|
||||
},
|
||||
// Those steps are currently needed in order to prevent the following issue:
|
||||
// "Form views in edition mode are automatically saved when the page is closed, which leads to stray network requests and inconsistencies."
|
||||
...stepUtils.toggleHomeMenu(),
|
||||
...stepUtils.goToAppSteps("project.menu_main_pm", 'Go to the Project app.'),
|
||||
]});
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* Add custom step to check allow_billable during project creation
|
||||
* to be able to set a partner on project/tasks.
|
||||
*/
|
||||
import { registry } from "@web/core/registry";
|
||||
import "@project/../tests/tours/project_tour";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(registry.category("web_tour.tours").get("project_test_tour"), {
|
||||
steps() {
|
||||
const originalSteps = super.steps();
|
||||
const projectCreationStepIndex = originalSteps.findIndex(
|
||||
(step) => step.id === "project_creation"
|
||||
);
|
||||
originalSteps.splice(projectCreationStepIndex, 0, {
|
||||
trigger: "div[name='allow_billable'] input",
|
||||
run: "edit Test",
|
||||
});
|
||||
|
||||
return originalSteps;
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue