<?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="supplychain" package="com.axelor.apps.supplychain.db"/>

    <entity name="SupplierRating" lang="java">

        <many-to-one name="supplierPartner" ref="com.axelor.apps.base.db.Partner" required="true" title="Supplier"/>
        <one-to-one name="purchaseOrder" ref="com.axelor.apps.purchase.db.PurchaseOrder" required="true" title="Order"/>
        <integer name="paymentDelayRatingSelect" title="Delay payment rating" selection="supplier.rating.icon.select"/>
        <integer name="deliveryTimeRatingSelect" title="Delivery time rating" selection="supplier.rating.icon.select"/>
        <integer name="complianceWithTechnicalSpecificationsRatingSelect" title="Compliance with technical specifications rating" selection="supplier.rating.icon.select"/>
        <integer name="priceRatingSelect" title="Price rating" selection="supplier.rating.icon.select"/>
        <integer name="quantityComplianceRatingSelect" title="Quantity compliance rating" selection="supplier.rating.icon.select"/>
        <integer name="complaintManagementRatingSelect" title="Complaint management rating" selection="supplier.rating.icon.select"/>
        <integer name="priceStabilityRatingSelect" title="Price stability rating" selection="supplier.rating.icon.select"/>
        <string name="description" title="Description" large="true"/>
        <decimal name="overallScore" title="Overall score"/>

        <track>
            <field name="paymentDelayRatingSelect" />
            <field name="deliveryTimeRatingSelect" />
            <field name="complianceWithTechnicalSpecificationsRatingSelect" />
            <field name="priceRatingSelect" />
            <field name="quantityComplianceRatingSelect" />
            <field name="complaintManagementRatingSelect" />
            <field name="priceStabilityRatingSelect" />
            <field name="description" />
            <field name="overallScore" />
        </track>


    </entity>

</domain-models>