<?xml version="1.0" encoding="UTF-8"?>
<object-views xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd" xmlns="http://axelor.com/xml/ns/object-views" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  
  <grid name="pack-line-grid" title="Pack lines" model="com.axelor.apps.sale.db.PackLine">
    <field name="product"/>
    <field name="quantity"/>
  </grid>
  
  <form name="pack-line-form" title="Pack line" model="com.axelor.apps.sale.db.PackLine" width="large">
    <panel name="mainPanel" colSpan="12">
      <field name="product" onSelect="action-pack-line-attrs-set-product-domain"/>
      <field name="quantity"/>
    </panel>
  </form>
  
  <action-attrs name="action-pack-line-attrs-set-product-domain">
  	<attribute name="domain" for="product" expr="eval: &quot; self.id != ${_parent?.id} and self.productTypeSelect != 'pack' &quot;"/>
  </action-attrs>
  
</object-views>