19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:07 +01:00
parent ba20ce7443
commit 768b70e05e
2357 changed files with 1057103 additions and 712486 deletions

View file

@ -1,42 +0,0 @@
odoo.define('account.dashboard.setup.tour', function (require) {
"use strict";
var core = require('web.core');
var tour = require('web_tour.tour');
var _t = core._t;
tour.register('account_render_report', {
test: true,
url: '/web',
}, [tour.stepUtils.showAppsMenuItem(),
{
id: 'account_menu_click',
trigger: '.o_app[data-menu-xmlid="account.menu_finance"]',
position: 'bottom',
}, {
trigger: '.o_data_row:first .o_data_cell',
extra_trigger: '.breadcrumb',
}, {
trigger: '.o_control_panel button:contains("' + _t('Print') + '")',
}, {
trigger: '.o_control_panel .o-dropdown--menu span:contains("' + _t('Invoices without Payment') + '")',
}, {
trigger: 'iframe .o_report_layout_standard h2',
content: 'Primary color is correct',
run: function () {
if (this.$anchor.css('color') !== "rgb(18, 52, 86)") {
console.error('The primary color should be the one set on the company.');
}
},
}, {
trigger: 'iframe .o_report_layout_standard #informations div strong',
content: 'Secondary color is correct',
run: function () {
if (this.$anchor.css('color') !== "rgb(120, 145, 1)") {
console.error('The secondary color should be the one set on the company.');
}
},
}
]);
});

View file

@ -0,0 +1,35 @@
import { addSectionFromProductCatalog, showProductColumn } from "@account/js/tours/tour_utils";
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add("test_use_product_catalog_on_invoice", {
steps: () => [
{
content: "Click Catalog Button",
trigger: "button[name=action_add_from_catalog]",
run: "click",
},
{
content: "Add a Product",
trigger: ".o_kanban_record:contains(Test Product)",
run: "click",
},
{
content: "Wait for it",
trigger: ".o_product_added",
},
{
content: "Back to Invoice",
trigger: ".o-kanban-button-back",
run: "click",
},
...showProductColumn(),
{
content: "Ensure product is added",
trigger: ".o_field_product_label_section_and_note_cell:contains(Test Product)",
},
],
});
registry.category("web_tour.tours").add('test_add_section_from_product_catalog_on_invoice', {
steps: () => addSectionFromProductCatalog()
});

View file

@ -0,0 +1,28 @@
import { registry } from '@web/core/registry';
import { stepUtils } from "@web_tour/tour_utils";
registry.category("web_tour.tours").add("deductible_amount_column", {
url: "/odoo/vendor-bills/new",
steps: () => [
{
content: "Add item",
trigger: "div[name='invoice_line_ids'] .o_field_x2many_list_row_add a:contains('Add a line')",
run: "click",
},
{
content: "Edit name",
trigger: ".o_field_widget[name='name'] .o_input",
run: "edit Laptop"
},
{
content: "Edit deductible amount",
trigger: ".o_field_widget[name='deductible_amount'] > .o_input",
run: "edit 80"
},
{
content: "Set Bill Date",
trigger: "input[data-field=invoice_date]",
run: "edit 2025-12-01",
},
...stepUtils.saveForm(),
]})

View file

