<?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="quality-measuring-point-grid" title="Measuring points" model="com.axelor.apps.quality.db.QualityMeasuringPoint" edit-icon="true">
		<field name="name"/>
		<field name="measuringNote" widget="ImageSelect" x-labels="false"/>
		<field name="observations"/>
	</grid>

	<grid name="quality-measuring-point-model-grid" title="Measuring points" model="com.axelor.apps.quality.db.QualityMeasuringPoint" edit-icon="true">
		<field name="name"/>
		<field name="measuringTypeSelect"/>
		<field name="coefficient"/>
	</grid>

	<form name="quality-measuring-point-form" title="Measuring points" model="com.axelor.apps.quality.db.QualityMeasuringPoint">
		<panel name="mainPanel">
			<field name="name"/>
			<field name="measuringTypeSelect"/>
			<field name="measuringNote" widget="ImageSelect" x-labels="false" hidden="true" showIf="measuringTypeSelect == 1"/>
			<field name="coefficient"/>
			<field name="compliant" colSpan="3" widget="boolean-switch" hidden="true" showIf="measuringTypeSelect == 2" onChange="action-measuring-point-attrs-on-compliant-change"/>
			<field name="picturesList" colSpan="12">
				<editor onNew="action-quality-picture-record-on-new">
					<panel name="mainPanel">
						<panel name="imagePanel" colSpan="6">
							<field name="metaFile" widget="Image" colSpan="12" showTitle="false"/>
						</panel>
						<panel name="detailsPanel" colSpan="6">
							<field name="name" colSpan="12"/>
							<field name="createDate" colSpan="6"/>
						</panel>
					</panel>
				</editor>
			</field>
			<field name="observations" colSpan="12" widget="html"/>
		</panel>
	</form>

	<form name="quality-measuring-point-model-form" title="Measuring points" model="com.axelor.apps.quality.db.QualityMeasuringPoint">
		<panel name="mainPanel">
			<field name="name"/>
			<field name="measuringTypeSelect"/>
			<field name="coefficient"/>
		</panel>
	</form>

	<action-attrs name="action-measuring-point-attrs-on-compliant-change">
		<attribute name="value" for="measuringNote" expr="eval: (compliant) ? 5 : 0"/>
	</action-attrs>

</object-views>
