<?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="control-point-grid" title="Control points" model="com.axelor.apps.quality.db.ControlPoint" onNew="action-control-point-attrs-hide-quality-control" edit-icon="true">
		<field name="name" width="700"/>
		<field name="controlPointType" width="150"/>
		<field name="statusSelect" width="130"/>
	</grid>
	
	<form name="control-point-form" title="Control points" model="com.axelor.apps.quality.db.ControlPoint" onNew="action-quality-control-point-record-default">
		<panel name="mainPanel">
			<field name="statusSelect" widget="NavSelect" showTitle="false" readonly="true" colSpan="12"/>
			<field name="name"/>
			<field name="controlPointType"/>
			<field name="qualityControl" readonly="true" hideIf="$popup() || qualityControl == null"/>
		</panel>
		<panel name="measuringPointPanel">
			<panel-related name="measuringPointListPanel" field="measuringPointList" colSpan="12" grid-view="quality-measuring-point-grid" form-view="quality-measuring-point-form"/>
		</panel>
		<panel name="notesPanel" title="Control comment">
			<field name="notes" colSpan="12" height="6" widget="html" showTitle="false"/>
		</panel>
		<panel name="actionsPanel" sidebar="true" showIf="statusSelect == 1">
			<button name="closeBtn" title="Close" onClick="save,action-quality-control-point-record-status-close,save"/>
		</panel>
		<panel-mail name="mailPanel">
		  <mail-messages />
	  	</panel-mail>	  
	</form>

	<action-record name="action-quality-control-point-record-default" model="com.axelor.apps.quality.db.ControlPoint">
		<field name="statusSelect" expr="eval: 1"/>
	</action-record>

	<action-record name="action-quality-control-point-record-status-close" model="com.axelor.apps.quality.db.ControlPoint">
		<field name="statusSelect" expr="eval: 2"/>
	</action-record>
	
</object-views>
