<commit_before><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://apps.axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://apps.axelor.com/xml/ns/object-views http://apps.axelor.com/xml/ns/object-views/object-views_2.0.xsd">
    
    <grid name="partner-grid" title="Partners" model="com.axelor.apps.base.db.Partner" orderBy="name">
	    <toolbar>
	        <button name="printPhoneBook" title="PhoneBook" icon="fa-print" onClick="action-print-phonebook"/>
	        <button name="printCompanyPhoneBook" title="Company phoneBook" icon="fa-print" onClick="action-print-compnay-phonebook"/>
	    </toolbar>
	    <field name="fullName"/>
	    <field name="mainInvoicingAddress"/>
	    <field name="fixedPhone"/>
		<field name="emailAddress.address"/>
	    <field name="partnerCategory"/>
		<button name="logCall" title="Log Call" colSpan="1" icon="fa-phone" help="Log Call" onClick="action-partner-view-create-call"/>
		<button name="scheduleMeeting" title="Schedule Meeting" colSpan="1" help="Schedule Meeting" icon="fa-group" onClick="action-partner-view-create-meeting"/>
		<button name="sendByEmail" title="Send Email" colSpan="1" help="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
	</grid>
    
    <grid name="partner-contact-grid" title="Contacts" model="com.axelor.apps.base.db.Partner">
	    <field name="fullName"/>
	    <field name="fixedPhone"/>
	    <field name="mobilePhone"/>
	    <field name="emailAddress.address"/>
	    <button name="logCall" title="Log Call" colSpan="1" icon="fa-phone" help="Log Call" onClick="action-partner-view-create-call"/>
		<button name="scheduleMeeting" title="Schedule Meeting" colSpan="1" help="Schedule Meeting" icon="fa-group" onClick="action-partner-view-create-meeting"/>
		<button name="sendByEmail" title="Send Email" colSpan="1" help="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
	</grid>
    
     <grid name="partner-grid-group" title="Partner" model="com.axelor.apps.base.db.Partner" groupBy="userInfo">
        <field name="fullName"/>
        <field name="mainInvoicingAddress"/>
        <field name="fixedPhone"/>
		<field name="mobilePhone"/>
        <field name="emailAddress.address"/>
        <field name="userInfo"/>
    </grid>
    
    <form name="partner-form" id="base-partner-form" title="Partner" model="com.axelor.apps.base.db.Partner" cols="6" colWidths="25*" 
    onNew="action-partner-record-partner-type-select,action-partner-record-set-default,action-partner-record-customer-supplier-type" 
    onLoad="action-partner-attrs-change-name" 
    onSave="save,action-set-partner-seq,action-create-accounting-situation">
	    <toolbar>
	        <button name="sendByEmail" title="Send email" icon="fa-envelope" onClick="save,action-send-by-email-with-template" readonlyIf="id == null"/>
	        <button name="showPartnerInfo" title="Print Informations" icon="fa-print" onClick="save,action-partner-method-show-partner-info" readonlyIf="id == null"/>
	        <button name="showClientSituationForm" title="Client Situation" icon="fa-print" onClick="save,action-partner-method-show-client-situation" showIf="isContact == false" readonlyIf="id == null"/>
	    </toolbar>
	    <menubar>
	        <menu title="Actions" icon="img/16px/create_16px.png" showTitle="true">
	            <item title="Create call" action="save,action-partner-view-create-call" readonlyIf="id == null"/>
	            <item title="Schedule meeting" action="save,action-partner-view-create-meeting" readonlyIf="id == null"/>
	            <item title="Create task" action="save,action-partner-view-create-task" readonlyIf="id == null"/>
	            <item title="Create opportunity" action="save,action-partner-view-create-opportunity" readonlyIf="id == null"/>
	        </menu>
	    </menubar>
	    <group colSpan="6" cols="6">
	        <group colSpan="1" cols="1">
	            <group colSpan="1">
	                <field name="picture" showTitle="false" widget="Image"/>
	            </group>
	            <break/>
	            <group colSpan="1" showIf="id != null">
	                <button name="facebook" css="img-button" icon="img/Other/facebookLogo_75px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="linkedin" css="img-button" icon="img/Other/linkedinLogo_57px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="twitter" css="img-button" icon="img/Other/twitterLogo_54px.png" onClick="action-partner-view-sn-profile"/>
	            </group>
	        </group>
	        <group colSpan="1">
	            <field name="titleSelect" showTitle="false" hideIf="partnerTypeSelect != 2" placeholder="Civility"/>
	            <break/>
	            <field name="name" showTitle="false" css="highlight" placeholder="Name" onChange="action-partner-record-full-name"/>
	            <break/>
	            <field name="firstName" showTitle="false" hideIf="partnerTypeSelect != 2" css="highlight" placeholder="First name" onChange="action-partner-record-full-name"/>
	            <break/>
	            <field name="partnerTypeSelect" showTitle="false" onChange="action-partner-attrs-change-name"/>
	        </group>
	        <group colSpan="4" cols="4">
	            <field name="contactPartnerSet" hideIf="isContact || partnerTypeSelect == 2" colSpan="4" domain="self.isContact = 'true'" form-view="partner-contact-form" grid-view="partner-contact-grid"/>    
	        </group>
	    </group>
	    <break/>
	    <notebook colSpan="4">
	        <page name="information" title="Informations">
	            <group colSpan="4" cols="4" hideIf="isContact">
                    <field name="customerTypeSelect" hideIf="(isContact &amp;&amp; partnerTypeSelect == 2)"/>
                    <field name="supplierTypeSelect" hideIf="partnerTypeSelect == 2 || isContact"/>
	            </group>
	            <group title="Partner Details" hideIf="partnerTypeSelect == 2" colSpan="4" cols="4">
	                <group colSpan="2" cols="2">
	                    <field name="partnerCategory" widget="SuggestBox"/>
	                    <field name="industrySectorSelect"/>
	                    <field name="source"/>
	                    <field name="site" domain="self.partner.id = :id"/>
	                    <field name="department"/>
	                </group>
	                <group colSpan="2" cols="2">
	                    <field name="salesTurnover"/>
	                    <field name="nbrEmployees"/>
	                    <field name="registrationCode"/>
	                    <field name="taxNbr"/>
	                    <field name="parentPartner" hideIf="partnerTypeSelect != 1" domain="self.iscontact = false AND self.partnerTypeSelect = 1"/>
	                </group>
	            </group>
	            <group title="Postal addresses" colSpan="4" cols="4">
	                <field name="deliveryAddress" onChange="action-partner-record-main-invoicing-address"/>
	                <field name="mainInvoicingAddress"/>
	                <field name="deliveryDelay" showIf="supplierTypeSelect == 2 || supplierTypeSelect == 3"/>
	            </group>
	            <group title="Contact" colSpan="4" cols="4">
	                <field name="fixedPhone"/>
	                <field name="mobilePhone" hideIf="partnerTypeSelect == 1"/>
	                <field name="emailAddress" canSelect="false" canNew="false" form-view="email-address-simple-form"/>
	                <field name="fax"/>
	                <field name="webSite"/>
	            </group>
	        </page>
	        <page title="Notes">
	            <field name="description" showTitle="false" colSpan="4" widget="Html" x-lite="true"/>
	        </page>
	        <page name="payment" title="Invoicing/Payment" hideIf="partnerTypeSelect == 2" colSpan="4" cols="4">
	            <field name="invoiceSendingFormatSelect"/>
	            <field name="paymentMode"/>
	            <field name="paymentCondition"/>
	            <field name="currency" requiredIf="!isContact &amp;&amp; partnerTypeSelect != 2"/>
	            <field name="bankDetails" widget="SuggestBox" domain="self.partner.id = :id"/>
	            <field name="bankDetailsList" showTitle="false" colSpan="4" form-view="bank-details-form" grid-view="bank-details-grid"/>
	        </page>
	        <page title="Settings" cols="4">
	            <field name="partnerSeq"/>
	            <field name="languageSelect"/>
	            <group title="Assigned to" colSpan="4" cols="4" canCollapse="true">
	                <field name="companySet" colSpan="4" widget="TagSelect" x-create="name" onChange="action-partner-company-set-validate"/>
	                <break/>
	                <field name="userInfo"/>
	                <field name="team"/>
	            </group>
	        </page>
	        <page name="activities" title="Activities" showIf="id != null">
	        	<button name="showProject" title="Show projects" colSpan="3" onClick="save,action-partner-view-partner-project"/>
			    <portlet colSpan="6" action="action-partner-view-upcoming-events"/>
			    <portlet colSpan="6" action="action-partner-view-historical-events-completed"/>
			    <portlet colSpan="6" action="action-partner-view-opportunities"/>
			    <portlet colSpan="6" action="action-partner-view-sales-orders"/>
			    <portlet colSpan="6" action="action-partner-view-tickets"/>
	        </page>
			<page name="turnover" title="Sales" showIf="id != null" colSpan="3">
			  <portlet action="portal.customer.sales.lastYear.vs.ytd.by.family" height="350" colSpan="3"/>
			</page>
			<page name="events" title="Events" showIf="id != null">
     			 <portlet colSpan="6" action="portal.customer.crm.activities"/>
			</page>
	    </notebook>
	</form>
	
	<grid name="partner-light-grid" title="Contacts" model="com.axelor.apps.base.db.Partner">
        <field name="fullName"/>
        <field name="mainInvoicingAddress"/>
        <field name="fixedPhone"/>
		<field name="mobilePhone"/>
        <field name="email"/>
    </grid>
    
    <form cols="4" colWidths="25*" name="partner-light-form" title="Partner" model="com.axelor.apps.base.db.Partner"
	    onNew="action-partner-record-partner-type-select" 
	    onLoad="action-partner-attrs-change-name" 
	    onSave="save,action-set-partner-seq">
	    
	    <toolbar>
    		<button name="sendByEmail" title="Send email" onClick="save,action-send-by-email-with-template" colSpan="1" readonlyIf="id == null"/>
    	</toolbar>
    	
	    <group colSpan="1">
	        <field name="picture"/>
	    </group>
	    <group colSpan="3" cols="6">
	        <field name="titleSelect" hideIf="partnerTypeSelect != 2" css="highlight"/>
	        <field name="name" css="highlight" onChange="action-partner-record-full-name"/>
	        <field name="firstName" hideIf="partnerTypeSelect != 2" css="highlight" onChange="action-partner-record-full-name"/>
	        <break/>
	        <field name="partnerCategory" widget="SuggestBox"/>
	        <field name="partnerTypeSelect" onChange="action-partner-attrs-change-name"/>
	        <field name="isContact" hideIf="partnerTypeSelect != 2"/>
	        <break/>
	        <field name="mainPartner" hideIf="!isContact"/>
	    </group>
	    <notebook colSpan="4">
	        <page name="information" title="Informations">
	            <group title="Partner details" colSpan="3" cols="4" hideIf="partnerTypeSelect == 2">
	                <field name="site" domain="self.partner.id = :id"/>
	                <field name="department"/>
	                <field name="source" hideIf="isContact"/>
	            </group>
	            <group title="Postal addresses" hideIf="isContact" colSpan="3" cols="4">
	                <field name="mainInvoicingAddress" onChange="action-partner-record-main-invoicing-address"/>
	                <field name="deliveryAddress"/>
	            </group>
	            <group title="Contact" colSpan="3" cols="4">
	                <field name="emailAddress" canSelect="false" canNew="false" form-view="email-address-simple-form"/>
	                <field name="fax"/>
	                <field name="fixedPhone"/>
					<field name="mobilePhone"/>
	                <field name="webSite"/>
	            </group>
	        </page>
	    </notebook>
    </form>
	

	<form name="partner-contact-form" title="Contact" model="com.axelor.apps.base.db.Partner" cols="6" colWidths="25*" 
	onNew="action-partner-contact-record-default" 
	onLoad="action-partner-attrs-change-name" 
	onSave="save,action-set-partner-seq">
	    <toolbar>
	        <button name="sendByEmail" title="Send email" icon="fa-envelope" onClick="save,action-send-by-email-with-template" readonlyIf="id == null"/>
	        <button name="showPartnerInfo" title="Print Informations" icon="fa-print" onClick="save,action-partner-method-show-partner-info"  readonlyIf="id == null"/>
	        <button name="showClientSituationForm" title="Client Situation" icon="fa-print" onClick="save,action-partner-method-show-client-situation" showIf="isContact == false"  readonlyIf="id == null"/>
	    </toolbar>
	    <menubar>
	        <menu title="Actions" icon="img/16px/create_16px.png" showTitle="true">
	            <item title="Create call" action="save,action-partner-view-create-call" readonlyIf="id == null"/>
	            <item title="Schedule meeting" action="save,action-partner-view-create-meeting" readonlyIf="id == null"/>
	            <item title="Create task" action="save,action-partner-view-create-task" readonlyIf="id == null"/>
	            <item title="Create opportunity" action="save,action-partner-view-create-opportunity" readonlyIf="id == null"/>
	        </menu>
	    </menubar>
	    <group colSpan="6" cols="6">
	        <group colSpan="1" cols="1">
	            <group colSpan="1">
	                <field name="picture" showTitle="false"/>
	            </group>
	            <break/>
	            <group colSpan="1" showIf="id != null">
	                <button name="facebook" css="img-button" icon="img/Other/facebookLogo_75px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="linkedin" css="img-button" icon="img/Other/linkedinLogo_57px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="twitter" css="img-button" icon="img/Other/twitterLogo_54px.png" onClick="action-partner-view-sn-profile"/>
	            </group>
	        </group>
	        <group colSpan="1" cols="1">
	            <field name="titleSelect" showTitle="false" placeholder="Civility"/>
	            <break/>
	            <field name="name" showTitle="false" css="highlight" placeholder="Name" onChange="action-check-string-capital-case,action-partner-record-full-name"/>
	            <break/>
	            <field name="firstName" showTitle="false" css="highlight" placeholder="First name" onChange="action-check-string-camel-case,action-partner-record-full-name"/>
	            <break/>
	            <separator title="Company"/>
	            <field name="mainPartner"/>
	        </group>
	        <group title="Contact" colSpan="4" cols="4">
	            <field name="jobTitle"/>
	            <field name="reportsTo"/>
	            <separator colSpan="4"/>
	            <field name="fixedPhone"/>
	            <field name="mobilePhone"/>
	            <field name="emailAddress" canSelect="false" canNew="false" form-view="email-address-simple-form"/>
	            <field name="fax"/>
	            <field name="mainInvoicingAddress" title="Address"/>     
	        </group>
	    </group>
	    <break/>
	    <notebook colSpan="4">
	        <page title="Notes">
	            <field name="description" showTitle="false" colSpan="4" widget="Html" x-lite="true"/>
	        </page>
	        <page title="Settings" cols="4">
	            <field name="partnerSeq"/>
	            <field name="languageSelect"/>
	            <group title="Assigned to" colSpan="4" cols="4" canCollapse="true">
	                <field name="companySet" colSpan="4" widget="TagSelect" x-create="name" onChange="action-partner-company-set-validate"/>
	                <break/>
	                <field name="userInfo"/>
	                <field name="team"/>
	            </group>
	        </page>
		    <page name="activities" title="Activities" showIf="id != null">
	        	<button name="showProject" title="Show projects" colSpan="3" onClick="save,action-partner-view-partner-project"/>
			    <portlet colSpan="6" action="action-partner-view-upcoming-events"/>
			    <portlet colSpan="6" action="action-partner-view-historical-events-completed"/>
			    <portlet colSpan="6" action="action-partner-view-opportunities"/>
			    <portlet colSpan="6" action="action-partner-view-sales-orders"/>
			    <portlet colSpan="6" action="action-partner-view-tickets"/>
	        </page>
	    </notebook>
	</form>
	
	<action-record name="action-partner-record-get-lead-converted-context" model="com.axelor.apps.base.db.Partner">
		<field name="name" expr="eval: com.axelor.apps.crm.db.Lead.find(_parent._lead).name"/>
	</action-record>
	
    
    <action-method name="action-partner-method-show-partner-info">
		<call class="com.axelor.apps.base.web.PartnerController" method="showPartnerInfo"/>
	</action-method>
    
	<action-view name="action-partner-view-partner-sales-order" title="Sales orders" model="com.axelor.apps.supplychain.db.SalesOrder">
		<view type="grid" name="sales-order-grid"/>
		<view type="form" name="sales-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-partner-view-sn-profile" title="Profiles" model="com.axelor.apps.socialnetwork.db.SnProfile">
		<view type="form" name="sn-profile-form"/>
		<context name="id" expr="eval: id"/>
	</action-view>
    
