The point of the MO Overview is to be a single place where you can quickly get all info for a single Manufacturing Order. Since we have all data the cost_analysis is already fetching, we add those data in the report when the production is done. Also use the Stock Valuation Layers when available for component costs to better reflect the real cost of production. Task-3251506 Part-of: odoo/odoo#114536
16 lines
822 B
Python
16 lines
822 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
from . import models
|
|
from . import report
|
|
|
|
|
|
def _configure_journals(env):
|
|
# if we already have a coa installed, create journal and set property field
|
|
for company in env['res.company'].search([('chart_template', '!=', False)]):
|
|
ChartTemplate = env['account.chart.template'].with_company(company)
|
|
template_code = company.chart_template
|
|
template_data = ChartTemplate._get_chart_template_data(template_code)['template_data']
|
|
if 'property_stock_account_production_cost_id' in template_data:
|
|
data = {'property_stock_account_production_cost_id': template_data['property_stock_account_production_cost_id']}
|
|
ChartTemplate._post_load_data(template_code, company, data)
|