<?xml version="1.0"?>
<terp>
	<data>
		<report
			id="report_mrp_workcenter_load"
			string="Workcenter load"
			model="mrp.workcenter"
			name="mmrp.workcenter.load"/>

		<report
			id="report_cost_structure"
			string="Product Cost Structure"
			model="product.product"
			name="mrp.product.cost.report"
			xml="mrp/report/product_explosion.xml"
			xsl="mrp/report/product_explosion.xsl" />

		<!-- Disabled because used_in.xsl doesn't exist
		<report
			string="Used in BOMs"
			model="product.product"
			name="mrp.product.used_in"
			xml="mrp/report/used_in.xml"
			xsl="mrp/report/used_in.xsl"
			auto="False" />
		-->			

		<!-- Bom content disabled because it is semi-functional
		<report 
			id="report_bom_content"
			string="Bom Content" 
			model="mrp.bom"
			name="bom.report"
			xml="mrp/report/bom.xml"
			xsl="mrp/report/bom.xsl" />
		-->			

		<!--
		Resource: ir.report.custom
		-->

		<record id="ir_report_custom_0" model="ir.report.custom">
			<field name="model_id" model="ir.model" search="[('model','=','mrp.bom')]"/>
			<field name="title">List of BoMs</field>
			<field name="name">List of BoMs</field>
		</record>

		<!--
		Resource: ir.report.custom.fields
		-->

		<record id="ir_report_custom_fields_bom1" model="ir.report.custom.fields">
			<field name="sequence">1</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','name'),('model','=','mrp.bom')]"/>
			<field name="operation" eval="None"/>
			<field name="report_id" ref="ir_report_custom_0"/>
			<field name="name">Bom</field>
		</record>
		<record id="ir_report_custom_fields_7" model="ir.report.custom.fields">
			<field name="sequence">2</field>
			<field name="field_child1" model="ir.model.fields" search="[('name','=','name'), ('model','=','mrp.routing')]"/>
			<field name="operation" eval="None"/>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','routing_id'), ('model','=','mrp.bom')]"/>
			<field name="report_id" ref="ir_report_custom_0"/>
			<field name="name">routing </field>
		</record>
		<record id="ir_report_custom_fields_product2" model="ir.report.custom.fields">
			<field name="fc2_op">==</field>
			<field name="fc2_operande" model="ir.model.fields" search="[('name','=','supply_method')]"/>
			<field name="fc2_condition">produce</field>
			<field name="sequence">4</field>
			<field name="operation" eval="None"/>
			<field name="field_child1" model="ir.model.fields" search="[('name','=','product_tmpl_id'),('model','=','product.product')]"/>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','product_id'), ('model','=','mrp.bom')]"/>
			<field name="field_child2" model="ir.model.fields" search="[('name','=','name'),('model','=','product.template')]"/>
			<field name="report_id" ref="ir_report_custom_0"/>
			<field name="name">product</field>
			<field name="groupby">1</field>
		</record>

		<function model="ir.report.custom" name="subscribe" eval="[[ir_report_custom_0]]"/>
		
		<!--
		Resource: ir.report.custom
		-->
		
		<record id="ir_report_custom_1" model="ir.report.custom">
			<field name="model_id" model="ir.model" search="[('model','=','mrp.bom')]"/>
			<field name="title">BOM Tree</field>
			<field name="name">Bom Tree</field>
			<field name="field_parent" model="ir.model.fields" search="[('name','=','bom_lines')]"/>
		</record>
		
		<!--
		Resource: ir.report.custom.fields
		-->
		
		<record id="ir_report_custom_fields_bom2" model="ir.report.custom.fields">
			<field name="sequence">1</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','name'),('model','=','mrp.bom')]"/>
			<field name="operation" eval="None"/>
			<field name="report_id" ref="ir_report_custom_1"/>
			<field name="groupby">1</field>
			<field name="name">Bom</field>
		</record>
		<record id="ir_report_custom_fields_bom3" model="ir.report.custom.fields">
			<field name="sequence">2</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','product_id'),('model','=','mrp.bom')]"/>
			<field name="field_child1" model="ir.model.fields" search="[('name','=','product_tmpl_id'),('model','=','product.product')]"/>
			<field name="field_child2" model="ir.model.fields" search="[('name','=','name'),('model','=','product.template')]"/>
			<field name="operation" eval="None"/>
			<field name="report_id" ref="ir_report_custom_1"/>
			<field name="name">Product Name</field>
		</record>
		<record id="ir_report_custom_fields_bom4" model="ir.report.custom.fields">
			<field name="sequence">3</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','product_qty')]"/>
			<field name="operation" eval="None"/>
			<field name="width" eval="20"/>
			<field name="report_id" ref="ir_report_custom_1"/>
			<field name="name">Quantity</field>
		</record>
		<record id="ir_report_custom_fields_bom5" model="ir.report.custom.fields">
			<field name="sequence">4</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','product_uom'),('model','=','mrp.bom')]"/>
			<field name="field_child1" model="ir.model.fields" search="[('name','=','name'),('model','=','product.uom')]"/>
			<field name="operation" eval="None"/>
			<field name="width" eval="20"/>
			<field name="report_id" ref="ir_report_custom_1"/>
			<field name="name">UoM</field>
		</record>
		<record id="ir_report_custom_fields_bom6" model="ir.report.custom.fields">
			<field name="sequence">5</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','code')]"/>
			<field name="operation" eval="None"/>
			<field name="width" eval="20"/>
			<field name="report_id" ref="ir_report_custom_1"/>
			<field name="name">Code</field>
		</record>

		<function model="ir.report.custom" name="subscribe" eval="[[ir_report_custom_1]]"/>

		# report available from menu
		# menu entries
		<record id="ir_ui_menu1" model="ir.ui.menu">
			<field name="name">List of BoMs</field>
			<field name="parent_id" model="ir.ui.menu" search="[('name','=','Bill of Materials')]"/>
			<field name="icon">STOCK_PRINT</field>
		</record>

		<!--
		Resource: ir.report.custom
		-->
		
		<record id="ir_report_custom_3" model="ir.report.custom">
			<field name="model_id" model="ir.model" search="[('model','=','mrp.bom')]"/>
			<field name="title">List of BoMs</field>
			<field name="name">List of BoMs</field>
			<field name="menu_id" ref="ir_ui_menu1"/>
		</record>

		<!--
		Resource: ir.report.custom.fields
		-->

		<record id="ir_report_custom_fields_bom7" model="ir.report.custom.fields">
			<field name="sequence">1</field>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','name'), ('model','=','mrp.bom')]"/>
			<field name="operation" eval="None"/>
			<field name="report_id" ref="ir_report_custom_3"/>
			<field name="name">Bom</field>
		</record>
		<record id="ir_report_custom_fields_8" model="ir.report.custom.fields">
			<field name="sequence">2</field>
			<field name="field_child1" model="ir.model.fields" search="[('name','=','name'), ('model','=','mrp.routing')]"/>
			<field name="operation" eval="None"/>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','routing_id'), ('model','=','mrp.bom')]"/>
			<field name="report_id" ref="ir_report_custom_3"/>
			<field name="name">routing </field>
		</record>
		<record id="ir_report_custom_fields_product" model="ir.report.custom.fields">
			<field name="sequence">4</field>
			<field name="fc2_op">==</field>
			<field name="fc2_operande" model="ir.model.fields" search="[('name','=','supply_method')]"/>
			<field name="fc2_condition">produce</field>
			<field name="operation" eval="None"/>
			<field name="field_child1" model="ir.model.fields" search="[('name','=','product_tmpl_id'),('model','=','product.product')]"/>
			<field name="field_child0" model="ir.model.fields" search="[('name','=','product_id'), ('model','=','mrp.bom')]"/>
			<field name="field_child2" model="ir.model.fields" search="[('name','=','name'),('model','=','product.template')]"/>
			<field name="report_id" ref="ir_report_custom_3"/>
			<field name="name">product</field>
			<field name="groupby">1</field>
		</record>

		<function model="ir.report.custom" name="subscribe" eval="[[ir_report_custom_3]]"/>
	</data>
</terp>
