<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">

  <module name="crm" package="com.axelor.apps.crm.db"/>

  <entity name="Target" lang="java">
  
    <string name="name" title="Name"/>
    <string name="code" title="Code"/>
    <many-to-one name="user" column="user_id" ref="com.axelor.auth.db.User" title="Assigned to"/>
  	<many-to-one name="team" ref="com.axelor.team.db.Team" title="Team"/>
  	
<!-- Opportunity -->
    <decimal name="opportunityAmountWon" title="Amount won" readonly="true"/>
    <integer name="opportunityCreatedNumber" title="Created Nbr." readonly="true"/>
    <integer name="opportunityCreatedWon" title="Created Won" readonly="true"/>
    <decimal name="opportunityAmountWonTarget" title="Amount Won"/>
    <integer name="opportunityCreatedNumberTarget" title="Created Nbr."/>
    <integer name="opportunityCreatedWonTarget" title="Created Won"/>
    
<!-- Sales order -->
<!-- 	<decimal name="saleOrderAmountWon" title="Amount won"/> -->
<!--     <integer name="saleOrderCreatedNumber" title="Created number"/> -->
<!--     <integer name="saleOrderCreatedWon" title="Created won"/> -->
<!--     <decimal name="saleOrderAmountWonTarget" title="Amount won"/> -->
<!--     <integer name="saleOrderCreatedNumberTarget" title="Created number"/> -->
<!--     <integer name="saleOrderCreatedWonTarget" title="Created won"/> -->

<!-- Call -->
    <integer name="callEmittedNumber" title="Call emitted Nbr." readonly="true"/>
    <integer name="meetingNumber" title="Meeting Nbr." readonly="true"/>
    <integer name="callEmittedNumberTarget" title="Call emitted Nbr."/>
    <integer name="meetingNumberTarget" title="Meeting Nbr."/>
    
    <integer name="periodTypeSelect" title="Period type" selection="crm.target.configuration.period.type.select"/>
    
    <date name="fromDate" title="Date from"/>
    <date name="toDate" title="Date to"/>
    
    
  </entity>
</domain-models>
