Debian Codegraph @

addons/mrp_account/static/src/stock_valuation/controller.js

raw
1 import { patch } from "@web/core/utils/patch";
2
3 import { StockValuationReportController } from "@stock_account/stock_valuation/controller";
4
5 patch(StockValuationReportController.prototype, {
6 async loadReportData() {
7 const data = await super.loadReportData();
8 if (this.data.cost_of_production) {
9 // Prepare the "Cost of Production" lines.
10 for (const line of this.data.cost_of_production.lines) {
11 line.account = this.data.accounts_by_id[line.account_id];
12 }
13 }
14 return data;
15 },
16 });