Skip to content

Commit

Permalink
[FIX] base_export_manager: ListController corrected file
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-tecnativa committed Aug 4, 2023
1 parent 8a54b47 commit 9d46ab7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion base_export_manager/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"license": "AGPL-3",
"assets": {
"web.assets_backend": [
"base_export_manager/static/src/views/list/list_controller.js",
"base_export_manager/static/src/views/list/list_controller.esm.js",
"base_export_manager/static/src/xml/base.xml",
],
},
Expand Down
2 changes: 1 addition & 1 deletion base_export_manager/models/ir_exports_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _inverse_name(self):
one.field_n(num, True)
] = one._get_field_id(model, field_name)
if any(parts):
# invalidate_cache -> in order to get actual value of field 'label'
# invalidate_recordset -> in order to get actual value of field 'label'
# in function '_check_name'
one.invalidate_recordset(["label"])
one._check_name()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/** @odoo-module **/

import {ListController} from "@web/views/list/list_controller";
import {onWillRender} from "@odoo/owl";
const {onWillRender} = owl;
import {patch} from "@web/core/utils/patch";
import {session} from "@web/session";

patch(ListController.prototype, "base_export_manager", {
setup(){
setup() {
this._super(...arguments);
onWillRender(async () => {
if (this.isExportEnable){
if (this.isExportEnable) {
const is_export_enabled =
session.export_models.indexOf(this.model.root.resModel) !== -1;
if (!session.is_system && !is_export_enabled) {
this.isExportEnable = false;
}
}
});
}
},
});

0 comments on commit 9d46ab7

Please sign in to comment.