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

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

 	<many-to-one name="prodProcess" ref="com.axelor.apps.production.db.ProdProcess" title="Production process"/>
  	<many-to-one required="true" name="workCenter" ref="com.axelor.apps.production.db.WorkCenter" title="Work center"/>
    <string name="name" title="Label"/>
    <integer name="priority" title="Priority"/>
    <string name="description" title="Description" large="true"/>
    <decimal name="minCapacityPerCycle" title="Min. capacity / cycle"/>
    <decimal name="maxCapacityPerCycle" title="Max. capacity / cycle"/>
    <long name="durationPerCycle" title="Duration / cycle (hh:mm:ss)"/>
    <boolean name="outsourcing" title="Outsourcing"/>
    <boolean name="optional" title="Optional"/>
    <many-to-one name="stockLocation" ref="com.axelor.apps.stock.db.StockLocation" title="Stock location"/>

    <one-to-many name="toConsumeProdProductList" ref="com.axelor.apps.production.db.ProdProduct" mappedBy="toConsumeProdProcessLine" title="Products to consume"/>
    <one-to-many name="objectDescriptionList" ref="com.axelor.apps.production.db.ObjectDescription" mappedBy="prodProcessLine" title="Descriptions"/>
    
    <track>
    	<field name="prodProcess"/>
    	<field name="workCenter"/>
    	<field name="name"/>
    	<field name="priority"/>
    	<field name="description"/>
    	<field name="minCapacityPerCycle"/>
    	<field name="maxCapacityPerCycle"/>
    	<field name="durationPerCycle"/>
    	<field name="outsourcing"/>
    	<field name="optional"/>
    	<field name="stockLocation"/>
    </track>
  </entity>
</domain-models>
