[FIX] mrp: Allow leaving the BOM Overview

Typo made the call to `this.changeFolded` instead of
`this.props.changeFolded`. As it couldn't be found in the unmount, it
raised an error each time the user tried to leave the report.

Steps to reproduce :
Go to MRP -> Products -> Bill of Materials -> Any BoM -> Overview -> Go
anywhere else than the report.

Also got rid of the now useless `this.bus` in the main overview
component.

opw-3061658

closes odoo/odoo#105773

X-original-commit: c22e7a2a245ce98654a4d99a663c555bedfee165
Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
clesgow
2022-11-15 18:25:50 +01:00
parent 6e7f6c7c1e
commit ba450b568f
2 changed files with 1 additions and 2 deletions
@@ -11,7 +11,6 @@ export class BomOverviewComponent extends Component {
setup() {
this.orm = useService("orm");
this.actionService = useService("action");
this.bus = new EventBus();
this.variants = [];
this.warehouses = [];
@@ -25,7 +25,7 @@ export class BomOverviewExtraBlock extends Component {
onWillUnmount(() => {
// Need to notify main component that the block was folded so it doesn't appear on the PDF.
this.changeFolded({ ids: [this.identifier], isFolded: true });
this.props.changeFolded({ ids: [this.identifier], isFolded: true });
});
}