<!--     CREATE CRM OBJECT FROM PARTNER -->
    
    <action-view name="action-partner-view-create-call" title="Create call" model="com.axelor.apps.crm.db.Event">
    	<view type="form" name="call-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    	<context name="_typeSelect" expr="1"/>
    </action-view>
    
    <action-view name="action-partner-view-create-meeting" title="Create meeting" model="com.axelor.apps.crm.db.Event">
    	<view type="form" name="meeting-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    	<context name="_typeSelect" expr="2"/>
    </action-view>
    
    <action-view name="action-partner-view-create-task" title="Create task" model="com.axelor.apps.crm.db.Event">
    	<view type="form" name="crm-task-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    	<context name="_typeSelect" expr="3"/>
    </action-view>
    
    <action-view name="action-partner-view-create-opportunity" title="Create opportunity" model="com.axelor.apps.crm.db.Opportunity">
    	<view type="form" name="opportunity-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    </action-view>
    
<!--     PORTLET -->
    
    <action-view name="action-partner-view-upcoming-events" title="Upcoming events" model="com.axelor.apps.crm.db.Event">
		<view type="grid" name="event-grid"/>
		<view type="form" name="event-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id) and self.startDateTime > :_todayTime and self.typeSelect != 5</domain>
		<context name="id" expr="eval: id"/>
		<context name="_todayTime" expr="eval: __datetime__"/>
	</action-view>
	
	<action-view name="action-partner-view-historical-events-completed" title="Historical events completed" model="com.axelor.apps.crm.db.Event">
		<view type="grid" name="event-grid"/>
		<view type="form" name="event-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id) and self.endDateTime &lt; :_todayTime and self.typeSelect != 5</domain>
		<context name="id" expr="eval: id"/>
		<context name="_todayTime" expr="eval: __datetime__"/>
	</action-view>
   	
   	<action-view name="action-partner-view-opportunities" title="Opportunities" model="com.axelor.apps.crm.db.Opportunity">
		<view type="grid" name="opportunity-grid"/>
		<view type="form" name="opportunity-form"/>
		<domain>self.partner.id = :id</domain>
		<context name="id" expr="eval: id"/>
	</action-view>
    
    <action-view name="action-partner-view-sales-orders" title="Sales orders" model="com.axelor.apps.supplychain.db.SalesOrder">
		<view type="grid" name="sales-order-grid"/>
		<view type="form" name="sales-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-partner-view-tickets" title="Tickets" model="com.axelor.apps.crm.db.Event">
		<view type="grid" name="ticket-grid"/>
		<view type="form" name="ticket-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id) AND self.typeSelect = 5</domain>
		<context name="id" expr="eval: id"/>
	</action-view>
    
    <action-record name="action-partner-record-main-invoicing-address" model="com.axelor.apps.base.db.Partner">
    	<field name="mainInvoicingAddress" expr="eval: deliveryAddress" if="mainInvoicingAddress == null"/>
    </action-record>
    
 	<action-attrs name="action-partner-attrs-change-name">
		<attribute name="title" for="name" expr="Raison sociale" if="partnerTypeSelect != 2"/>
    	<attribute name="title" for="name" expr="Nom" if="partnerTypeSelect == 2"/>
		<attribute name="required" for="name" expr="true"/>	
	</action-attrs>
	
	<action-record name="action-partner-record-partner-type-select" model="com.axelor.apps.base.db.Partner" >
    	<field name="partnerTypeSelect" expr="eval:_partnerTypeSelect"/>
    </action-record>
    
    <action-record name="action-partner-record-full-name" model="com.axelor.apps.base.db.Partner" >
    	<field name="fullName" expr="eval: name + ' ' + firstName" if="name != null &amp;&amp; firstName != null"/>
    	<field name="fullName" expr="eval: name" if="name != null &amp;&amp; firstName == null"/>
    	<field name="fullName" expr="eval: firstName" if="firstName != null &amp;&amp; name == null"/>
    	<field name="fullName" expr="eval: id" if="firstName == null &amp;&amp; name == null"/>
    </action-record>
    
    <action-record name="action-partner-record-customer-supplier-type" model="com.axelor.apps.base.db.Partner">
    	<field name="customerTypeSelect" expr="eval: 1" />
    	<field name="supplierTypeSelect" expr="eval:1"/>
    </action-record>
    
    <action-record name="action-partner-record-set-default" model="com.axelor.apps.base.db.Partner">
    	<field name="currency" expr="eval:com.axelor.apps.base.db.UserInfo.all().filter('internalUser = ?1',__user__).fetchOne()?.activeCompany?.currency" if="!isContact"/>
    	<field name="invoiceSendingFormatSelect" expr="eval:'emailpaper'" if="!isContact"/>
    	<field name="userInfo"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserInfo()"/>
    	<field name="team"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserActiveTeam()"/>
    	<field name="companySet" expr="call:com.axelor.apps.base.web.PartnerController:getActiveCompany()"/>
    </action-record>
    
    <action-record name="action-partner-contact-record-default" model="com.axelor.apps.base.db.Partner">
    	<field name="partnerTypeSelect" expr="2" />
    	<field name="isContact" expr="true"/>
    	<field name="companySet" expr="eval: _parent?.companySet"/>
    	<field name="languageSelect" expr="eval: _parent?.languageSelect"/>
    	<field name="userInfo"  expr="eval: _parent.userInfo" if="_parent._model == 'com.axelor.apps.base.db.Partner'"/>
    	<field name="team"  expr="eval: _parent.team" if="_parent._model == 'com.axelor.apps.base.db.Partner'"/>
    	<field name="userInfo"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserInfo()" if="_parent == null || _parent._model != 'com.axelor.apps.base.db.Partner'"/>
    	<field name="team"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserActiveTeam()" if="_parent == null || _parent._model != 'com.axelor.apps.base.db.Partner'"/>
    </action-record>
    
    <action-record name="action-partner-set-non-contact-fields" model="com.axelor.apps.base.db.Partner">
    	<field name="currency" expr="eval:null" if="!isContact"/>
    	<field name="invoiceSendingFormatSelect" expr="eval:null" if="!isContact"/>
    </action-record>
	
	<action-method name="action-set-partner-seq" >
		<call class="com.axelor.apps.base.web.PartnerController" method="setPartnerSequence"/>
	</action-method>
    
    <action-method name="action-print-compnay-phonebook" >
		<call class="com.axelor.apps.base.web.PartnerController" method="printCompanyPhonebook"/>
	</action-method>
	
	<action-method name="action-print-phonebook" >
		<call class="com.axelor.apps.base.web.PartnerController" method="printContactPhonebook"/>
	</action-method>
	
	<action-method name="action-partner-method-show-client-situation" >
		<call class="com.axelor.apps.base.web.PartnerController" method="printClientSituation"/>
	</action-method>
	
	<!-- CRM EVENTS REPORT FOR PARTNER -->
	<action-view title="CRM Activities" model="com.axelor.apps.base.db.Partner" name="portal.customer.crm.activities">
  		<view type="chart" name="chart.customer.crm.activities"/>
  		<context name="id" expr="eval: id"/>
	</action-view>
	
	<search-filters name="partner-filters" model="com.axelor.apps.base.db.Partner" title="Partner filters">
		<filter title="All Enterprises">
			<domain>self.partnerTypeSelect = 1 AND self.isContact = false</domain>
		</filter>
		<filter title="All Individuals">
			<domain>self.partnerTypeSelect = 2 AND self.isContact = false</domain>
		</filter>
		<filter title="All Prospects">
			<domain>self.customerTypeSelect = 2 AND self.isContact = false</domain>
		</filter>
		<filter title="All Clients">
			<domain>self.customerTypeSelect = 3 AND self.isContact = false</domain>
		</filter>
		<filter title="All Suppliers">
			<domain>self.supplierTypeSelect = 2 AND self.isContact = false</domain>
		</filter>
		<filter title="All qualified supplier">
			<domain>self.supplierTypeSelect = 3 AND self.isContact = false</domain>
		</filter>
	</search-filters>
	
	
