| 1 |
import { registry } from "@web/core/registry"; |
| 2 |
|
| 3 |
registry.category("web_tour.tours").add("test_product_replenishment", { |
| 4 |
steps: () => [ |
| 5 |
// Show Route column |
| 6 |
{ |
| 7 |
content: "Open line fields list", |
| 8 |
trigger: ".o_optional_columns_dropdown_toggle", |
| 9 |
run: "click", |
| 10 |
}, |
| 11 |
{ |
| 12 |
content: "Show route column", |
| 13 |
trigger: '.o-dropdown-item input[name="route_id"]', |
| 14 |
run: async ({ anchor }) => { |
| 15 |
// We need this condition because `route_id` field is hidden by |
| 16 |
// default except if `purchase_mrp` is installed. |
| 17 |
if (!anchor.checked) { |
| 18 |
anchor.click(); |
| 19 |
} |
| 20 |
}, |
| 21 |
}, |
| 22 |
{ |
| 23 |
content: "Close line fields list", |
| 24 |
trigger: ".o_optional_columns_dropdown_toggle", |
| 25 |
run: "click", |
| 26 |
}, |
| 27 |
// Create reordering rule for product 'Book Shelf' |
| 28 |
{ |
| 29 |
content: "Click New Button", |
| 30 |
trigger: 'button:contains("New")', |
| 31 |
run: "click", |
| 32 |
}, |
| 33 |
{ |
| 34 |
content: "Select Buy Route", |
| 35 |
trigger: '.o_selected_row .o_list_many2one[name="route_id"] input', |
| 36 |
run: "edit Buy", |
| 37 |
}, |
| 38 |
{ |
| 39 |
content: "Valid Route", |
| 40 |
trigger: '.ui-menu-item-wrapper:contains("Buy")', |
| 41 |
run: "click", |
| 42 |
}, |
| 43 |
{ |
| 44 |
content: "Select Product", |
| 45 |
trigger: '.o_selected_row .o_list_many2one[name="product_id"] input', |
| 46 |
run: "edit Book Shelf", |
| 47 |
}, |
| 48 |
{ |
| 49 |
content: "Valid Product", |
| 50 |
trigger: '.ui-menu-item-wrapper:contains("Book Shelf")', |
| 51 |
run: "click", |
| 52 |
}, |
| 53 |
{ |
| 54 |
content: "Save the Rule", |
| 55 |
trigger: 'button:contains("Save")', |
| 56 |
run: "click", |
| 57 |
}, |
| 58 |
{ |
| 59 |
content: "Wait for the reordering rule to be added", |
| 60 |
trigger: '.o_data_row td:contains("Book Shelf")', |
| 61 |
}, |
| 62 |
], |
| 63 |
}); |