<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
 	
    <form name="incl-sales-order-dashelt-form" title="Partner" model="com.axelor.apps.base.db.Partner" >
    	<panel-dashlet name="customerSalesLastYearvsYtdByFamilyPanel" colSpan="12" action="dashlet.customer.sales.lastYear.vs.ytd.by.family" height="350" title="Sales" showIf="id != null" />
	</form>
	
     <form name="incl-sales-partner-form" title="Partner" model="com.axelor.apps.base.db.Partner" >
	   <panel-dashlet name="partnerSOPanel" colSpan="12" action="action-partner-view-sales-orders" title="Sales orders" showIf="id != null &amp;&amp; (isCustomer || isProspect)"/>
	</form>
	
	<form name="incl-sales-contact-form" title="Contact" model="com.axelor.apps.base.db.Partner" >
	   <panel-dashlet name="contactSOPanel" colSpan="12" action="action-contact-view-sales-orders" title="Sales orders" showIf="id != null"/>
	</form>

    <form name="incl-purchases-partner-form" title="Partner" model="com.axelor.apps.base.db.Partner" >
       <panel-dashlet name="partnerPOPasnel" colSpan="12" action="action-partner-view-purchases-orders" title="Purchase orders" showIf="id != null &amp;&amp; (isSupplier || isCarrier)"/>
    </form>
    
	
     <action-view name="action-partner-view-sales-orders" title="Sales orders" model="com.axelor.apps.sale.db.SaleOrder">
		<view type="grid" name="sale-order-partner-grid"/>
		<view type="form" name="sale-order-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id)</domain>
		<context name="id" expr="eval: id"/>
	</action-view>
	
	<action-view name="action-contact-view-sales-orders" title="Sales orders" model="com.axelor.apps.sale.db.SaleOrder">
		<view type="grid" name="sale-order-partner-grid"/>
		<view type="form" name="sale-order-form"/>
		<domain>(self.contactPartner.id = :id)</domain>
		<context name="id" expr="eval: id"/>
	</action-view>

     <action-view name="action-partner-view-purchases-orders" title="Purchases orders" model="com.axelor.apps.purchase.db.PurchaseOrder">
        <view type="grid" name="purchase-order-grid"/>
        <view type="form" name="purchase-order-form"/>
        <domain>(self.supplierPartner.id = :id)</domain>
    </action-view>
</object-views>