From 426c23257b9a843411d62561ca4427016b7d1708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Lef=C3=A8vre=20=28lul=29?= Date: Tue, 22 Oct 2024 08:11:28 +0000 Subject: [PATCH] [IMP] pivot: disable automatic autofill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FP request: when applying a data table automatically to pivots (and to lists), disable the "autofill formulas", this way when you copy/paste some of the data to a new column adjacent it doesn't mess everything up. closes odoo/o-spreadsheet#5126 Task: 4256700 X-original-commit: f5199340391759204824faa47d937211d401572e Signed-off-by: Pierre Rousseau (pro) Signed-off-by: Lucas Lefèvre (lul) --- src/constants.ts | 2 +- tests/pivots/pivot_menu_items.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 4d1c775a89..902b96d1a2 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -295,7 +295,7 @@ export const PIVOT_TABLE_CONFIG = { bandedRows: true, bandedColumns: false, styleId: "TableStyleMedium5", - automaticAutofill: true, + automaticAutofill: false, }; export const DEFAULT_CURRENCY: Currency = { diff --git a/tests/pivots/pivot_menu_items.test.ts b/tests/pivots/pivot_menu_items.test.ts index b32e1f2018..b6900e8e05 100644 --- a/tests/pivots/pivot_menu_items.test.ts +++ b/tests/pivots/pivot_menu_items.test.ts @@ -418,7 +418,7 @@ describe("Pivot reinsertion menu item", () => { }) ).toMatchObject({ range: { zone: toZone("B8") }, - config: { numberOfHeaders: 1, automaticAutofill: true }, + config: { numberOfHeaders: 1, automaticAutofill: false }, type: "dynamic", }); }); @@ -494,7 +494,7 @@ describe("Pivot reinsertion menu item", () => { }) ).toMatchObject({ range: { zone: toZone("B8:C11") }, - config: { numberOfHeaders: 1, automaticAutofill: true }, + config: { numberOfHeaders: 1, automaticAutofill: false }, type: "static", }); });