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

  <entity name="InventoryLine" lang="java">
  
  	<many-to-one name="inventory" ref="com.axelor.apps.stock.db.Inventory" title="Inventory"/>
	<many-to-one name="product" ref="com.axelor.apps.base.db.Product" title="Product" required="false"/>    
  <string name="productName" title="Product name" />
	<decimal name="currentQty" title="Current Qty"/>
	<decimal name="realQty" title="Real Qty" nullable="true"/>
	<many-to-one name="unit" title="Unit" ref="com.axelor.apps.base.db.Unit"/>
	<string name="description" title="Description" large="true" multiline="true"/>
	<string name="observation" title="Observation" large="true" multiline="true"/>
	<string name="ticketId" title="Ticket id" large="true" multiline="true"/>
    <string name="rack" title="Rack"/>
	<many-to-one name="trackingNumber" ref="com.axelor.apps.stock.db.TrackingNumber" title="TrackingNumber"/>
    <decimal name="gap" title="Gap" readonly="true"/>
    <decimal name="gapValue" title="Gap value" readonly="true"/>

 <integer name="countingTypeSelect" title="Counting type" required="false" selection="inventory.line.count.type.select"/>
  <many-to-one name="stockLocation" ref="com.axelor.apps.stock.db.StockLocation" title="Stock location" required="true"/>


  <decimal name="firstCounting" title="First counting" nullable="true"/>
  <decimal name="secondCounting" title="Second counting" nullable="true"/>
  <decimal name="thirdCounting" title="third counting" nullable="true"/>
  <decimal name="forthCounting" title="forth counting" nullable="true"/>
  <decimal name="controlCounting" title="Control counting" nullable="true"/>
  <decimal name="fifthCounting" title="Fifth counting" nullable="true"/>
  <decimal name="sixthCounting" title="Sixth counting" nullable="true"/>
  
  <many-to-one name="firstCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="First counting by"/>
  <many-to-one name="secondCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="Second counting by"/>
  <many-to-one name="thirdCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="Third counting by"/>
  <many-to-one name="forthCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="Forth counting by"/>
  <many-to-one name="controlCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="Control counting by"/>
  <many-to-one name="fifthCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="Fifth counting by"/>
  <many-to-one name="sixthCountingByUser" ref="com.axelor.auth.db.User" readonly="true" title="Sixth counting by"/>


  <datetime name="firstCountingDate" readonly="true" title="First counting date"/>
  <datetime name="secondCountingDate" readonly="true" title="Second counting date"/>
  <datetime name="thirdCountingDate" readonly="true" title="Third counting date"/>
  <datetime name="forthCountingDate" readonly="true" title="Forth counting date"/>
  <datetime name="controlCountingDate" readonly="true" title="Control counting date"/>
  <datetime name="fifthCountingDate" readonly="true" title="Fifth counting date"/>
  <datetime name="sixthCountingDate" readonly="true" title="Sixth counting date"/>

  <string name="productHolder" title="Product Holder" />
  <boolean name="justifiedGap" title="Justified gap"/>
  <boolean name="isVentilated" title="Is ventilated"/>

  <string name="trackingNumberStr" title="Tracking number str"/>
  <string name="internalTrackingNumberStr" title="Internal tracking number str"/>

  <integer name="conformitySelect" title="Conformity" selection="stock.move.line.conformity.select"/>
  <integer name="stateSelect" title="State" selection="inventory.line.state.select"/>


    <track>
			  <field name="firstCounting" />
        <field name="secondCounting" />
        <field name="thirdCounting" />
        <field name="forthCounting" />
        <field name="controlCounting" />
        <field name="fifthCounting" />
        <field name="sixthCounting" />
		</track>

  </entity>
</domain-models>