</object-views>
<commit_msg>Fixed wrong domain<commit_after><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://apps.axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://apps.axelor.com/xml/ns/object-views http://apps.axelor.com/xml/ns/object-views/object-views_2.0.xsd">
    
    <grid name="partner-grid" title="Partners" model="com.axelor.apps.base.db.Partner" orderBy="name">
	    <toolbar>
	        <button name="printPhoneBook" title="PhoneBook" icon="fa-print" onClick="action-print-phonebook"/>
	        <button name="printCompanyPhoneBook" title="Company phoneBook" icon="fa-print" onClick="action-print-compnay-phonebook"/>
	    </toolbar>
	    <field name="fullName"/>
	    <field name="mainInvoicingAddress"/>
	    <field name="fixedPhone"/>
		<field name="emailAddress.address"/>
	    <field name="partnerCategory"/>
		<button name="logCall" title="Log Call" colSpan="1" icon="fa-phone" help="Log Call" onClick="action-partner-view-create-call"/>
		<button name="scheduleMeeting" title="Schedule Meeting" colSpan="1" help="Schedule Meeting" icon="fa-group" onClick="action-partner-view-create-meeting"/>
		<button name="sendByEmail" title="Send Email" colSpan="1" help="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
	</grid>
    
    <grid name="partner-contact-grid" title="Contacts" model="com.axelor.apps.base.db.Partner">
	    <field name="fullName"/>
	    <field name="fixedPhone"/>
	    <field name="mobilePhone"/>
	    <field name="emailAddress.address"/>
	    <button name="logCall" title="Log Call" colSpan="1" icon="fa-phone" help="Log Call" onClick="action-partner-view-create-call"/>
		<button name="scheduleMeeting" title="Schedule Meeting" colSpan="1" help="Schedule Meeting" icon="fa-group" onClick="action-partner-view-create-meeting"/>
		<button name="sendByEmail" title="Send Email" colSpan="1" help="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template"/>
	</grid>
    
     <grid name="partner-grid-group" title="Partner" model="com.axelor.apps.base.db.Partner" groupBy="userInfo">
        <field name="fullName"/>
        <field name="mainInvoicingAddress"/>
        <field name="fixedPhone"/>
		<field name="mobilePhone"/>
        <field name="emailAddress.address"/>
        <field name="userInfo"/>
    </grid>
    
    <form name="partner-form" id="base-partner-form" title="Partner" model="com.axelor.apps.base.db.Partner" cols="6" colWidths="25*" 
    onNew="action-partner-record-partner-type-select,action-partner-record-set-default,action-partner-record-customer-supplier-type" 
    onLoad="action-partner-attrs-change-name" 
    onSave="save,action-set-partner-seq,action-create-accounting-situation">
	    <toolbar>
	        <button name="sendByEmail" title="Send email" icon="fa-envelope" onClick="save,action-send-by-email-with-template" readonlyIf="id == null"/>
	        <button name="showPartnerInfo" title="Print Informations" icon="fa-print" onClick="save,action-partner-method-show-partner-info" readonlyIf="id == null"/>
	        <button name="showClientSituationForm" title="Client Situation" icon="fa-print" onClick="save,action-partner-method-show-client-situation" showIf="isContact == false" readonlyIf="id == null"/>
	    </toolbar>
	    <menubar>
	        <menu title="Actions" icon="img/16px/create_16px.png" showTitle="true">
	            <item title="Create call" action="save,action-partner-view-create-call" readonlyIf="id == null"/>
	            <item title="Schedule meeting" action="save,action-partner-view-create-meeting" readonlyIf="id == null"/>
	            <item title="Create task" action="save,action-partner-view-create-task" readonlyIf="id == null"/>
	            <item title="Create opportunity" action="save,action-partner-view-create-opportunity" readonlyIf="id == null"/>
	        </menu>
	    </menubar>
	    <group colSpan="6" cols="6">
	        <group colSpan="1" cols="1">
	            <group colSpan="1">
	                <field name="picture" showTitle="false" widget="Image"/>
	            </group>
	            <break/>
	            <group colSpan="1" showIf="id != null">
	                <button name="facebook" css="img-button" icon="img/Other/facebookLogo_75px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="linkedin" css="img-button" icon="img/Other/linkedinLogo_57px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="twitter" css="img-button" icon="img/Other/twitterLogo_54px.png" onClick="action-partner-view-sn-profile"/>
	            </group>
	        </group>
	        <group colSpan="1">
	            <field name="titleSelect" showTitle="false" hideIf="partnerTypeSelect != 2" placeholder="Civility"/>
	            <break/>
	            <field name="name" showTitle="false" css="highlight" placeholder="Name" onChange="action-partner-record-full-name"/>
	            <break/>
	            <field name="firstName" showTitle="false" hideIf="partnerTypeSelect != 2" css="highlight" placeholder="First name" onChange="action-partner-record-full-name"/>
	            <break/>
	            <field name="partnerTypeSelect" showTitle="false" onChange="action-partner-attrs-change-name"/>
	        </group>
	        <group colSpan="4" cols="4">
	            <field name="contactPartnerSet" hideIf="isContact || partnerTypeSelect == 2" colSpan="4" domain="self.isContact = 'true'" form-view="partner-contact-form" grid-view="partner-contact-grid"/>    
	        </group>
	    </group>
	    <break/>
	    <notebook colSpan="4">
	        <page name="information" title="Informations">
	            <group colSpan="4" cols="4" hideIf="isContact">
                    <field name="customerTypeSelect" hideIf="(isContact &amp;&amp; partnerTypeSelect == 2)"/>
                    <field name="supplierTypeSelect" hideIf="partnerTypeSelect == 2 || isContact"/>
	            </group>
	            <group title="Partner Details" hideIf="partnerTypeSelect == 2" colSpan="4" cols="4">
	                <group colSpan="2" cols="2">
	                    <field name="partnerCategory" widget="SuggestBox"/>
	                    <field name="industrySectorSelect"/>
	                    <field name="source"/>
	                    <field name="site" domain="self.partner.id = :id"/>
	                    <field name="department"/>
	                </group>
	                <group colSpan="2" cols="2">
	                    <field name="salesTurnover"/>
	                    <field name="nbrEmployees"/>
	                    <field name="registrationCode"/>
	                    <field name="taxNbr"/>
	                    <field name="parentPartner" hideIf="partnerTypeSelect != 1" domain="self.isContact = false AND self.partnerTypeSelect = 1"/>
	                </group>
	            </group>
	            <group title="Postal addresses" colSpan="4" cols="4">
	                <field name="deliveryAddress" onChange="action-partner-record-main-invoicing-address"/>
	                <field name="mainInvoicingAddress"/>
	                <field name="deliveryDelay" showIf="supplierTypeSelect == 2 || supplierTypeSelect == 3"/>
	            </group>
	            <group title="Contact" colSpan="4" cols="4">
	                <field name="fixedPhone"/>
	                <field name="mobilePhone" hideIf="partnerTypeSelect == 1"/>
	                <field name="emailAddress" canSelect="false" canNew="false" form-view="email-address-simple-form"/>
	                <field name="fax"/>
	                <field name="webSite"/>
	            </group>
	        </page>
	        <page title="Notes">
	            <field name="description" showTitle="false" colSpan="4" widget="Html" x-lite="true"/>
	        </page>
	        <page name="payment" title="Invoicing/Payment" hideIf="partnerTypeSelect == 2" colSpan="4" cols="4">
	            <field name="invoiceSendingFormatSelect"/>
	            <field name="paymentMode"/>
	            <field name="paymentCondition"/>
	            <field name="currency" requiredIf="!isContact &amp;&amp; partnerTypeSelect != 2"/>
	            <field name="bankDetails" widget="SuggestBox" domain="self.partner.id = :id"/>
	            <field name="bankDetailsList" showTitle="false" colSpan="4" form-view="bank-details-form" grid-view="bank-details-grid"/>
	        </page>
	        <page title="Settings" cols="4">
	            <field name="partnerSeq"/>
	            <field name="languageSelect"/>
	            <group title="Assigned to" colSpan="4" cols="4" canCollapse="true">
	                <field name="companySet" colSpan="4" widget="TagSelect" x-create="name" onChange="action-partner-company-set-validate"/>
	                <break/>
	                <field name="userInfo"/>
	                <field name="team"/>
	            </group>
	        </page>
	        <page name="activities" title="Activities" showIf="id != null">
	        	<button name="showProject" title="Show projects" colSpan="3" onClick="save,action-partner-view-partner-project"/>
			    <portlet colSpan="6" action="action-partner-view-upcoming-events"/>
			    <portlet colSpan="6" action="action-partner-view-historical-events-completed"/>
			    <portlet colSpan="6" action="action-partner-view-opportunities"/>
			    <portlet colSpan="6" action="action-partner-view-sales-orders"/>
			    <portlet colSpan="6" action="action-partner-view-tickets"/>
	        </page>
			<page name="turnover" title="Sales" showIf="id != null" colSpan="3">
			  <portlet action="portal.customer.sales.lastYear.vs.ytd.by.family" height="350" colSpan="3"/>
			</page>
			<page name="events" title="Events" showIf="id != null">
     			 <portlet colSpan="6" action="portal.customer.crm.activities"/>
			</page>
	    </notebook>
	</form>
	
	<grid name="partner-light-grid" title="Contacts" model="com.axelor.apps.base.db.Partner">
        <field name="fullName"/>
        <field name="mainInvoicingAddress"/>
        <field name="fixedPhone"/>
		<field name="mobilePhone"/>
        <field name="email"/>
    </grid>
    
    <form cols="4" colWidths="25*" name="partner-light-form" title="Partner" model="com.axelor.apps.base.db.Partner"
	    onNew="action-partner-record-partner-type-select" 
	    onLoad="action-partner-attrs-change-name" 
	    onSave="save,action-set-partner-seq">
	    
	    <toolbar>
    		<button name="sendByEmail" title="Send email" onClick="save,action-send-by-email-with-template" colSpan="1" readonlyIf="id == null"/>
    	</toolbar>
    	
	    <group colSpan="1">
	        <field name="picture"/>
	    </group>
	    <group colSpan="3" cols="6">
	        <field name="titleSelect" hideIf="partnerTypeSelect != 2" css="highlight"/>
	        <field name="name" css="highlight" onChange="action-partner-record-full-name"/>
	        <field name="firstName" hideIf="partnerTypeSelect != 2" css="highlight" onChange="action-partner-record-full-name"/>
	        <break/>
	        <field name="partnerCategory" widget="SuggestBox"/>
	        <field name="partnerTypeSelect" onChange="action-partner-attrs-change-name"/>
	        <field name="isContact" hideIf="partnerTypeSelect != 2"/>
	        <break/>
	        <field name="mainPartner" hideIf="!isContact"/>
	    </group>
	    <notebook colSpan="4">
	        <page name="information" title="Informations">
	            <group title="Partner details" colSpan="3" cols="4" hideIf="partnerTypeSelect == 2">
	                <field name="site" domain="self.partner.id = :id"/>
	                <field name="department"/>
	                <field name="source" hideIf="isContact"/>
	            </group>
	            <group title="Postal addresses" hideIf="isContact" colSpan="3" cols="4">
	                <field name="mainInvoicingAddress" onChange="action-partner-record-main-invoicing-address"/>
	                <field name="deliveryAddress"/>
	            </group>
	            <group title="Contact" colSpan="3" cols="4">
	                <field name="emailAddress" canSelect="false" canNew="false" form-view="email-address-simple-form"/>
	                <field name="fax"/>
	                <field name="fixedPhone"/>
					<field name="mobilePhone"/>
	                <field name="webSite"/>
	            </group>
	        </page>
	    </notebook>
    </form>
	

	<form name="partner-contact-form" title="Contact" model="com.axelor.apps.base.db.Partner" cols="6" colWidths="25*" 
	onNew="action-partner-contact-record-default" 
	onLoad="action-partner-attrs-change-name" 
	onSave="save,action-set-partner-seq">
	    <toolbar>
	        <button name="sendByEmail" title="Send email" icon="fa-envelope" onClick="save,action-send-by-email-with-template" readonlyIf="id == null"/>
	        <button name="showPartnerInfo" title="Print Informations" icon="fa-print" onClick="save,action-partner-method-show-partner-info"  readonlyIf="id == null"/>
	        <button name="showClientSituationForm" title="Client Situation" icon="fa-print" onClick="save,action-partner-method-show-client-situation" showIf="isContact == false"  readonlyIf="id == null"/>
	    </toolbar>
	    <menubar>
	        <menu title="Actions" icon="img/16px/create_16px.png" showTitle="true">
	            <item title="Create call" action="save,action-partner-view-create-call" readonlyIf="id == null"/>
	            <item title="Schedule meeting" action="save,action-partner-view-create-meeting" readonlyIf="id == null"/>
	            <item title="Create task" action="save,action-partner-view-create-task" readonlyIf="id == null"/>
	            <item title="Create opportunity" action="save,action-partner-view-create-opportunity" readonlyIf="id == null"/>
	        </menu>
	    </menubar>
	    <group colSpan="6" cols="6">
	        <group colSpan="1" cols="1">
	            <group colSpan="1">
	                <field name="picture" showTitle="false"/>
	            </group>
	            <break/>
	            <group colSpan="1" showIf="id != null">
	                <button name="facebook" css="img-button" icon="img/Other/facebookLogo_75px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="linkedin" css="img-button" icon="img/Other/linkedinLogo_57px.png" onClick="action-partner-view-sn-profile"/>
	                <button name="twitter" css="img-button" icon="img/Other/twitterLogo_54px.png" onClick="action-partner-view-sn-profile"/>
	            </group>
	        </group>
	        <group colSpan="1" cols="1">
	            <field name="titleSelect" showTitle="false" placeholder="Civility"/>
	            <break/>
	            <field name="name" showTitle="false" css="highlight" placeholder="Name" onChange="action-check-string-capital-case,action-partner-record-full-name"/>
	            <break/>
	            <field name="firstName" showTitle="false" css="highlight" placeholder="First name" onChange="action-check-string-camel-case,action-partner-record-full-name"/>
	            <break/>
	            <separator title="Company"/>
	            <field name="mainPartner"/>
	        </group>
	        <group title="Contact" colSpan="4" cols="4">
	            <field name="jobTitle"/>
	            <field name="reportsTo"/>
	            <separator colSpan="4"/>
	            <field name="fixedPhone"/>
	            <field name="mobilePhone"/>
	            <field name="emailAddress" canSelect="false" canNew="false" form-view="email-address-simple-form"/>
	            <field name="fax"/>
	            <field name="mainInvoicingAddress" title="Address"/>     
	        </group>
	    </group>
	    <break/>
	    <notebook colSpan="4">
	        <page title="Notes">
	            <field name="description" showTitle="false" colSpan="4" widget="Html" x-lite="true"/>
	        </page>
	        <page title="Settings" cols="4">
	            <field name="partnerSeq"/>
	            <field name="languageSelect"/>
	            <group title="Assigned to" colSpan="4" cols="4" canCollapse="true">
	                <field name="companySet" colSpan="4" widget="TagSelect" x-create="name" onChange="action-partner-company-set-validate"/>
	                <break/>
	                <field name="userInfo"/>
	                <field name="team"/>
	            </group>
	        </page>
		    <page name="activities" title="Activities" showIf="id != null">
	        	<button name="showProject" title="Show projects" colSpan="3" onClick="save,action-partner-view-partner-project"/>
			    <portlet colSpan="6" action="action-partner-view-upcoming-events"/>
			    <portlet colSpan="6" action="action-partner-view-historical-events-completed"/>
			    <portlet colSpan="6" action="action-partner-view-opportunities"/>
			    <portlet colSpan="6" action="action-partner-view-sales-orders"/>
			    <portlet colSpan="6" action="action-partner-view-tickets"/>
	        </page>
	    </notebook>
	</form>
	
	<action-record name="action-partner-record-get-lead-converted-context" model="com.axelor.apps.base.db.Partner">
		<field name="name" expr="eval: com.axelor.apps.crm.db.Lead.find(_parent._lead).name"/>
	</action-record>
	
    
    <action-method name="action-partner-method-show-partner-info">
		<call class="com.axelor.apps.base.web.PartnerController" method="showPartnerInfo"/>
	</action-method>
    
	<action-view name="action-partner-view-partner-sales-order" title="Sales orders" model="com.axelor.apps.supplychain.db.SalesOrder">
		<view type="grid" name="sales-order-grid"/>
		<view type="form" name="sales-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-partner-view-sn-profile" title="Profiles" model="com.axelor.apps.socialnetwork.db.SnProfile">
		<view type="form" name="sn-profile-form"/>
		<context name="id" expr="eval: id"/>
	</action-view>
    
