mirror of
https://github.com/bringout/oca-ocb-accounting.git
synced 2026-04-24 15:22:00 +02:00
19.0 vanilla
This commit is contained in:
parent
ba20ce7443
commit
768b70e05e
2357 changed files with 1057103 additions and 712486 deletions
|
|
@ -0,0 +1,16 @@
|
|||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
import { StockValuationReportController } from "@stock_account/stock_valuation/controller";
|
||||
|
||||
patch(StockValuationReportController.prototype, {
|
||||
async loadReportData() {
|
||||
const data = await super.loadReportData();
|
||||
if (this.data.cost_of_production) {
|
||||
// Prepare the "Cost of Production" lines.
|
||||
for (const line of this.data.cost_of_production.lines) {
|
||||
line.account = this.data.accounts_by_id[line.account_id];
|
||||
}
|
||||
}
|
||||
return data;
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import { _t } from "@web/core/l10n/translation";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
import { StockValuationReport } from "@stock_account/stock_valuation/stock_valuation_report";
|
||||
|
||||
|
||||
patch(StockValuationReport.prototype, {
|
||||
openCostOfProduction() {
|
||||
return this.openStockMoveView(_t("Cost of Production"), "production");
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates>
|
||||
<t t-inherit="stock_account.StockValuationReport" t-inherit-mode="extension">
|
||||
<xpath expr="//t[@t-call='stock_account.StockValuationReport.InventoryLoss']" position="after">
|
||||
<t t-if="data.cost_of_production" t-call="mrp_account.StockValuationReport.CostOfProduction"/>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t t-name="mrp_account.StockValuationReport.CostOfProduction">
|
||||
<StockValuationReportLine
|
||||
label.translate="Cost of Production"
|
||||
level="0"
|
||||
displayDebitCredit="true"
|
||||
onClickMethod.bind="openCostOfProduction"
|
||||
sublines="data.cost_of_production.lines"
|
||||
value="data.cost_of_production.value"/>
|
||||
<t t-call="stock_account.StockValuationReport.EmptyLine"/>
|
||||
</t>
|
||||
</templates>
|
||||
Loading…
Add table
Add a link
Reference in a new issue