Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,40 @@
/* Copyright 2024 Raumschmiede GmbH
Copyright 2024 BCIM
Copyright 2024 ACSONE SA/NV
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).*/
odoo.define("rma_sale_reason.animation", function (require) {
"use strict";
const publicWidget = require("rma_sale.animation");
publicWidget.registry.PortalRmaSale.include({
events: _.extend({}, publicWidget.registry.PortalRmaSale.prototype.events, {
"change .rma-reason": "_onChangeReasonId",
}),
_onChangeReasonId: function () {
this._checkCanSubmit();
},
_canSubmit: function () {
var can_submit = false;
var is_rma_reason_required = this.$el
.find('input[name="is_rma_reason_required"]')
.val();
if (is_rma_reason_required === "0") {
return this._super(...arguments);
}
for (const id of this.rows_ids) {
const row = this.rows[id];
var reason = this.$(`[name='${id}-reason_id']`);
if (
row &&
// A reason is defined
reason &&
reason.val()
) {
can_submit = true;
break;
}
}
return can_submit && this._super(...arguments);
},
});
});

View file

@ -0,0 +1,69 @@
/** @odoo-module */
/* Copyright 2021 Tecnativa - David Vidal
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */
import tour from "web_tour.tour";
tour.register(
"rma_sale_reason_portal",
{
test: true,
url: "/my/orders",
},
[
{
content: "Open the test sale order",
trigger: 'a:containsExact("Test Sale RMA SO")',
},
{
content: "Open the RMA request pop-up",
trigger: 'a:contains("Request RMAs")',
},
{
content:
"Submit button is disabled until we set quanity and requested operation",
trigger: "button[type='submit'][disabled]",
},
{
content: "Return 1 unit for the first row",
trigger: "input[name='0-quantity']",
run: "text 1",
},
{
content: "Select the reason",
trigger: "select[name='0-reason_id']",
run: "text Reason",
},
{
content: "Select the operation",
trigger: "select[name='0-operation_id']",
run: "text Replace",
},
{
content: "Write some comments",
trigger: "textarea[name='0-description']",
run: "text I'd like to change this product",
},
{
content: "Unfold the Delivery Address picker",
trigger: "button:contains('Choose a delivery address')",
},
{
content: "Choose another address",
trigger: ".o_rma_portal_shipping_card:contains('Another address')",
run: "click",
},
{
content: "Submit the RMA",
trigger: "button[type='submit']",
},
{
content: "We're redirected to the new draft RMA",
trigger: "h5:contains('RMA Order')",
},
{
content: "We're redirected to the new draft RMA",
trigger: "h5:contains('RMA Order')",
},
]
);