[IMP] web: Add hook to provide options to the useModel function on kanban

Task: 3193121
Part-of: odoo/odoo#119185
This commit is contained in:
Laurent Smet
2023-06-23 16:35:01 +02:00
parent e7cbd26b08
commit 592f0df7e2
@@ -25,7 +25,7 @@ export class KanbanController extends Component {
setup() {
this.actionService = useService("action");
const { Model, archInfo } = this.props;
this.model = useModel(Model, this.modelParams);
this.model = useModel(Model, this.modelParams, this.modelOptions);
if (archInfo.progressAttributes) {
const { activeBars } = this.props.state || {};
this.progressBarState = useProgressBar(
@@ -117,6 +117,10 @@ export class KanbanController extends Component {
};
}
get modelOptions(){
return {};
}
get progressBarAggregateFields() {
const res = [];
const { progressAttributes } = this.props.archInfo;