/** @odoo-module **/

import { patch } from "@web/core/utils/patch";
import { AccountReportFilters } from "@odex30_account_reports/components/account_report/filters/filters";

patch(AccountReportFilters.prototype, {

    async toggleFullHierarchy() {
        const newValue = !this.controller.options.show_full_hierarchy;
        await this.controller.updateOption('show_full_hierarchy', newValue);
        this.controller.saveSessionOptions(this.controller.options);
        await this.applyFilters('show_full_hierarchy');
    }

});
