Skip to content

Commit 6302a1b

Browse files
committed
[FIX] pre-commit
1 parent 4caaafc commit 6302a1b

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/** @odoo-module **/
22

3-
import { DynamicList } from "@web/model/relational_model/dynamic_list";
4-
import { patch } from "@web/core/utils/patch";
5-
import { _t } from "@web/core/l10n/translation";
3+
import {DynamicList} from "@web/model/relational_model/dynamic_list";
4+
import {patch} from "@web/core/utils/patch";
5+
import {_t} from "@web/core/l10n/translation";
66

77
/**
88
* Patch for Odoo 17 bug: swapped parameters in archive notification message.
9-
*
9+
*
1010
* Bug location: addons/web/static/src/model/relational_model/dynamic_list.js
1111
* GitHub: https://github.com/odoo/odoo/blob/17.0/addons/web/static/src/model/relational_model/dynamic_list.js
12-
*
12+
*
1313
* Original bug shows: "Of the 20,000 records selected, only the first 50,000 have been archived"
1414
* Fixed to show: "Of the 50,000 records selected, only the first 20,000 have been archived"
1515
*/
@@ -19,8 +19,8 @@ patch(DynamicList.prototype, {
1919
const method = state ? "action_archive" : "action_unarchive";
2020
const context = this.context;
2121
const resIds = await this.getResIds(isSelected);
22-
const action = await this.model.orm.call(this.resModel, method, [resIds], { context });
23-
22+
const action = await this.model.orm.call(this.resModel, method, [resIds], {context});
23+
2424
// FIXED: Swapped parameters from (resIds.length, this.count) to (this.count, resIds.length)
2525
if (
2626
this.isDomainSelected &&
@@ -29,12 +29,12 @@ patch(DynamicList.prototype, {
2929
) {
3030
const msg = _t(
3131
"Of the %s records selected, only the first %s have been archived/unarchived.",
32-
this.count, // FIXED: Total records selected (larger number)
33-
resIds.length // FIXED: Actually processed (smaller number, limited)
32+
this.count, // FIXED: Total records selected (larger number)
33+
resIds.length // FIXED: Actually processed (smaller number, limited)
3434
);
35-
this.model.notification.add(msg, { title: _t("Warning") });
35+
this.model.notification.add(msg, {title: _t("Warning")});
3636
}
37-
37+
3838
const reload = () => this.model.load();
3939
if (action && Object.keys(action).length) {
4040
this.model.action.doAction(action, {
@@ -43,6 +43,5 @@ patch(DynamicList.prototype, {
4343
} else {
4444
return reload();
4545
}
46-
}
46+
},
4747
});
48-

0 commit comments

Comments
 (0)