<?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="analytic-distribution-template-grid" title="Analytic distribution templates" model="com.axelor.apps.account.db.AnalyticDistributionTemplate">
		<field name="name"/>
		<field name="company" massUpdate="true" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
	</grid>
    
    <form name="analytic-distribution-template-form" title="Analytic distribution template" model="com.axelor.apps.account.db.AnalyticDistributionTemplate"  
    	onSave="action-analytic-dist-template-method-validate-tot-percentage">
        <panel name="mainPanel" >
	        <field name="name"/>
	        <field name="company"/>
        </panel>      
        <panel-related name="analyticDistributionLineListPanel" field="analyticDistributionLineList" grid-view="analytic-distribution-line-grid" form-view="analytic-distribution-line-form" onChange="action-analytic-dist-template-method-validate-tot-percentage"/>
    </form>
    
    <action-method name="action-analytic-dist-template-method-validate-tot-percentage">
    	<call class="com.axelor.apps.account.web.AnalyticDistributionLineController" method="validateLines"/>
    </action-method>
    
</object-views>