<?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="training-grid" title="Trainings" model="com.axelor.apps.talent.db.Training">
		<field name="name" />
		<field name="category" />
		<field name="company" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<field name="duration" />
		<field name="mandatoryTraining" />
	</grid>
	
	<form name="training-form" title="Training" model="com.axelor.apps.talent.db.Training" width="large" 
		onNew="action-training-set-default" readonlyIf="$popup()" >
		<panel name="mainPanel">
			<field name="name" />
			<field name="category" />
			<field name="company" />
			<field name="duration" />
			<field name="mandatoryTraining" colSpan="4" />
			<field name="skillSet" colSpan="8" widget="tag-select" />
			<field name="requiredTrainingSet" colSpan="12" />
			<field name="description" colSpan="12" />
			<field name="program" colSpan="12" widget="html" />
			<field name="objectives" colSpan="12" />
			<button name="registerTrainingBtn" title="Register training" onClick="action-training-register-training" colSpan="4" />
			<field name="rating" widget="progress" readonly="true" colSpan="8" />
		</panel>
	</form>
	
	<action-record name="action-training-set-default" model="com.axelor.apps.talent.db.Training">
		<field name="company" expr="eval:__user__.activeCompany"/>
	</action-record>
	
	<action-view name="action-training-register-training" title="Register training" model="com.axelor.apps.talent.db.TrainingRegister">
		<view type="form" name="training-register-form"/>
		<view type="grid" name="training-register-grid"/>
		<context name="_training" expr="eval:__self__"/>
	</action-view>
	
</object-views>
