[IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/82328ad7 [REL] 16.4.0-alpha.2 https://github.com/odoo/o-spreadsheet/commit/fc9f6263 [FIX] index.ts: export `invalidateXCommand` sets https://github.com/odoo/o-spreadsheet/commit/dca78e38 [IMP] Charts: improve side-pannel clarity https://github.com/odoo/o-spreadsheet/commit/60e55d6c [REF] core: remove range plugin attribute https://github.com/odoo/o-spreadsheet/commit/564c094f [REL] 16.4.0-alpha.1 https://github.com/odoo/o-spreadsheet/commit/d01251d0 [IMP] evaluation: lazy build dependency graph https://github.com/odoo/o-spreadsheet/commit/0a6a786e [IMP] evaluation: introduce array formulas https://github.com/odoo/o-spreadsheet/commit/54eea364 [MOV] evaluation: move file in its own folder https://github.com/odoo/o-spreadsheet/commit/c11a642d [IMP] icons: add unfreeze icon https://github.com/odoo/o-spreadsheet/commit/3632c629 [FIX] viewport: warning message on resized viewport size https://github.com/odoo/o-spreadsheet/commit/3169b5c9 [REF] cells: use class instead of closure https://github.com/odoo/o-spreadsheet/commit/0d6a3904 [FIX] ColorPicker: Fix style issue https://github.com/odoo/o-spreadsheet/commit/6a12501a [FIX] SheetUIPlugin: set column height for multi line content https://github.com/odoo/o-spreadsheet/commit/fffba67c [FIX] ColorPicker: modified add custom color icon Task: 3258627 https://github.com/odoo/o-spreadsheet/commit/2d158b55 [FIX] ContentEditableHelper: do not throw on missing node https://github.com/odoo/o-spreadsheet/commit/40b37030 [IMP] components: use a hook to register/clean up event listeners https://github.com/odoo/o-spreadsheet/commit/3a3aab7b [REL] 16.4.0.alpha https://github.com/odoo/o-spreadsheet/commit/d70dcebe [FIX] ChartFigure: chart/image menu options in readonly mode Task: 3284659 https://github.com/odoo/o-spreadsheet/commit/fcc0d723 [IMP] commands: introduce reserved keywords Task: 3276541 https://github.com/odoo/o-spreadsheet/commit/da9f553e [IMP] commands: generic check for position Task: 3276541 https://github.com/odoo/o-spreadsheet/commit/930ac3a0 [IMP] model: core allowDispatch for local commands Task: 3276541 https://github.com/odoo/o-spreadsheet/commit/9f067cfe [FIX] Topbar: fix data menu items order https://github.com/odoo/o-spreadsheet/commit/2ce92d3c [FIX] TopBar: fix icon's CSS https://github.com/odoo/o-spreadsheet/commit/2be1518c [IMP] tests: add helper triggerTouchEvent Task: 3302326 https://github.com/odoo/o-spreadsheet/commit/e91b2b89 [IMP] tests: use keyUp/keyDown helper everywhere Task: 3302326 https://github.com/odoo/o-spreadsheet/commit/d63c2be2 [IMP] tests: add a triggerWheelEvent helper Task: 3302326 closes odoo/odoo#122677 Related: odoo/enterprise#41587 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
This commit is contained in:
committed by
Lucas Lefèvre
parent
f9edfced9e
commit
86eb916bf2
@@ -10,7 +10,13 @@ function identity(cmd) {
|
||||
return [cmd];
|
||||
}
|
||||
|
||||
const { coreTypes, invalidateEvaluationCommands, readonlyAllowedCommands } = spreadsheet;
|
||||
const {
|
||||
coreTypes,
|
||||
invalidateEvaluationCommands,
|
||||
invalidateCFEvaluationCommands,
|
||||
invalidateDependenciesCommands,
|
||||
readonlyAllowedCommands,
|
||||
} = spreadsheet;
|
||||
|
||||
coreTypes.add("ADD_GLOBAL_FILTER");
|
||||
coreTypes.add("EDIT_GLOBAL_FILTER");
|
||||
@@ -22,6 +28,18 @@ invalidateEvaluationCommands.add("REMOVE_GLOBAL_FILTER");
|
||||
invalidateEvaluationCommands.add("SET_GLOBAL_FILTER_VALUE");
|
||||
invalidateEvaluationCommands.add("CLEAR_GLOBAL_FILTER_VALUE");
|
||||
|
||||
invalidateDependenciesCommands.add("ADD_GLOBAL_FILTER");
|
||||
invalidateDependenciesCommands.add("EDIT_GLOBAL_FILTER");
|
||||
invalidateDependenciesCommands.add("REMOVE_GLOBAL_FILTER");
|
||||
invalidateDependenciesCommands.add("SET_GLOBAL_FILTER_VALUE");
|
||||
invalidateDependenciesCommands.add("CLEAR_GLOBAL_FILTER_VALUE");
|
||||
|
||||
invalidateCFEvaluationCommands.add("ADD_GLOBAL_FILTER");
|
||||
invalidateCFEvaluationCommands.add("EDIT_GLOBAL_FILTER");
|
||||
invalidateCFEvaluationCommands.add("REMOVE_GLOBAL_FILTER");
|
||||
invalidateCFEvaluationCommands.add("SET_GLOBAL_FILTER_VALUE");
|
||||
invalidateCFEvaluationCommands.add("CLEAR_GLOBAL_FILTER_VALUE");
|
||||
|
||||
readonlyAllowedCommands.add("SET_GLOBAL_FILTER_VALUE");
|
||||
readonlyAllowedCommands.add("SET_MANY_GLOBAL_FILTER_VALUE");
|
||||
readonlyAllowedCommands.add("CLEAR_GLOBAL_FILTER_VALUE");
|
||||
|
||||
@@ -15,7 +15,13 @@ function identity(cmd) {
|
||||
return [cmd];
|
||||
}
|
||||
|
||||
const { coreTypes, invalidateEvaluationCommands } = spreadsheet;
|
||||
const {
|
||||
coreTypes,
|
||||
invalidateEvaluationCommands,
|
||||
invalidateCFEvaluationCommands,
|
||||
invalidateDependenciesCommands,
|
||||
} = spreadsheet;
|
||||
|
||||
const { cellMenuRegistry } = spreadsheet.registries;
|
||||
|
||||
coreTypes.add("INSERT_ODOO_LIST");
|
||||
@@ -29,6 +35,14 @@ invalidateEvaluationCommands.add("UPDATE_ODOO_LIST_DOMAIN");
|
||||
invalidateEvaluationCommands.add("INSERT_ODOO_LIST");
|
||||
invalidateEvaluationCommands.add("REMOVE_ODOO_LIST");
|
||||
|
||||
invalidateDependenciesCommands.add("UPDATE_ODOO_LIST_DOMAIN");
|
||||
invalidateDependenciesCommands.add("INSERT_ODOO_LIST");
|
||||
invalidateDependenciesCommands.add("REMOVE_ODOO_LIST");
|
||||
|
||||
invalidateCFEvaluationCommands.add("UPDATE_ODOO_LIST_DOMAIN");
|
||||
invalidateCFEvaluationCommands.add("INSERT_ODOO_LIST");
|
||||
invalidateCFEvaluationCommands.add("REMOVE_ODOO_LIST");
|
||||
|
||||
cellMenuRegistry.add("list_see_record", {
|
||||
name: _lt("See record"),
|
||||
sequence: 200,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -325,8 +325,10 @@
|
||||
<span>Custom</span>
|
||||
</div>
|
||||
<div class="colors-grid o-color-picker-toggler" t-on-click.stop="toggleColorPicker">
|
||||
<div class="o-color-picker-line-item o-color-picker-toggler">
|
||||
<div align="center">+</div>
|
||||
<div class="o-color-picker-line-item o-color-picker-toggler-button">
|
||||
<div class="o-color-picker-toggler-sign">
|
||||
<t t-call="o-spreadsheet-Icon.PLUS"/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
t-foreach="env.model.getters.getCustomColors()"
|
||||
@@ -635,7 +637,7 @@
|
||||
<div
|
||||
class="o-figure w-100 h-100"
|
||||
t-on-mousedown.stop="(ev) => this.onMouseDown(ev)"
|
||||
t-on-contextmenu.prevent.stop="onContextMenu"
|
||||
t-on-contextmenu.prevent.stop="(ev) => !env.model.getters.isReadonly() and this.onContextMenu(ev)"
|
||||
t-ref="figure"
|
||||
t-att-style="props.style"
|
||||
t-att-data-id="props.figure.id"
|
||||
@@ -651,6 +653,7 @@
|
||||
<div class="o-figure-menu position-absolute m-2" t-if="!env.isDashboard()">
|
||||
<div
|
||||
class="o-figure-menu-item"
|
||||
t-if="!env.model.getters.isReadonly()"
|
||||
t-on-click="showMenu"
|
||||
t-ref="menuButton"
|
||||
t-on-contextmenu.prevent.stop="showMenu">
|
||||
@@ -1323,6 +1326,14 @@
|
||||
/>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.UNFREEZE" owl="1">
|
||||
<svg class="o-icon">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M.5 17.5h16a1 1 0 0 0 1-1v-15a1 1 0 0 0-1-1h-15a1 1 0 0 0-1 1v15a1 1 0 0 0 1 1M5 6H2V2h3m0 9.5H2V7h3m0 9H2v-3.5h3M10.5 7v4.5H6V7m0 9v-3.5h4.5V16m5.5 0h-4.5v-3.5H16m0-1h-4.5V7H16m0-5v4h-4.5V2m-1 4H6V2h4.5"
|
||||
/>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.SHOW_HIDE_GRID" owl="1">
|
||||
<svg class="o-icon">
|
||||
<path
|
||||
@@ -1741,7 +1752,7 @@
|
||||
</t>
|
||||
|
||||
<t t-name="o-spreadsheet-Icon.PLUS" owl="1">
|
||||
<svg class="o-icon">
|
||||
<svg class="o-icon" viewBox="0 0 18 18">
|
||||
<path fill="currentColor" d="M8 0h2v8h8v2h-8v8H8v-8H0V8h8"/>
|
||||
</svg>
|
||||
</t>
|
||||
@@ -1922,26 +1933,16 @@
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.SORT_ASCENDING" owl="1">
|
||||
<svg class="o-icon" fill="currentColor">
|
||||
<style>
|
||||
.small {
|
||||
font: bold 9px sans-serif;
|
||||
}
|
||||
</style>
|
||||
<path d="m3 13-1-1-1 1 3 3 3-3-1-1-1 1V0H3"/>
|
||||
<text x="9" y="7" class="small">A</text>
|
||||
<text x="9.3" y="15" class="small">Z</text>
|
||||
<text x="9" y="7" class="small-text">A</text>
|
||||
<text x="9.3" y="15" class="small-text">Z</text>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.SORT_DESCENDING" owl="1">
|
||||
<svg class="o-icon" fill="currentColor">
|
||||
<style>
|
||||
.small {
|
||||
font: bold 9px sans-serif;
|
||||
}
|
||||
</style>
|
||||
<path d="m3 13.9-1-1-1 1 3 3 3-3-1-1-1 1V.9H3"/>
|
||||
<text x="9.3" y="7.9" class="small">Z</text>
|
||||
<text x="9" y="15.9" class="small">A</text>
|
||||
<text x="9.3" y="7.9" class="small-text">Z</text>
|
||||
<text x="9" y="15.9" class="small-text">A</text>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.FILTER_ICON" owl="1">
|
||||
@@ -2025,16 +2026,8 @@
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.FONT_SIZE" owl="1">
|
||||
<svg class="o-icon" fill="currentColor">
|
||||
<style>
|
||||
.small {
|
||||
font: bold 9px sans-serif;
|
||||
}
|
||||
.heavy {
|
||||
font: bold 16px sans-serif;
|
||||
}
|
||||
</style>
|
||||
<text x="2" y="15" class="small">A</text>
|
||||
<text x="6" y="15" class="heavy">A</text>
|
||||
<text x="2" y="15" class="small-text">A</text>
|
||||
<text x="6" y="15" class="heavy-text">A</text>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.TRIANGLE_EXCLAMATION" owl="1">
|
||||
@@ -2053,6 +2046,14 @@
|
||||
/>
|
||||
</svg>
|
||||
</t>
|
||||
<t t-name="o-spreadsheet-Icon.ERROR" owl="1">
|
||||
<svg class="error-icon" width="14" height="14" viewBox="0 0 512 512">
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
|
||||
/>
|
||||
</svg>
|
||||
</t>
|
||||
|
||||
<t t-name="o-spreadsheet-LinkDisplay" owl="1">
|
||||
<div class="o-link-tool d-flex align-items-center">
|
||||
@@ -2222,38 +2223,59 @@
|
||||
t-foreach="ranges"
|
||||
t-as="range"
|
||||
t-key="range.id"
|
||||
class="o-selection-input"
|
||||
class="o-selection-input d-flex flex-row"
|
||||
t-att-class="props.class">
|
||||
<input
|
||||
type="text"
|
||||
spellcheck="false"
|
||||
t-on-input="(ev) => this.onInputChanged(range.id, ev)"
|
||||
t-on-focus="() => this.focus(range.id)"
|
||||
t-on-keydown="onKeydown"
|
||||
t-att-value="range.xc"
|
||||
t-att-style="getColor(range)"
|
||||
t-att-class="{
|
||||
'o-focused' : range.isFocused,
|
||||
'o-required': props.required,
|
||||
'o-optional': !props.required,
|
||||
'o-invalid': isInvalid || !range.isValidRange,
|
||||
'text-decoration-underline': range.isFocused and state.mode === 'select-range'
|
||||
}"
|
||||
t-ref="{{range.isFocused ? 'focusedInput' : 'unfocusedInput' + range_index}}"
|
||||
/>
|
||||
<div class="position-relative w-100">
|
||||
<input
|
||||
type="text"
|
||||
spellcheck="false"
|
||||
t-on-input="(ev) => this.onInputChanged(range.id, ev)"
|
||||
t-on-focus="() => this.focus(range.id)"
|
||||
t-on-keydown="onKeydown"
|
||||
t-att-value="range.xc"
|
||||
t-att-style="getColor(range)"
|
||||
class="w-100"
|
||||
t-att-class="{
|
||||
'o-focused' : range.isFocused,
|
||||
'o-required': props.required,
|
||||
'o-optional': !props.required,
|
||||
'o-invalid border-danger position-relative': isInvalid || !range.isValidRange,
|
||||
'text-decoration-underline': range.isFocused and state.mode === 'select-range'
|
||||
}"
|
||||
t-ref="{{range.isFocused ? 'focusedInput' : 'unfocusedInput' + range_index}}"
|
||||
/>
|
||||
<span
|
||||
t-if="isInvalid || !range.isValidRange"
|
||||
class="error-icon text-danger position-absolute"
|
||||
title="This range is invalid">
|
||||
<t t-call="o-spreadsheet-Icon.ERROR"/>
|
||||
</span>
|
||||
</div>
|
||||
<button
|
||||
class="o-btn o-remove-selection"
|
||||
class="o-btn border-0 bg-transparent fw-bold o-remove-selection"
|
||||
t-if="ranges.length > 1"
|
||||
t-on-click="() => this.removeInput(range.id)">
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="o-selection-input">
|
||||
<button class="o-btn-action o-add-selection" t-if="canAddRange" t-on-click="addEmptyInput">
|
||||
<div class="o-selection-input d-flex flex-row">
|
||||
<button
|
||||
class="o-btn-action bg-transparent fw-bold o-add-selection"
|
||||
t-if="canAddRange"
|
||||
t-on-click="addEmptyInput">
|
||||
Add range
|
||||
</button>
|
||||
<button class="o-btn-action o-selection-ok" t-if="hasFocus" t-on-click="confirm">
|
||||
<button
|
||||
class="o-btn-action bg-transparent fw-bold o-selection-ko"
|
||||
t-if="isResettable"
|
||||
t-on-click="reset">
|
||||
Reset
|
||||
</button>
|
||||
<button
|
||||
class="o-btn-action bg-transparent fw-bold o-selection-ok"
|
||||
t-if="isConfirmable"
|
||||
t-on-click="confirm">
|
||||
Confirm
|
||||
</button>
|
||||
</div>
|
||||
@@ -2279,8 +2301,7 @@
|
||||
<div class="o-section o-data-series">
|
||||
<div class="o-section-title">Data Series</div>
|
||||
<SelectionInput
|
||||
ranges="dataSeriesRanges"
|
||||
isInvalid="isDatasetInvalid"
|
||||
ranges="() => this.getDataSeriesRanges()"
|
||||
required="true"
|
||||
onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
|
||||
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
|
||||
@@ -2289,7 +2310,7 @@
|
||||
<div class="o-section o-data-labels">
|
||||
<div class="o-section-title">Categories / Labels</div>
|
||||
<SelectionInput
|
||||
ranges="[props.definition.labelRange || '']"
|
||||
ranges="() => [this.getLabelRange()]"
|
||||
isInvalid="isLabelInvalid"
|
||||
hasSingleRange="true"
|
||||
onSelectionChanged="(ranges) => this.onLabelRangeChanged(ranges)"
|
||||
@@ -2382,7 +2403,7 @@
|
||||
<div class="o-section o-data-series">
|
||||
<div class="o-section-title">Data range</div>
|
||||
<SelectionInput
|
||||
ranges="[props.definition.dataRange || '']"
|
||||
ranges="() => [this.getDataRange()]"
|
||||
isInvalid="isDataRangeInvalid"
|
||||
hasSingleRange="true"
|
||||
required="true"
|
||||
@@ -2546,8 +2567,7 @@
|
||||
<div class="o-section o-data-series">
|
||||
<div class="o-section-title">Data Series</div>
|
||||
<SelectionInput
|
||||
ranges="dataSeriesRanges"
|
||||
isInvalid="isDatasetInvalid"
|
||||
ranges="() => this.getDataSeriesRanges()"
|
||||
required="true"
|
||||
onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
|
||||
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
|
||||
@@ -2556,7 +2576,7 @@
|
||||
<div class="o-section o-data-labels">
|
||||
<div class="o-section-title">Categories / Labels</div>
|
||||
<SelectionInput
|
||||
ranges="[props.definition.labelRange || '']"
|
||||
ranges="() => [this.getLabelRange()]"
|
||||
isInvalid="isLabelInvalid"
|
||||
hasSingleRange="true"
|
||||
onSelectionChanged="(ranges) => this.onLabelRangeChanged(ranges)"
|
||||
@@ -2653,8 +2673,7 @@
|
||||
<div class="o-section o-data-series">
|
||||
<div class="o-section-title">Data Series</div>
|
||||
<SelectionInput
|
||||
ranges="dataSeriesRanges"
|
||||
isInvalid="isDatasetInvalid"
|
||||
ranges="() => this.getDataSeriesRanges()"
|
||||
required="true"
|
||||
onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
|
||||
onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
|
||||
@@ -2663,7 +2682,7 @@
|
||||
<div class="o-section o-data-labels">
|
||||
<div class="o-section-title">Categories / Labels</div>
|
||||
<SelectionInput
|
||||
ranges="[props.definition.labelRange || '']"
|
||||
ranges="() => [this.getLabelRange()]"
|
||||
isInvalid="isLabelInvalid"
|
||||
hasSingleRange="true"
|
||||
onSelectionChanged="(ranges) => this.onLabelRangeChanged(ranges)"
|
||||
@@ -2824,7 +2843,7 @@
|
||||
<div class="o-section o-data-series">
|
||||
<div class="o-section-title">Key value</div>
|
||||
<SelectionInput
|
||||
ranges="[props.definition.keyValue || '']"
|
||||
ranges="() => [this.getKeyValueRange()]"
|
||||
isInvalid="isKeyValueInvalid"
|
||||
hasSingleRange="true"
|
||||
required="true"
|
||||
@@ -2836,7 +2855,7 @@
|
||||
<div class="o-section-title">Baseline configuration</div>
|
||||
<div class="o-section-subtitle">Baseline value</div>
|
||||
<SelectionInput
|
||||
ranges="[props.definition.baseline || '']"
|
||||
ranges="() => [this.getBaselineRange()]"
|
||||
isInvalid="isBaselineInvalid"
|
||||
hasSingleRange="true"
|
||||
onSelectionChanged="(ranges) => this.onBaselineRangeChanged(ranges)"
|
||||
@@ -3123,7 +3142,7 @@
|
||||
<div class="o-section-title">Apply to range</div>
|
||||
<div class="o-selection-cf">
|
||||
<SelectionInput
|
||||
ranges="state.currentCF.ranges"
|
||||
ranges="() => state.currentCF.ranges"
|
||||
class="'o-range'"
|
||||
isInvalid="isRangeValid"
|
||||
onSelectionChanged="(ranges) => this.onRangesChanged(ranges)"
|
||||
@@ -3843,7 +3862,7 @@
|
||||
</t>
|
||||
</odoo>
|
||||
<!--
|
||||
__info__.version = '16.3.0-alpha.8';
|
||||
__info__.date = '2023-05-12T11:53:11.552Z';
|
||||
__info__.hash = 'afee7d5';
|
||||
__info__.version = '16.4.0-alpha.2';
|
||||
__info__.date = '2023-05-26T13:42:01.130Z';
|
||||
__info__.hash = '82328ad';
|
||||
-->
|
||||
|
||||
@@ -8,7 +8,13 @@ import PivotUIPlugin from "./plugins/pivot_ui_plugin";
|
||||
|
||||
import { SEE_RECORDS_PIVOT, SEE_RECORDS_PIVOT_VISIBLE } from "./pivot_actions";
|
||||
|
||||
const { coreTypes, invalidateEvaluationCommands } = spreadsheet;
|
||||
const {
|
||||
coreTypes,
|
||||
invalidateEvaluationCommands,
|
||||
invalidateCFEvaluationCommands,
|
||||
invalidateDependenciesCommands,
|
||||
} = spreadsheet;
|
||||
|
||||
const { cellMenuRegistry } = spreadsheet.registries;
|
||||
|
||||
const { inverseCommandRegistry } = spreadsheet.registries;
|
||||
@@ -27,6 +33,14 @@ invalidateEvaluationCommands.add("UPDATE_ODOO_PIVOT_DOMAIN");
|
||||
invalidateEvaluationCommands.add("REMOVE_PIVOT");
|
||||
invalidateEvaluationCommands.add("INSERT_PIVOT");
|
||||
|
||||
invalidateDependenciesCommands.add("UPDATE_ODOO_PIVOT_DOMAIN");
|
||||
invalidateDependenciesCommands.add("REMOVE_PIVOT");
|
||||
invalidateDependenciesCommands.add("INSERT_PIVOT");
|
||||
|
||||
invalidateCFEvaluationCommands.add("UPDATE_ODOO_PIVOT_DOMAIN");
|
||||
invalidateCFEvaluationCommands.add("REMOVE_PIVOT");
|
||||
invalidateCFEvaluationCommands.add("INSERT_PIVOT");
|
||||
|
||||
cellMenuRegistry.add("pivot_see_records", {
|
||||
name: _lt("See records"),
|
||||
sequence: 175,
|
||||
|
||||
@@ -995,17 +995,6 @@ QUnit.module("spreadsheet > Global filters model", {}, () => {
|
||||
"don't load data if a filter is added but the data is not needed",
|
||||
async function (assert) {
|
||||
const spreadsheetData = {
|
||||
sheets: [
|
||||
{
|
||||
id: "sheet1",
|
||||
},
|
||||
{
|
||||
id: "sheet2",
|
||||
cells: {
|
||||
A1: { content: `=ODOO.PIVOT("1", "probability")` },
|
||||
},
|
||||
},
|
||||
],
|
||||
pivots: {
|
||||
1: {
|
||||
id: 1,
|
||||
@@ -1041,7 +1030,7 @@ QUnit.module("spreadsheet > Global filters model", {}, () => {
|
||||
},
|
||||
});
|
||||
assert.verifySteps([]);
|
||||
model.dispatch("ACTIVATE_SHEET", { sheetIdFrom: "sheet1", sheetIdTo: "sheet2" });
|
||||
setCellContent(model, "A1", `=ODOO.PIVOT("1", "probability")`);
|
||||
assert.equal(getCellValue(model, "A1"), "Loading...");
|
||||
await nextTick();
|
||||
assert.equal(getCellValue(model, "A1"), "");
|
||||
@@ -1053,17 +1042,6 @@ QUnit.module("spreadsheet > Global filters model", {}, () => {
|
||||
"don't load data if a filter is activated but the data is not needed",
|
||||
async function (assert) {
|
||||
const spreadsheetData = {
|
||||
sheets: [
|
||||
{
|
||||
id: "sheet1",
|
||||
},
|
||||
{
|
||||
id: "sheet2",
|
||||
cells: {
|
||||
A1: { content: `=ODOO.PIVOT("1", "probability")` },
|
||||
},
|
||||
},
|
||||
],
|
||||
pivots: {
|
||||
1: {
|
||||
id: 1,
|
||||
@@ -1101,7 +1079,7 @@ QUnit.module("spreadsheet > Global filters model", {}, () => {
|
||||
});
|
||||
|
||||
assert.verifySteps([]);
|
||||
model.dispatch("ACTIVATE_SHEET", { sheetIdFrom: "sheet1", sheetIdTo: "sheet2" });
|
||||
setCellContent(model, "A1", `=ODOO.PIVOT("1", "probability")`);
|
||||
assert.equal(getCellValue(model, "A1"), "Loading...");
|
||||
await nextTick();
|
||||
assert.equal(getCellValue(model, "A1"), "");
|
||||
|
||||
@@ -247,17 +247,6 @@ QUnit.module("spreadsheet > list plugin", {}, () => {
|
||||
|
||||
QUnit.test("don't fetch list data if no formula use it", async function (assert) {
|
||||
const spreadsheetData = {
|
||||
sheets: [
|
||||
{
|
||||
id: "sheet1",
|
||||
},
|
||||
{
|
||||
id: "sheet2",
|
||||
cells: {
|
||||
A1: { content: `=ODOO.LIST("1", "1", "foo")` },
|
||||
},
|
||||
},
|
||||
],
|
||||
lists: {
|
||||
1: {
|
||||
id: 1,
|
||||
@@ -279,7 +268,7 @@ QUnit.module("spreadsheet > list plugin", {}, () => {
|
||||
},
|
||||
});
|
||||
assert.verifySteps([]);
|
||||
model.dispatch("ACTIVATE_SHEET", { sheetIdFrom: "sheet1", sheetIdTo: "sheet2" });
|
||||
setCellContent(model, "A1", `=ODOO.LIST("1", "1", "foo")`);
|
||||
/*
|
||||
* Ask a first time the value => It will trigger a loading of the data source.
|
||||
*/
|
||||
@@ -566,10 +555,10 @@ QUnit.module("spreadsheet > list plugin", {}, () => {
|
||||
const model = await createModelWithDataSource({ spreadsheetData });
|
||||
const ds = model.getters.getListDataSource("1");
|
||||
assert.strictEqual(ds.maxPosition, 1);
|
||||
assert.strictEqual(ds.maxPositionFetched, 0);
|
||||
setCellContent(model, "A1", `=ODOO.LIST("1", "42", "foo", 2)`);
|
||||
assert.strictEqual(ds.maxPositionFetched, 1);
|
||||
setCellContent(model, "A1", `=ODOO.LIST("1", "42", "foo")`);
|
||||
assert.strictEqual(ds.maxPosition, 42);
|
||||
assert.strictEqual(ds.maxPositionFetched, 0);
|
||||
assert.strictEqual(ds.maxPositionFetched, 1);
|
||||
await waitForDataSourcesLoaded(model);
|
||||
assert.strictEqual(ds.maxPosition, 42);
|
||||
assert.strictEqual(ds.maxPositionFetched, 42);
|
||||
|
||||
@@ -351,17 +351,6 @@ QUnit.module("spreadsheet > pivot plugin", {}, () => {
|
||||
|
||||
QUnit.test("don't fetch pivot data if no formula use it", async function (assert) {
|
||||
const spreadsheetData = {
|
||||
sheets: [
|
||||
{
|
||||
id: "sheet1",
|
||||
},
|
||||
{
|
||||
id: "sheet2",
|
||||
cells: {
|
||||
A1: { content: `=ODOO.PIVOT("1", "probability")` },
|
||||
},
|
||||
},
|
||||
],
|
||||
pivots: {
|
||||
1: {
|
||||
id: 1,
|
||||
@@ -383,7 +372,7 @@ QUnit.module("spreadsheet > pivot plugin", {}, () => {
|
||||
},
|
||||
});
|
||||
assert.verifySteps([]);
|
||||
model.dispatch("ACTIVATE_SHEET", { sheetIdFrom: "sheet1", sheetIdTo: "sheet2" });
|
||||
setCellContent(model, "A1", `=ODOO.PIVOT("1", "probability")`);
|
||||
assert.equal(getCellValue(model, "A1"), "Loading...");
|
||||
await nextTick();
|
||||
assert.verifySteps([
|
||||
|
||||
Reference in New Issue
Block a user