chore: import enterprise addons 19.0 bulk snapshot

This commit is contained in:
1b-agent committed 2026-09-16 10:13:08 +00:00
commit ca4af030d3
39951 files changed
+15570005

No files matched your search

@@ -0,0 +1,11 @@
import { PosStore } from "@point_of_sale/app/services/pos_store";
import { patch } from "@web/core/utils/patch";
patch(PosStore.prototype, {
isSaleOrderLineNote(orderLine) {
return (
super.isSaleOrderLineNote(orderLine) ||
orderLine.display_type === "subscription_discount"
);
},
});
@@ -0,0 +1,21 @@
import { SaleOrder } from "@pos_sale/../tests/unit/data/sale_order.data";
SaleOrder._records = [
...SaleOrder._records,
{
id: 2,
name: "S00002",
state: "sale",
order_line: [1, 3],
partner_id: 3,
pricelist_id: 1,
fiscal_position_id: 1,
amount_total: 650,
amount_untaxed: 500,
amount_unpaid: 650,
partner_shipping_id: 3,
partner_invoice_id: 3,
date_order: "2025-07-03 17:04:14",
write_date: "2025-07-03 17:04:14",
},
];
@@ -0,0 +1,23 @@
import { SaleOrderLine } from "@pos_sale/../tests/unit/data/sale_order_line.data";
SaleOrderLine._records = [
...SaleOrderLine._records,
{
id: 3,
display_name: "These recurring products are discounted",
product_id: 6,
product_uom_qty: 3,
price_unit: 50,
price_total: 150,
discount: 0,
qty_delivered: 0,
qty_invoiced: 0,
qty_to_invoice: 3,
display_type: "subscription_discount",
name: "These recurring products are discounted",
tax_ids: [],
is_downpayment: false,
extra_tax_data: {},
write_date: "2025-07-03 17:04:14",
},
];
@@ -0,0 +1,24 @@
import { test, expect, describe } from "@odoo/hoot";
import { setupPosEnv, getFilledOrder } from "@point_of_sale/../tests/unit/utils";
import { click, waitFor } from "@odoo/hoot-dom";
import { mountWithCleanup } from "@web/../tests/web_test_helpers";
import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen";
import { definePosModels } from "@point_of_sale/../tests/unit/data/generate_model_definitions";
definePosModels();
describe("onClickSaleOrder", () => {
test("subscription_discount line treated as note", async () => {
const store = await setupPosEnv();
const order = await getFilledOrder(store);
await mountWithCleanup(ProductScreen, { props: { orderUuid: order.uuid } });
const promiseResult = store.onClickSaleOrder(2);
await waitFor(".modal-body button:contains('Settle the order')");
await click(".modal-body button:contains('Settle the order')");
await promiseResult;
expect(store.getOrder().lines[store.getOrder().lines.length - 1].customer_note).toBe(
"These recurring products are discounted"
);
});
});