<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
    
    <grid name="cost-sheet-grid" title="Cost sheet" model="com.axelor.apps.production.db.CostSheet" orderBy="-createdOn">
        <field name="createdOn"/>
		<field name="createdBy"/>
 		<field name="billOfMaterial" form-view="bill-of-material-form" grid-view="bill-of-material-grid"/>
  		<field name="billOfMaterial.product" form-view="product-form" grid-view="product-grid"/>
  		<field name="billOfMaterial.qty" aggregate="sum"/>
  		<field name="costPrice" readonly="true"/>
  		<field name="calculationTypeSelect"/>
  		<field name="calculationDate"/>
    </grid>
    
    <grid name="cost-sheet-bill-of-material-grid" title="Cost sheet" model="com.axelor.apps.production.db.CostSheet" orderBy="-createdOn">
        <field name="createdOn"/>
		<field name="createdBy"/>
  		<field name="costPrice" readonly="true"/>
  		<field name="calculationTypeSelect"/>
  		<field name="calculationDate"/>
    </grid>
    
	<form name="cost-sheet-form" title="Cost sheet" model="com.axelor.apps.production.db.CostSheet" width="large">
	  <panel name="mainPanel" readonly="true">
	    <field name="createdOn"/>
  		<field name="createdBy"/>
  		<field name="billOfMaterial" form-view="bill-of-material-form" grid-view="bill-of-material-grid"/>
  		<field name="billOfMaterial.product" form-view="product-form" grid-view="product-grid"/>
  		<field name="billOfMaterial.qty"/>
  		<field name="costPrice"/>
  		<field name="calculationTypeSelect"/>
  		<field name="calculationDate"/>
  		<field name="currency" readonly="true" grid-view="currency-grid" form-view="currency-form"/>
  		<panel-dashlet name="costSheetLineTreePanel" action="action-cost-sheet-line-view-tree" colSpan="12" height="600"/>
	  </panel>
	</form>
	
	<form name="cost-sheet-bill-of-material-form" title="Cost sheet" model="com.axelor.apps.production.db.CostSheet" width="large">
	  <panel name="mainPanel">
	    <field name="createdOn" readonly="true"/>
  		<field name="createdBy" readonly="true"/>
 		<field name="costPrice" readonly="true"/>
 		<field name="calculationTypeSelect"/>
 		<field name="calculationDate"/>
 		<field name="manufOrderProducedRatio"/>
 		<field name="currency" readonly="true" grid-view="currency-grid" form-view="currency-form"/>
 		<button name="printTheCostSheetLineDetailBtn" title="Print the cost sheet line detail" onClick="action-cost-sheet-method-print-cost-sheet-line-detail"/>
  		<panel-dashlet name="costSheetLineTreePanel" action="action-cost-sheet-line-view-tree" colSpan="12"  height="600"/>
	  </panel>
	</form>
    
    <action-method name="action-cost-sheet-method-print-cost-sheet-line-detail">
    	<call class="com.axelor.apps.production.web.CostSheetController" method="printCostSheetLineDetail"/>
    </action-method>
</object-views>
