Skip to content

Commit 53f94da

Browse files
rrahiranhe-odoolaa-odooLucasLefevredhrp-odoo
committed
[FIX] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits: odoo/o-spreadsheet@5c7bf6edd [REL] 16.0.57 Task: 0 odoo/o-spreadsheet@45b761b90 [FIX] Package: update owl to 2.5.1 Task: 0 odoo/o-spreadsheet@9037b622f [FIX] xlsx: ignore charts without data set Task: 4460515 odoo/o-spreadsheet@1f808875d [FIX] borders: fix border on column/row deletion Task: 4089281 closes odoo#193544 Signed-off-by: Vincent Schippefilt (vsc) <[email protected]> Co-authored-by: Anthony Hendrickx (anhe) <[email protected]> Co-authored-by: Alexis Lacroix (laa) <[email protected]> Co-authored-by: Lucas Lefèvre (lul) <[email protected]> Co-authored-by: Dhrutik Patel (dhrp) <[email protected]> Co-authored-by: Adrien Minne (adrm) <[email protected]> Co-authored-by: Mehdi Rachico (mera) <[email protected]> Co-authored-by: Florian Damhaut (flda) <[email protected]> Co-authored-by: Rémi Rahir (rar) <[email protected]> Co-authored-by: Pierre Rousseau (pro) <[email protected]> Co-authored-by: Vincent Schippefilt (vsc) <[email protected]>
1 parent 7ad850e commit 53f94da

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.js

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25036,6 +25036,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
2503625036
}
2503725037
function convertChartData(chartData) {
2503825038
var _a;
25039+
if (chartData.dataSets.length === 0) {
25040+
return undefined;
25041+
}
2503925042
const labelRange = (_a = chartData.dataSets[0].label) === null || _a === void 0 ? void 0 : _a.replace(/\$/g, "");
2504025043
let dataSets = chartData.dataSets.map((data) => data.range.replace(/\$/g, ""));
2504125044
// For doughnut charts, in chartJS first dataset = outer dataset, in excel first dataset = inner dataset
@@ -27507,10 +27510,34 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
2750727510
const elements = [...cmd.elements].sort((a, b) => b - a);
2750827511
for (const group of groupConsecutive(elements)) {
2750927512
if (cmd.dimension === "COL") {
27510-
this.shiftBordersHorizontally(cmd.sheetId, group[group.length - 1] + 1, -group.length);
27513+
if (group[0] >= this.getters.getNumberCols(cmd.sheetId)) {
27514+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
27515+
this.history.update("borders", cmd.sheetId, group[0] + 1, row, "vertical", undefined);
27516+
}
27517+
}
27518+
if (group[group.length - 1] === 0) {
27519+
for (let row = 0; row < this.getters.getNumberRows(cmd.sheetId); row++) {
27520+
this.history.update("borders", cmd.sheetId, 0, row, "vertical", undefined);
27521+
}
27522+
}
27523+
const zone = this.getters.getColsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
27524+
this.clearInsideBorders(cmd.sheetId, [zone]);
27525+
this.shiftBordersHorizontally(cmd.sheetId, group[0] + 1, -group.length);
2751127526
}
2751227527
else {
27513-
this.shiftBordersVertically(cmd.sheetId, group[group.length - 1] + 1, -group.length);
27528+
if (group[0] >= this.getters.getNumberRows(cmd.sheetId)) {
27529+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
27530+
this.history.update("borders", cmd.sheetId, col, group[0] + 1, "horizontal", undefined);
27531+
}
27532+
}
27533+
if (group[group.length - 1] === 0) {
27534+
for (let col = 0; col < this.getters.getNumberCols(cmd.sheetId); col++) {
27535+
this.history.update("borders", cmd.sheetId, col, 0, "horizontal", undefined);
27536+
}
27537+
}
27538+
const zone = this.getters.getRowsZone(cmd.sheetId, group[group.length - 1] + 1, group[0]);
27539+
this.clearInsideBorders(cmd.sheetId, [zone]);
27540+
this.shiftBordersVertically(cmd.sheetId, group[0] + 1, -group.length);
2751427541
}
2751527542
}
2751627543
break;
@@ -27805,6 +27832,18 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
2780527832
}
2780627833
}
2780727834
}
27835+
/**
27836+
* Remove the borders inside of a zone
27837+
*/
27838+
clearInsideBorders(sheetId, zones) {
27839+
for (let zone of zones) {
27840+
for (let row = zone.top; row <= zone.bottom; row++) {
27841+
for (let col = zone.left; col <= zone.right; col++) {
27842+
this.history.update("borders", sheetId, col, row, undefined);
27843+
}
27844+
}
27845+
}
27846+
}
2780827847
/**
2780927848
* Add a border to the existing one to a cell
2781027849
*/
@@ -43483,9 +43522,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
4348343522
Object.defineProperty(exports, '__esModule', { value: true });
4348443523

4348543524

43486-
__info__.version = '16.0.56';
43487-
__info__.date = '2024-12-19T07:51:49.368Z';
43488-
__info__.hash = '9d0e335';
43525+
__info__.version = '16.0.57';
43526+
__info__.date = '2025-01-14T11:48:39.776Z';
43527+
__info__.hash = '5c7bf6e';
4348943528

4349043529

4349143530
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);

addons/spreadsheet/static/src/o_spreadsheet/o_spreadsheet.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,7 +3242,7 @@ https://fontawesome.com/license -->
32423242
</t>
32433243
</odoo>
32443244
<!--
3245-
__info__.version = '16.0.56';
3246-
__info__.date = '2024-12-19T07:51:51.874Z';
3247-
__info__.hash = '9d0e335';
3245+
__info__.version = '16.0.57';
3246+
__info__.date = '2025-01-14T11:48:42.642Z';
3247+
__info__.hash = '5c7bf6e';
32483248
-->

0 commit comments

Comments
 (0)