@ -1,128 +1,147 @@
/** @odoo-module alias=account.tax.group.tour.tests */
"use strict";
import { accountTourSteps } from "@account/js/tours/account";
import { registry } from "@web/core/registry";
import { stepUtils } from "@web_tour/tour_utils";
import tour from 'web_tour.tour';
tour.register('account_tax_group', {
test: true,
url: "/web",
}, [tour.stepUtils.showAppsMenuItem(),
{
id: 'account_menu_click',
content: "Go to Invoicing",
trigger: '.o_app[data-menu-xmlid="account.menu_finance"]',
},
registry.category("web_tour.tours").add('account_tax_group', {
url: "/odoo",
steps: () => [
...accountTourSteps.goToAccountMenu("Go to Invoicing"),
{
content: "Go to Vendors",
trigger: 'span:contains("Vendors")',
run: "click",
},
{
content: "Go to Bills",
trigger: 'a:contains("Bills")',
run: "click",
},
{
trigger: ".o_breadcrumb .text-truncate:contains(Bills)",
},
{
extra_trigger: '.breadcrumb:contains("Bills")',
content: "Create new bill",
trigger: '.o_list_button_add',
trigger: '.o_control_panel_main_buttons .o_list_button_add',
run: "click",
},
// Set a vendor
{
content: "Add vendor",
trigger: 'div.o_field_widget.o_field_res_partner_many2one[name="partner_id"] div input',
run: 'text Account Tax Group Partner',
run: "edit Account Tax Group Partner",
},
{
content: "Valid vendor",
trigger: '.ui-menu-item a:contains("Account Tax Group Partner")',
run: "click",
},
// Show product column
{
content: "Open line fields list",
trigger: ".o_optional_columns_dropdown_toggle",
run: "click"
},
{
content: "Show product column",
trigger: '.o-dropdown-item input[name="product_id"]',
run: "click"
},
{
content: "Close line fields list",
trigger: ".o_optional_columns_dropdown_toggle",
run: "click"
},
// Add First product
{
content: "Add items",
trigger: 'div[name="invoice_line_ids"] .o_field_x2many_list_row_add a:contains("Add a line")',
run: "click",
},
{
content: "Select input",
trigger: 'div[name="invoice_line_ids"] .o_selected_row .o_list_many2one[name="product_id"] input',
},
{
content: "Type item",
trigger: 'div[name="invoice_line_ids"] .o_selected_row .o_list_many2one[name="product_id"] input',
run: "text Account Tax Group Product",
run: "edit Account Tax Group Product",
},
{
content: "Valid item",
trigger: '.ui-menu-item-wrapper:contains("Account Tax Group Product")',
run: "click",
},
{
content: "Set Bill Date",
trigger: "input[data-field=invoice_date]",
run: "edit 2025-12-01",
},
// Save account.move
{
content: "Save the account move",
trigger: '.o_form_button_save',
},
...tour.stepUtils.saveForm(),
...stepUtils.saveForm(),
// Edit tax group amount
{
content: "Edit tax group amount",
trigger: '.o_tax_group_edit',
run: "click",
},
{
content: "Modify the input value",
trigger: '.o_tax_group_edit_input input',
run: function (actions) {
$('.o_tax_group_edit_input input').val(200);
$('.o_tax_group_edit_input input').select();
$('.o_tax_group_edit_input input').blur();
run() {
this.anchor.value = 200;
this.anchor.select();
this.anchor.blur();
},
},
// Check new value for total (with modified tax_group_amount).
{
content: "Valid total amount",
trigger: 'span[name="amount_total"]:contains("800")',
run: "click",
},
// Modify the quantity of the object
{
content: "Select item quantity",
trigger: 'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"]',
run: "click",
},
{
content: "Change item quantity",
trigger: 'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"] input',
run: 'text 2',
run: "edit 2",
},
{
content: "Valid the new value",
trigger: 'div[name="invoice_line_ids"] tbody tr.o_data_row .o_list_number[name="quantity"] input',
run: function (actions) {
let keydownEvent = jQuery.Event('keydown');
keydownEvent.which = 13;
this.$anchor.trigger(keydownEvent);
},
run: "press Enter",
},
// Save form
{
content: "Save the account move",
trigger: '.o_form_button_save',
},
...tour.stepUtils.saveForm(),
// Check new tax group value
{
content: "Check new value of tax group",
trigger: '.o_tax_group_amount_value:contains("120")',
run: "click",
},
// Save form
...stepUtils.saveForm(),
// Check new tax group value
{
content: "Check new value of tax group",
trigger: '.o_tax_group_amount_value:contains("120")',
run: "click",
},
{
content: "Edit tax value",
trigger: '.o_tax_group_edit_input input',
run: 'text 2'
run: "edit 2 && click body",
},
{
content: "Check new value of total",
trigger: '.oe_subtotal_footer_separator:contains("1,202")',
run: "click",
},
{
content: "Discard changes",
trigger: '.o_form_button_cancel',
run: "click",
},
{
content: "Check tax value is reset",
trigger: '.o_tax_group_amount_value:contains("120")',
},
]);
]});

View file

@ -0,0 +1,16 @@
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add('tests_shared_js_python', {
url: "/account/init_tests_shared_js_python",
steps: () => [
{
content: "Click",
trigger: 'button',
run: "click",
},
{
content: "Wait",
trigger: 'button.text-success',
timeout: 3000,
},
]});