borrados addons no portados

This commit is contained in:
snt 2026-02-11 02:00:49 +01:00
parent 80c2617c40
commit 39eb9608dc
437 changed files with 0 additions and 18812 deletions

View file

@ -1,27 +0,0 @@
/** @odoo-module **/
import TicketScreen from "point_of_sale.TicketScreen";
import {patch} from "@web/core/utils/patch";
patch(TicketScreen.prototype, "pos_full_refund.TicketScreen", {
onDoFullRefund() {
const order = this.getSelectedSyncedOrder();
if (!order) {
return;
}
// Set all orderlines to be fully refunded
// In Odoo 16, we use env.pos.toRefundLines instead of order.uiState.lineToRefund
for (const line of order.get_orderlines()) {
const refundableQty = line.get_quantity() - line.refunded_qty;
if (refundableQty > 0) {
// Get or create refund detail for this orderline
const toRefundDetail = this._getToRefundDetail(line);
toRefundDetail.qty = refundableQty;
}
}
// Trigger the refund process
this._onDoRefund();
},
});

View file

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates id="template" xml:space="preserve">
<t
t-name="TicketScreen"
t-inherit="point_of_sale.TicketScreen"
t-inherit-mode="extension"
owl="1"
>
<xpath
expr="//div[hasclass('leftpane')]//div[hasclass('control-buttons')]"
position="inside"
>
<button
id="set_full_refund_button"
class='control-button btn btn-light rounded-0 fw-bolder'
t-if="_selectedSyncedOrder"
t-on-click="() => this.onDoFullRefund()"
>
<i class="fa fa-cart-arrow-down" />
Do Full Refund
</button>
</xpath>
</t>
</templates>