<!--     CREATE CRM OBJECT FROM PARTNER -->
    
    <action-view name="action-partner-view-create-call" title="Create call" model="com.axelor.apps.crm.db.Event">
    	<view type="form" name="call-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    	<context name="_typeSelect" expr="1"/>
    </action-view>
    
    <action-view name="action-partner-view-create-meeting" title="Create meeting" model="com.axelor.apps.crm.db.Event">
    	<view type="form" name="meeting-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    	<context name="_typeSelect" expr="2"/>
    </action-view>
    
    <action-view name="action-partner-view-create-task" title="Create task" model="com.axelor.apps.crm.db.Event">
    	<view type="form" name="crm-task-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    	<context name="_typeSelect" expr="3"/>
    </action-view>
    
    <action-view name="action-partner-view-create-opportunity" title="Create opportunity" model="com.axelor.apps.crm.db.Opportunity">
    	<view type="form" name="opportunity-form"/>
    	<context name="_partner" expr="eval: __self__"/>
    </action-view>
    
<!--     PORTLET -->
    
    <action-view name="action-partner-view-upcoming-events" title="Upcoming events" model="com.axelor.apps.crm.db.Event">
		<view type="grid" name="event-grid"/>
		<view type="form" name="event-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id) and self.startDateTime > :_todayTime and self.typeSelect != 5</domain>
		<context name="id" expr="eval: id"/>
		<context name="_todayTime" expr="eval: __datetime__"/>
	</action-view>
	
	<action-view name="action-partner-view-historical-events-completed" title="Historical events completed" model="com.axelor.apps.crm.db.Event">
		<view type="grid" name="event-grid"/>
		<view type="form" name="event-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id) and self.endDateTime &lt; :_todayTime and self.typeSelect != 5</domain>
		<context name="id" expr="eval: id"/>
		<context name="_todayTime" expr="eval: __datetime__"/>
	</action-view>
   	
   	<action-view name="action-partner-view-opportunities" title="Opportunities" model="com.axelor.apps.crm.db.Opportunity">
		<view type="grid" name="opportunity-grid"/>
		<view type="form" name="opportunity-form"/>
		<domain>self.partner.id = :id</domain>
		<context name="id" expr="eval: id"/>
	</action-view>
    
    <action-view name="action-partner-view-sales-orders" title="Sales orders" model="com.axelor.apps.supplychain.db.SalesOrder">
		<view type="grid" name="sales-order-grid"/>
		<view type="form" name="sales-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-partner-view-tickets" title="Tickets" model="com.axelor.apps.crm.db.Event">
		<view type="grid" name="ticket-grid"/>
		<view type="form" name="ticket-form"/>
		<domain>(self.clientPartner.id = :id OR self.contactPartner.id = :id) AND self.typeSelect = 5</domain>
		<context name="id" expr="eval: id"/>
	</action-view>
    
    <action-record name="action-partner-record-main-invoicing-address" model="com.axelor.apps.base.db.Partner">
    	<field name="mainInvoicingAddress" expr="eval: deliveryAddress" if="mainInvoicingAddress == null"/>
    </action-record>
    
 	<action-attrs name="action-partner-attrs-change-name">
		<attribute name="title" for="name" expr="Raison sociale" if="partnerTypeSelect != 2"/>
    	<attribute name="title" for="name" expr="Nom" if="partnerTypeSelect == 2"/>
		<attribute name="required" for="name" expr="true"/>	
	</action-attrs>
	
	<action-record name="action-partner-record-partner-type-select" model="com.axelor.apps.base.db.Partner" >
    	<field name="partnerTypeSelect" expr="eval:_partnerTypeSelect"/>
    </action-record>
    
    <action-record name="action-partner-record-full-name" model="com.axelor.apps.base.db.Partner" >
    	<field name="fullName" expr="eval: name + ' ' + firstName" if="name != null &amp;&amp; firstName != null"/>
    	<field name="fullName" expr="eval: name" if="name != null &amp;&amp; firstName == null"/>
    	<field name="fullName" expr="eval: firstName" if="firstName != null &amp;&amp; name == null"/>
    	<field name="fullName" expr="eval: id" if="firstName == null &amp;&amp; name == null"/>
    </action-record>
    
    <action-record name="action-partner-record-customer-supplier-type" model="com.axelor.apps.base.db.Partner">
    	<field name="customerTypeSelect" expr="eval: 1" />
    	<field name="supplierTypeSelect" expr="eval:1"/>
    </action-record>
    
    <action-record name="action-partner-record-set-default" model="com.axelor.apps.base.db.Partner">
    	<field name="currency" expr="eval:com.axelor.apps.base.db.UserInfo.all().filter('internalUser = ?1',__user__).fetchOne()?.activeCompany?.currency" if="!isContact"/>
    	<field name="invoiceSendingFormatSelect" expr="eval:'emailpaper'" if="!isContact"/>
    	<field name="userInfo"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserInfo()"/>
    	<field name="team"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserActiveTeam()"/>
    	<field name="companySet" expr="call:com.axelor.apps.base.web.PartnerController:getActiveCompany()"/>
    </action-record>
    
    <action-record name="action-partner-contact-record-default" model="com.axelor.apps.base.db.Partner">
    	<field name="partnerTypeSelect" expr="2" />
    	<field name="isContact" expr="true"/>
    	<field name="companySet" expr="eval: _parent?.companySet"/>
    	<field name="languageSelect" expr="eval: _parent?.languageSelect"/>
    	<field name="userInfo"  expr="eval: _parent.userInfo" if="_parent._model == 'com.axelor.apps.base.db.Partner'"/>
    	<field name="team"  expr="eval: _parent.team" if="_parent._model == 'com.axelor.apps.base.db.Partner'"/>
    	<field name="userInfo"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserInfo()" if="_parent == null || _parent._model != 'com.axelor.apps.base.db.Partner'"/>
    	<field name="team"  expr="call:com.axelor.apps.base.service.user.UserInfoService:getUserActiveTeam()" if="_parent == null || _parent._model != 'com.axelor.apps.base.db.Partner'"/>
    </action-record>
    
    <action-record name="action-partner-set-non-contact-fields" model="com.axelor.apps.base.db.Partner">
    	<field name="currency" expr="eval:null" if="!isContact"/>
    	<field name="invoiceSendingFormatSelect" expr="eval:null" if="!isContact"/>
    </action-record>
	
	<action-method name="action-set-partner-seq" >
		<call class="com.axelor.apps.base.web.PartnerController" method="setPartnerSequence"/>
	</action-method>
    
    <action-method name="action-print-compnay-phonebook" >
		<call class="com.axelor.apps.base.web.PartnerController" method="printCompanyPhonebook"/>
	</action-method>
	
	<action-method name="action-print-phonebook" >
		<call class="com.axelor.apps.base.web.PartnerController" method="printContactPhonebook"/>
	</action-method>
	
	<action-method name="action-partner-method-show-client-situation" >
		<call class="com.axelor.apps.base.web.PartnerController" method="printClientSituation"/>
	</action-method>
	
	<!-- CRM EVENTS REPORT FOR PARTNER -->
	<action-view title="CRM Activities" model="com.axelor.apps.base.db.Partner" name="portal.customer.crm.activities">
  		<view type="chart" name="chart.customer.crm.activities"/>
  		<context name="id" expr="eval: id"/>
	</action-view>
	
	<search-filters name="partner-filters" model="com.axelor.apps.base.db.Partner" title="Partner filters">
		<filter title="All Enterprises">
			<domain>self.partnerTypeSelect = 1 AND self.isContact = false</domain>
		</filter>
		<filter title="All Individuals">
			<domain>self.partnerTypeSelect = 2 AND self.isContact = false</domain>
		</filter>
		<filter title="All Prospects">
			<domain>self.customerTypeSelect = 2 AND self.isContact = false</domain>
		</filter>
		<filter title="All Clients">
			<domain>self.customerTypeSelect = 3 AND self.isContact = false</domain>
		</filter>
		<filter title="All Suppliers">
			<domain>self.supplierTypeSelect = 2 AND self.isContact = false</domain>
		</filter>
		<filter title="All qualified supplier">
			<domain>self.supplierTypeSelect = 3 AND self.isContact = false</domain>
		</filter>
	</search-filters>
	
	
</object-views>

{'fraction_non_alphanumeric': 0.17280091489564472, 'fraction_numerical': 0.005984942342514057, 'mean_word_length': 3.3228145340693747, 'pattern_counts': {'":': 0, '<': 851, '<?xml version=': 2, '>': 853, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6184861', 'n_tokens_mistral': 17305, 'n_tokens_neox': 16136, 'n_words': 2712}