<?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">

	<grid name="partner-grid" title="Partners" model="com.axelor.apps.base.db.Partner" orderBy="name">
		<toolbar>
			<button name="printPhoneBookBtn" title="Contact PhoneBook" icon="fa-print" onClick="action-print-phonebook"/>
			<button name="printCompanyPhoneBookBtn" title="Company PhoneBook" icon="fa-print" onClick="action-print-company-phonebook" if="__config__.app.isApp('employee')"/>
			<button name="checkDuplicateBtn" title="Check Duplicate" onClick="action-general-check-duplicate-records"/>
			<button name="replaceDuplicateBtn" title="Merge duplicated" onClick="action-validate-select-object-message,action-duplicate-object-wizard-open"/>
			<button name="advancedExportBtn" title="Advanced export" onClick="action-method-advanced-export-wizard-view"/>
		</toolbar>
    <field name="partnerSeq" width="120"/>
		<field name="simpleFullName"/>
		<field name="fixedPhone"/>
		<field name="emailAddress.address" title="Email"/>
		<field name="partnerCategory" grid-view="partner-category-grid" form-view="partner-category-form"/>
		<field name="fiscalPosition.code" title="Fiscal position"/>
		<field name="registrationCode" />
		<field name="mainAddress"/>
		<field name="companyStr" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<button name="scheduleEventBtn" title="Schedule Event" icon="fa-group" onClick="action-partner-view-schedule-event" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
		<button name="sendByEmailBtn" title="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
	</grid>

	<grid name="partner-customer-grid" title="Customers" model="com.axelor.apps.base.db.Partner" orderBy="name">
	 	<menubar>
      <menu name="partnerReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
        <item name="contactPhoneBookItem" title="Contact PhoneBook" action="action-print-phonebook"/>
        <item name="companyPhoneBookItem" title="Company phoneBook" action="action-print-company-phonebook" if="__config__.app.isApp('employee')"/>
      </menu>
      <menu name="partnerToolsMenu" title="Tools" icon="fa-wrench" showTitle="true">
	      <item name="checkDuplicateItem" title="Check Duplicate" action="action-general-check-duplicate-records"/>
	      <item name="mergeDuplicatedItem" title="Merge duplicated" action="action-validate-select-object-message,action-duplicate-object-wizard-open"/>
      </menu>
    </menubar>
		<field name="partnerSeq" width="120"/>
		<field name="simpleFullName"/>
		<field name="fixedPhone"/>
		<field name="emailAddress.address" placeholder="whatever@example.com" title="Email"/>
		<field name="partnerCategory" grid-view="partner-category-grid" form-view="partner-category-form"/>
		<field name="fiscalPosition.code" title="Fiscal position"/>
		<field name="registrationCode" />
		<field name="mainAddress"/>
		<field name="companyStr" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<button name="scheduleEventBtn" title="Schedule Event" icon="fa-group" onClick="action-partner-view-schedule-event" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
		<button name="sendByEmailBtn" title="Send Email"  icon="fa-envelope" onClick="action-send-by-email-with-template" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
	</grid>

	<grid name="partner-supplier-grid" title="Suppliers" model="com.axelor.apps.base.db.Partner" orderBy="name">
	  <menubar>
	    <menu name="partnerReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
	      <item name="contactPhoneBookItem" title="Contact PhoneBook" action="action-print-phonebook"/>
	      <item  name="companyPhoneBookItem" title="Company phoneBook" action="action-print-company-phonebook" if="__config__.app.isApp('employee')"/>
	    </menu>
	    <menu name="partnerToolsMenu" title="Tools" icon="fa-wrench" showTitle="true">
	      <item name="checkDuplicateItem" title="Check Duplicate" action="action-general-check-duplicate-records"/>
	      <item name="mergeDuplicatedItem" title="Merge duplicated" action="action-validate-select-object-message,action-duplicate-object-wizard-open"/>
	    </menu>
	  </menubar>
    <field name="partnerSeq" width="120" />
		<field name="simpleFullName"/>
		<field name="fixedPhone"/>
		<field name="emailAddress.address" placeholder="whatever@example.com" title="Email"/>
		<field name="partnerCategory" grid-view="partner-category-grid" form-view="partner-category-form"/>
		<field name="fiscalPosition.code" title="Fiscal position"/>
		<field name="registrationCode" />
		<field name="mainAddress"/>
		<field name="companyStr" if="__config__.app.getApp('base').getEnableMultiCompany()"/>
		<button name="scheduleEventBtn" title="Schedule Event" icon="fa-group" onClick="action-partner-view-schedule-event" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
		<button name="sendByEmailBtn" title="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template" if-module="axelor-crm"  if="__config__.app.isApp('crm')"/>
	</grid>

	<grid name="partner-contact-grid" title="Contacts" model="com.axelor.apps.base.db.Partner">
		<toolbar>
			<button name="checkDuplicateBtn" title="Check Duplicate" onClick="action-general-check-duplicate-records"/>
			<button name="replaceDuplicateBtn" title="Merge duplicated" onClick="action-validate-select-object-message,action-duplicate-object-wizard-open"/>
		</toolbar>
    	<field name="partnerSeq" width="120"/>
		<field name="simpleFullName"/>
		<field name="fixedPhone"/>
		<field name="mobilePhone"/>
		<field name="emailAddress.address" placeholder="whatever@example.com"
		  title="Email"/>
		<field name="mainPartner.simpleFullName" title="Main company"/>
		<field name="jobTitleFunction"/>
		<button name="scheduleEventBtn" title="Schedule Event" icon="fa-group" onClick="action-contact-partner-view-schedule-event" if-module="axelor-crm" if="__config__.app.isApp('crm')"/>
		<button name="sendByEmailBtn" title="Send Email" icon="fa-envelope" onClick="action-send-by-email-with-template" if-module="axelor-crm"  if="__config__.app.isApp('crm')"/>
	</grid>

	<grid name="partner-grid-group" title="Partner" model="com.axelor.apps.base.db.Partner" groupBy="user">
    	<field name="partnerSeq" width="120"/>
		<field name="simpleFullName"/>
		<field name="fixedPhone"/>
		<field name="mobilePhone"/>
		<field name="emailAddress.address" title="Email"/>
		<field name="user" form-view="user-form" grid-view="user-grid"/>
	</grid>

	<form name="partner-customer-form"  title="Customer" model="com.axelor.apps.base.db.Partner"
		  onNew="action-group-base-partner-onnew"
		  onLoad="action-group-partner-onload,action-partner-attrs-hide-customer-recovery"
		  onSave="action-partner-validate-partner-stock-settings-list" width="large">
		<panel-include view="partner-form" />
	</form>

	<form name="partner-supplier-form"  title="Supplier" model="com.axelor.apps.base.db.Partner"
		  onNew="action-group-base-partner-onnew"
		  onLoad="action-group-partner-onload" width="large">
		<panel-include view="partner-form" />
	</form>

	<form name="incl-event-actions-partner-form" title="Partner" model="com.axelor.apps.base.db.Partner" id="incl-event-actions-base-partner-form">
		<menubar>
			<menu name="partnerToolsMenu" title="Tools" icon="fa-wrench" showTitle="true">
				<item name="sendEmailItem" title="Send email" action="save,action-send-by-email-with-template" readonlyIf="id == null" if-module="axelor-message" />
			</menu>
		</menubar>
	</form>

	<form name="partner-form"  title="Partner" model="com.axelor.apps.base.db.Partner"
		  onNew="action-group-base-partner-onnew"
		  onLoad="action-group-partner-onload"
		  onSave="action-partner-iban-check-on-save" width="large">
        <toolbar>
            <button name="showMapBtn" title="Map" icon="fa-map-marker" onClick="action-partner-method-show-on-map" readonlyIf="!id"/>
        </toolbar>
		<menubar>
            <menu name="partnerReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
				<item name="envelopeItem" title="Envelope" action="save,action-partner-method-show-envelope" readonlyIf="id == null"/>
				<item name="customerSituationItem" title="Customer Situation" action="save,action-partner-method-show-client-situation" readonlyIf="id == null" showIf="isCustomer == true"  if-module="axelor-account"/>
			</menu>
		</menubar>
		<panel-include view="incl-event-actions-partner-form" />
		<panel name="mainPanel" >
			<panel name="imagePanel" colSpan="2">
				<field name="picture" showTitle="false" widget="Image" colSpan="12">
					<viewer>
						<![CDATA[
					    <div>
			    			<img width="80%" ng-show="record.picture" ng-src="{{$image('picture', 'content')}}" />
          					<img width="80%" ng-show="!record.picture && record.partnerTypeSelect != 2" src="img/company-default.jpg" />
          					<img width="80%" ng-show="!record.picture && record.partnerTypeSelect == 2 && record.titleSelect == 1" src="img/partner-m-default.png" />
          					<img width="80%" ng-show="!record.picture && record.partnerTypeSelect == 2 && record.titleSelect == 2" src="img/partner-w-default.png" />
        					<img width="80%" ng-show="!record.picture && record.partnerTypeSelect == 2 && (record.titleSelect > 2 || !record.titleSelect)" src="img/partner-default.png" />
     					</div>
					]]>
					</viewer>
				</field>
				<panel name="socialNetworkPanel" colSpan="12" showIf="fullName != null">
					<label name="googleLabel" title="&lt;a class='fa fa-google' href='http://www.google.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="facebookLabel" title="&lt;a class='fa fa-facebook' href='http://www.facebook.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="twitterLabel" title="&lt;a class='fa fa-twitter' href='http://www.twitter.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="linkedinLabel" title="&lt;a class='fa fa-linkedin' href='http://www.linkedin.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="youtubeLabel" title="&lt;a class='fa fa-youtube' href='http://www.youtube.com' target='_blank' /&gt;" colSpan="2"/>
				</panel>
			</panel>
			<panel name="generalInfoPanel" colSpan="10">
				<panel name="partnerInfoPanel" colSpan="12">
					<field name="simpleFullName" colSpan="7" showTitle="false" css="label-bold bold large">
						<hilite strong="true" if="true" color="primary"/>
						<editor x-show-titles="false">
						  <field name="partnerTypeSelect" showTitle="false" onChange="action-partner-partner-type-select-change,action-partner-method-set-social-network-url,action-partner-record-employee" colSpan="12" placeholder="Partner Type"/>
			              <panel name="companyPartnerNamePanel" showIf="partnerTypeSelect == 1" colSpan="12">
							<field name="name" showTitle="false" css="highlight" placeholder="Name" onChange="action-group-base-partner-contact-name-onchange" colSpan="12"/>
						  </panel>
			              <panel name="individualPartnerNamePanel" showIf="partnerTypeSelect == 2" colSpan="12">
			                <field name="titleSelect" showTitle="false" placeholder="Civility" colSpan="2"/>
			                <field name="name" showTitle="false" css="highlight" placeholder="Name" onChange="action-group-base-partner-contact-name-onchange" colSpan="5"/>
			                <field name="firstName" showTitle="false" css="highlight" placeholder="First name" onChange="action-group-base-partner-contact-name-onchange" colSpan="5"/>
			              </panel>
						</editor>
					</field>
          			<field name="partnerSeq" showTitle="false" colSpan="2" css="label-bold bold large"/>
					<button if="__config__.app.isApp('account')" name="$positiveBalanceBtn" title="Balance" colSpan="3" icon="fa-balance-scale" onClick="action-partner-view-show-move-lines" widget="info-button" showIf="id"/>
					<field name="$balance" hidden="true"/>
					<static name="duplicatePartnerText" hidden="true" colSpan="12"><![CDATA[<span class='label label-warning'>There is already a partner with this name.</span>]]></static>
				</panel>
				<field name="isProspect"  colSpan="2" widget="InlineCheckbox" hideIf="isContact || $readonly()" onChange="action-partner-attrs-unset-customer,action-partner-record-unset-factor"/>
				<field name="isEmployee" colSpan="2" widget="InlineCheckbox" hideIf="$readonly() || isCustomer || isSupplier || isCarrier || isFactor || partnerTypeSelect != 2" onChange="action-partner-account-attrs-hide-employee-account,action-partner-record-unset-factor"/>
				<field name="isCustomer" colSpan="2" widget="InlineCheckbox" hideIf="isContact || $readonly() || isEmployee" onChange="action-partner-record-invoices-copy-default-value,action-partner-account-attrs-hide-customer-account,action-partner-attrs-unset-prospect,action-partner-record-unset-factor"/>
				<field name="isSupplier" colSpan="2" widget="InlineCheckbox" hideIf="isContact || $readonly() || isEmployee" onChange="action-partner-account-attrs-hide-supplier-account,action-partner-record-unset-factor"/>
                <field name="isCarrier" colSpan="2" widget="InlineCheckbox" hideIf="isContact || $readonly() || isEmployee" if="__config__.app.isApp('stock')" onChange="action-partner-record-unset-factor" />
                <field name="isFactor" colSpan="2" widget="InlineCheckbox" hideIf="isContact || $readonly() || isEmployee" if="__config__.app.getApp('account')?.manageFactors" onChange="action-partner-record-set-factor" />
				<field name="$viewerPartnerType" showTitle="false" hideIf="isContact || !$readonly()" colSpan="12">
					<viewer depends="isProspect,isEmployee,isCustomer,isSupplier,isFactor,isCarrier">
						<![CDATA[
							<h4 style="text-align: right;">
								<span class="label label-default" style="background-color: #FC6355; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isProspect" x-translate>Prospect</span>
								<span class="label label-default" style="background-color: #5680FC; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isEmployee" x-translate>Employee</span>
								<span class="label label-default" style="background-color: #EF9D3F; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isCustomer" x-translate>Customer</span>
								<span class="label label-default" style="background-color: #7D54FC; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isSupplier" x-translate>Supplier</span>
								<span class="label label-default" style="background-color: #54FC62; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isFactor" x-translate>Factor</span>
								<span class="label label-default" style="background-color: #FF0000; margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="record.isCarrier" x-translate>Carrier</span>
							</h4>
                        ]]>
					</viewer>
				</field>
				<field name="isContact" hidden="true" colSpan="12" />
                <panel name="blockingPanel" hideIf="!$readonly()" colOffset="9" colSpan="3">
                    <field name="$activeBlockings" showTitle="false" colSpan="12">
                        <viewer><![CDATA[
                            <h4 style="text-align: right;">
                                <span ng-repeat="item in record.blockingList" class="label label-important" style="margin: 5px 0 !important; display: inline-table; line-height: initial;" ng-show="$moment(item.blockingToDate) > $moment(today)">
                                	<i class="fa fa-ban"/>
                                	<span x-translate>{{ {'1':'Remin._block','2':'Inv._block','3':'Reimb._block','4':'Debit_block','5':'Sale_block','6':'Purch._block'}[item.blockingSelect] }}</span>
                                	<!-- hidden spans only there for translation purposes -->
                                	<span x-translate style="display:none">Remin._block</span>
                                	<span x-translate style="display:none">Inv._block</span>
                                	<span x-translate style="display:none">Reimb._block</span>
                                	<span x-translate style="display:none">Debit_block</span>
                                	<span x-translate style="display:none">Sale_block</span>
                                	<span x-translate style="display:none">Purch._block</span>
                                	<i class="fa fa-caret-right" style="margin: 0 4px;"/>
                                	{{ item.blockingToDate | date:'dd/MM/yy' }}
                                </span>
                            </h4>
                        ]]></viewer>
                    </field>
                </panel>
			</panel>
		</panel>
		<panel-related name="contactPartnerSetPanel" field="contactPartnerSet" hideIf="!id || isContact || partnerTypeSelect == 2" domain="self.isContact = 'true' AND self in (SELECT p FROM Partner p join p.companySet c where c in :companySet)" form-view="partner-contact-form" grid-view="partner-contact-grid" />
		<panel-tabs name="mainPanelTab">
			<panel name="informationPanel" title="Information">
				<panel name="employeeAddressPanel" title="Contact address" colSpan="12" showIf="isEmployee">
					<field name="mainAddress" form-view="address-form" grid-view="address-grid">
						<editor x-show-titles="false">
							<field name="addressL2" x-bind="{{addressL2|uppercase}}" placeholder="e.g. Financial department, CEO"/>
							<field name="addressL3" x-bind="{{addressL3|uppercase}}" placeholder="e.g. Building A, Entry 2, 2nd Floor, Door 2E"/>
							<field name="addressL4" x-bind="{{addressL4|uppercase}}"/>
							<field name="addressL5" x-bind="{{addressL5|uppercase}}" placeholder="e.g. POB 254"/>
							<field name="city" canNew="true" onChange="action-address-change-city" form-view="city-form" grid-view="city-grid"/>
							<field name="addressL6" x-bind="{{addressL6|uppercase}}" required="true"/>
							<field name="addressL7Country" required="true" form-view="country-form" grid-view="country-grid"/>
						</editor>
					</field>
				</panel>
				<panel name="postalAddressesPanel" title="Postal addresses" colSpan="12" hideIf="isEmployee">
					<static name="invoiceAndDeliveryAddressText" hidden="true" colSpan="12"><![CDATA[<span class='label label-warning'>Please add an invoice address and a delivery address by default.</span>]]></static>
					<field name="partnerAddressList" colSpan="12" form-view="partner-address-form" grid-view="partner-address-grid">
						<editor x-show-titles="false">            
          					<panel colSpan="12"  css="field-append">
           						<label colSpan="12"  title="The following address is invalid. Please use '+' button to create a new one :" showIf="address == null || address.addressL4 == null" hidden="true" css="label-bold" name="addressHelperLabel"/>              
                				<panel colSpan="12" stacked="true" css="field-append">
                					<field name="address" form-view="address-form" grid-view="address-grid" canNew="true"/>
                					<field name="isInvoicingAddr" widget="toggle" hideIf="$readonly()" x-icon="fa-list-alt" />
                					<field name="isDeliveryAddr" widget="toggle" hideIf="$readonly()" x-icon="fa-shopping-cart" />
                					<field name="isDefaultAddr" widget="toggle" hideIf="$readonly()" x-icon="fa-star-o"  />
                					<field name="address.addressL4" hidden="true"/>
              					</panel>
          					</panel>           
          				</editor>
					</field>
					<spacer/>
					<field name="headOfficeAddress" if="__user__.activeCompany?.accountConfig?.displayHeadOfficeAddrOnInvoicePrinting"/>
				</panel>
				<panel name="generalContactDetailsPanel" title="General contact details" colSpan="12">
					<field name="fixedPhone" colSpan="3" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fixedPhone"/>
					<field name="fax" colSpan="3" placeholder="+33000000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fax"/>
					<field name="mobilePhone" colSpan="3" hideIf="partnerTypeSelect == 1" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-mobilePhone"/>
					<field name="emailAddress" canSelect="false" colSpan="6" form-view="email-address-simple-form" x-show-icons="false">
						<editor x-show-titles="false">
							<field name="address" colSpan="12" placeholder="whatever@example.com" pattern="^[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2,})$"/>
						</editor>
					</field>
					<field name="webSite" placeholder="http://www.url.com" pattern="^(?:http(?:s)?://)?\S+(?:\.\S+)+$"/>
				</panel>
				<panel name="partnerDetailsPanel" title="Partner Details" hideIf="isEmployee" colSpan="12" >
					<panel colSpan="6" name="partnerCategoryPanel">
						<field name="partnerCategory" widget="SuggestBox" colSpan="6" form-view="partner-category-form" grid-view="partner-category-grid"/>
						<field name="industrySector" colSpan="6" widget="SuggestBox" hideIf="partnerTypeSelect== 2"/>
						<field name="source" canEdit="false" colSpan="6" widget="SuggestBox" form-view="source-form" grid-view="source-grid"/>
						<field name="department" colSpan="6" hideIf="partnerTypeSelect== 2"/>
					</panel>
          <panel name="otherPartnerDetailsPanel">
            <field name="saleTurnover" hideIf="partnerTypeSelect== 2"/>
            <field name="nbrEmployees" hideIf="partnerTypeSelect== 2"/>
            <field name="registrationCode" hideIf="partnerTypeSelect== 2"/>
            <field name="mainActivityCode" hideIf="partnerTypeSelect== 2"/>
            <field name="taxNbr" hideIf="partnerTypeSelect== 2"/>
						<field name="paymentDelay" if-module="axelor-cash-management"  if="__config__.app.isApp('cash-management')"/>
            <field name="parentPartner" hideIf="partnerTypeSelect != 1" domain="self.isContact = false AND self.partnerTypeSelect = 1 AND self in (SELECT p FROM Partner p join p.companySet c where c in :companySet)" form-view="partner-form" grid-view="partner-grid"/>
						<field name="sellerCode" showIf="isFactor" if="__config__.app.isApp('account') &amp;&amp; __config__.app.getApp('account').getManageFactors()" />
					</panel>
				</panel>

				<panel name="employeePanel" hidden="true">
    				<button name="openEmployeeFormBtn" title="Open employee form" colSpan="6" onClick="action-partner-view-open-employee-form"/>
 		 		</panel>

				<panel name="settingsPanel" title="Settings" colSpan="12">
					<field name="language" colSpan="6" canEdit="false"/>
					<panel name="assignedToPanel" title="Assigned to" colSpan="12" >
						<field name="user" colSpan="6" form-view="user-form" onSelect="action-partner-attrs-user-group" grid-view="user-grid" hideIf="isEmployee" canNew="false" canEdit="false" canView="false"/>
						<field name="team" canEdit="false" colSpan="6" form-view="team-form" grid-view="team-grid" if="__config__.app.getApp('base').getTeamManagement()" hideIf="isEmployee"/>
						<field name="companySet" colSpan="12" widget="TagSelect" canNew="false" form-view="company-form" grid-view="company-grid"/>
					</panel>
				</panel>
				<panel name="notesPanel" title="Notes" colSpan="12">
					<field name="description" colSpan="12" height="8" showTitle="false" widget="Html"/>
				</panel>
			</panel>
			<panel name="paymentPanel" title="Invoicing/Payment" hideIf="isContact" if-module="axelor-account" colSpan="12"  if="__config__.app.isApp('account')">
				<panel-include view="incl-invoice-payment-partner-form" from="axelor-account"  if="__config__.app.isApp('invoice')" />
				<panel-include if-module="axelor-account" if="__config__.app.isApp('account') &amp;&amp; __config__.app.getApp('bank-payment')?.manageDirectDebitPayment"  view="incl-sepa-direct-debit-partner-form" from="axelor-account"/>
				<panel name="invoiceCommentsPanel" title="Comment to display on invoice" colSpan="12">
				  <field name="invoiceComments" widget="html" colSpan="12" showTitle="false"/>
				</panel>
				<panel name="descriptionToDisplayOnProformaPanel" title="Comment to display on proforma" colSpan="12">
				  <field name="proformaComments" widget="html" colSpan="12" showTitle="false"/>
				</panel>
			</panel>
			<panel-related name="accountingSituationListPanel" if-module="axelor-account" if="__config__.app.isApp('account')" field="accountingSituationList" title="Accounting situation" hideIf="isContact" colSpan="12" grid-view="accounting-situation-partner-grid" form-view="accounting-situation-partner-form" onSelect="action-account-accounting-situation-method-update-customer-account"/>
			<panel-include if-module="axelor-account" view="incl-blocking-partner-form" from="axelor-account"  if="__config__.app.isApp('account')" />
			<panel name="activitiesPanel" title="Activities" showIf="id != null" if-module="axelor-crm" onTabSelect="action-partner-method-view-emails" hideIf="isEmployee" if="__config__.app.isApp('crm')">
				<button name="showAllEventsBtn" title="Show all events" css="btn-custom text-left" icon="fa-tasks" onClick="action-partner-view-events" readonlyIf="id == null"/>
				<panel-include view="incl-activities-partner-form" from="axelor-crm" />
                <panel-include if-module="axelor-sale" view="incl-sales-partner-form" if="__config__.app.isApp('sale')" />
                <panel-include if-module="axelor-purchase" view="incl-purchases-partner-form" if="__config__.app.isApp('purchase')" />
				<field name="$emailsList" colSpan="12" type="many-to-many" target="com.axelor.apps.message.db.Message" title="Emails" canNew="false" canSelect="false" canRemove="false"/>
				<panel-dashlet name="marketingCampaignsPanel" action="action-partner-view-marketing-campaigns" if-module="axelor-marketing" if="__config__.app.isApp('marketing')" colSpan="12"/>
			</panel>
			<panel name="customerPanel" title="Customer" if-module="axelor-sale" showIf="isCustomer" if="__config__.app.isApp('sale')">
				<field name="saleOrderInformation"/>
				<field name="payerQuality" if-module="axelor-account"  if="__config__.app.isApp('account')" hideIf="isEmployee"/>
				<field name="salePartnerPriceList" canEdit="false" domain="self.typeSelect = 1" form-view="sale-partner-price-list-form" grid-view="partner-price-list-grid"/>
				<field name="chargeBackPurchaseSelect" colSpan="3" if-module="axelor-business-project" if="__config__.app.isApp('business-project')" />
				<field name="chargeBackPurchase" colSpan="3" showIf="chargeBackPurchaseSelect == 3" if-module="axelor-business-project" if="__config__.app.isApp('business-project')" />
				<panel name="clientPortalAccessPanel" title="Client portal access" if-module="axelor-client-portal" if="__config__.app.isApp('portal') &amp;&amp; __config__.app.getApp('portal').getPortalSelect() == 2">
					<field name="password" widget="password"/>
				</panel>
				<field name="factorizedCustomer" if="__config__.app.isApp('account') &amp;&amp; __config__.app.getApp('account').getManageFactors()" />
				<field name="customerCatalogList" colSpan="12" form-view="customer-catalog-partner-form" grid-view="customer-catalog-partner-grid" if-module="axelor-sale" if="__config__.app.isApp('sale') &amp;&amp; __config__.app.getApp('sale').getEnableCustomerCatalogMgt()"/>
				<panel name="saleOrderCommentsPanel" title="Comment to display on sale order" colSpan="12">
				  <field name="saleOrderComments" widget="html" colSpan="12" showTitle="false"/>
				</panel>
			</panel>
			<panel name="supplierPanel" title="Supplier" if-module="axelor-purchase" showIf="isSupplier" if="__config__.app.isApp('purchase')">
				<field name="purchaseOrderInformation"/>
				<field name="purchasePartnerPriceList" canEdit="false" domain="self.typeSelect = 2" form-view="purchase-partner-price-list-form" grid-view="partner-price-list-grid"/>
				<field name="supplierCatalogList" colSpan="12" x-can-copy="true" form-view="supplier-catalog-partner-form" grid-view="supplier-catalog-partner-grid" if-module="axelor-purchase" if="__config__.app.isApp('purchase') &amp;&amp; __config__.app.getApp('purchase').getManageSupplierCatalog()"/>
				<field name="supplierQualityRatingSelect" widget="ImageSelect" x-labels="false" colSpan="3"/>
				<field name="supplierArrivalProductQty" colSpan="3"/>
				<spacer name="supplierSpacer"/>
				<field name="partnerProductQualityRatingList" colSpan="12" grid-view="partner-product-quality-rating-grid" form-view="partner-product-quality-rating-form"/>
				<panel name="purchaseOrderCommentsPanel" title="Comment to display on purchase order" colSpan="12">
				  <field name="purchaseOrderComments" widget="html" colSpan="12" showTitle="false"/>
				</panel>
			</panel>
			<panel name="carrierPanel" title="Carrier" showIf="isCarrier">
				<field name="freightCarrierModeList" title="Freight Carrier Mode" form-view="freight-carrier-mode-freight-carrier-form" grid-view="freight-carrier-mode-freight-carrier-grid" colSpan="12"/>
			</panel>
            <panel name="deliveryPanel" title="Delivery" showIf="isSupplier || isCustomer" if="__config__.app.isApp('stock')" if-module="axelor-stock">
                <field name="deliveryDelay" showIf="isSupplier"/>
                <spacer name="deliveryDelaySpacer"/>
                <field name="shipmentMode" form-view="shipment-mode-form" grid-view="shipment-mode-grid" onChange="action-partner-record-empty-freight-carrier-mode" title="Shipment Mode"/>
                <field name="freightCarrierMode" domain="self.shipmentMode = :shipmentMode" onChange="action-partner-record-freight-carrier" form-view="freight-carrier-mode-form" grid-view="freight-carrier-mode-grid" readonlyIf="shipmentMode == null" title="Freight Carrier Mode"/>
                <field name="carrierPartner" form-view="partner-form" grid-view="partner-grid" title="Freight Carrier" readonly="true"/>
				<field name="isIspmRequired" hidden="true" showIf="isCustomer || isProspect"/>
							<field name="isNeedingConformityCertificate" showIf="isCustomer || isProspect"/>
				<field name="partnerStockSettingsList" colSpan="12"
					   form-view="partner-stock-settings-form" grid-view="partner-stock-settings-grid"/>
                <panel-include view="incl-freight-carrer-customer-account-number-list-partner-form"/>
                <panel name="deliveryCommentsPanel" title="Comment to display on delivery" colSpan="12">
                  <field name="deliveryComments" widget="html" colSpan="12" showTitle="false"/>
                </panel>
                <panel name="pickingOrderCommentsPanel" title="Comment to display on picking order" colSpan="12">
                  <field name="pickingOrderComments" widget="html" colSpan="12" showTitle="false"/>
	            </panel>
            </panel>
        </panel-tabs>
        <panel name="partnerAttrsPanel">
            <field name="partnerAttrs" colSpan="12" />
        </panel>
        <panel-mail name="mailsPanel">
            <mail-messages limit="4" />
            <mail-followers />
        </panel-mail>
    </form>

	<grid name="partner-light-grid" title="Contacts" model="com.axelor.apps.base.db.Partner">
		<field name="simpleFullName"/>
		<field name="fixedPhone"/>
		<field name="mobilePhone"/>
		<field name="emailAddress.address" title="Email"/>
	</grid>

	<form name="partner-light-form" title="Partner" model="com.axelor.apps.base.db.Partner"
		  onNew="action-group-base-partner-onnew"
		  onLoad="action-group-partner-onload" width="large">
		<toolbar>
			<button name="sendByEmailBtn" title="Send email" onClick="save,action-send-by-email-with-template"   readonlyIf="id == null"/>
		</toolbar>
		<panel name="mainPanel" >
			<field name="picture" widget="Image" colSpan="4"/>
			<panel name="generalInfoPanel" colSpan="8">
				<field name="titleSelect" hideIf="partnerTypeSelect != 2" css="highlight" />
				<spacer name="titleSelectSpacer"/>
				<field name="name" css="highlight" onChange="action-partner-record-simple-and-full-name"/>
				<field name="firstName" hideIf="partnerTypeSelect != 2" css="highlight" onChange="action-partner-record-simple-and-full-name"/>
				<field name="partnerCategory" widget="SuggestBox"/>
				<field name="partnerTypeSelect" onChange="action-partner-partner-type-select-change"/>
				<field name="isContact" hideIf="partnerTypeSelect != 2"/>
				<spacer name="isContactSpacer"/>
				<field name="mainPartner" hideIf="!isContact" form-view="partner-form" grid-view="partner-grid" domain="self in (SELECT p FROM Partner p join p.companySet c where c in :companySet)"/>
			</panel>
		</panel>
		<panel-tabs name="mainPanelTab">
			<panel name="informationPanel" title="Informations">
				<panel name="departmentPanel" title="Partner details" colSpan="12"  hideIf="partnerTypeSelect == 2">
					<field name="department" form-view="department-form" grid-view="department-grid"/>
					<field name="source" canEdit="false" hideIf="isContact" form-view="source-form" grid-view="source-grid"/>
				</panel>
				<panel colSpan="12" name="postalAddressesPanel" title="Postal addresses" hideIf="isContact">
					<static name="invoiceAndDeliveryAddressText" hidden="true" colSpan="12"><![CDATA[<span class='label label-warning'>Please add an invoice address and a delivery address by default.</span>]]></static>
					<field name="partnerAddressList" colSpan="12">
						<editor layout="table" x-show-titles="false">
							<field name="address" canNew="true"/>
							<field name="isInvoicingAddr" widget="toggle" x-icon="fa-list-alt" colSpan="1"/>
							<field name="isDeliveryAddr" widget="toggle" x-icon="fa-shopping-cart" colSpan="1"/>
							<field name="isDefaultAddr" widget="toggle" x-icon="fa-star-o" colSpan="1"/>
						</editor>
					</field>
				</panel>
				<panel name="contactPanel" title="Contact" colSpan="12">
					<field name="emailAddress" canSelect="false" form-view="email-address-simple-form" x-show-icons="false" placeholder="whatever@example.com" pattern="^[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2,})$">
						<editor x-show-titles="false">
							<field name="address"/>
						</editor>
					</field>
					<field name="fax" placeholder="+33000000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fax"/>
					<field name="fixedPhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fixedPhone"/>
					<field name="mobilePhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-mobilePhone"/>
					<field name="webSite" placeholder="http://www.url.com" pattern="^(?:http(?:s)?://)?\S+(?:\.\S+)+$"/>
				</panel>
			</panel>
		</panel-tabs>
	</form>


	<form name="partner-contact-form" title="Contact" model="com.axelor.apps.base.db.Partner"
		  onNew="action-partner-contact-record-default,action-partner-attrs-partner-seq-editable"
		  onLoad="action-group-partner-contact-onload"
		  onSave="save,action-partner-method-set-user-partner,action-partner-method-add-contact-partner">
		<toolbar>
			<button name="convertToIndividualPartnerBtn" title="Convert into an individual partner" icon="fa-user" onClick="action-convert-into-individual-partner,close" showIf="id != null &amp;&amp; isContact == true &amp;&amp; mainPartner == null"/>
		</toolbar>
		<menubar>
            <menu name="partnerReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
				<item name="envelopeItem" title="Envelope" action="save,action-partner-method-show-envelope" readonlyIf="id == null"/>
				<item name="customerSituationItem" title="Customer Situation" action="save,action-partner-method-show-client-situation" readonlyIf="id == null" showIf="isContact == false" if-module="axelor-account"/>
			</menu>
		</menubar>
		<panel-include view="incl-event-actions-partner-form" />
		<panel name="mainPanel" >
			<panel name="imagePanel" colSpan="3">
				<field name="picture" widget="Image" showTitle="false" colSpan="12">
					<viewer>
						<![CDATA[
					    <div>
			    			<img width="80%" ng-show="record.picture" ng-src="{{$image('picture', 'content')}}" />
          					<img width="80%" ng-show="!record.picture && record.titleSelect == 1" src="img/partner-m-default.png" />
          					<img width="80%" ng-show="!record.picture && record.titleSelect == 2" src="img/partner-w-default.png" />
        					<img width="80%" ng-show="!record.picture && (record.titleSelect > 2 || !record.titleSelect)" src="img/partner-default.png" />
     					</div>
					]]>
					</viewer>
				</field>
				<panel name="socialNetworkPanel" colSpan="12">
					<label name="googleLabel" title="&lt;a class='fa fa-google' href='http://www.google.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="facebookLabel" title="&lt;a class='fa fa-facebook' href='http://www.facebook.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="twitterLabel" title="&lt;a class='fa fa-twitter' href='http://www.twitter.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="linkedinLabel" title="&lt;a class='fa fa-linkedin' href='http://www.linkedin.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="youtubeLabel" title="&lt;a class='fa fa-youtube' href='http://www.youtube.com' target='_blank' /&gt;" colSpan="2"/>
				</panel>
			</panel>
			<panel name="namePanel" colSpan="9">
				<field name="fullName" css="bold" showTitle="false" colSpan="12">
					<editor x-show-titles="false">
						<field name="titleSelect" placeholder="Civility" colSpan="2"/>
						<field name="name" css="highlight" placeholder="Name"   onChange="action-group-base-partner-contact-name-onchange" colSpan="5"/>
						<field name="firstName" css="highlight" placeholder="First name"  onChange="action-group-base-partner-contact-name-onchange" colSpan="5"/>
					</editor>
				</field>
				<static name="duplicatePartnerText" hidden="true" colSpan="12"><![CDATA[<span class='label label-warning'>There is already a partner with this name.</span>]]></static>
				<field name="duplicatePartnerInArchiveText" hidden="true" type="string" showTitle="false" readonly="true">
					<viewer depends="duplicatePartnerInArchiveText">
					<![CDATA[
						<span class='label label-warning' style="margin: 5px 0 !important; display: inline-table; line-height: initial;"><span  x-translate>There is a partner with this name in the archive of reference : </span> {{record.duplicatePartnerInArchiveText}}</span>
					]]>
					</viewer>
				</field>
				<panel name="companyPanel" title="Company" colSpan="12" >
					<field name="mainPartner" domain="self.isContact = false  AND self in (SELECT p FROM Partner p join p.companySet c where c in :companySet)" form-view="partner-form" grid-view="partner-grid"/>
				</panel>
				<field name="isContact" hidden="true" colSpan="12"/>
			</panel>
		</panel>
		<panel-tabs name="mainPanelTab">
			<panel name="contactDetailsPanel" title="Contact details">
				<field name="jobTitleFunction"/>
				<field name="reportsTo" domain="self.isContact = true"/>
				<field name="fixedPhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fixedPhone"/>
				<field name="mobilePhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-mobilePhone"/>
				<field name="emailAddress" canSelect="false" form-view="email-address-simple-form" x-show-icons="false">
					<editor x-show-titles="false">
						<field name="address" placeholder="whatever@example.com" pattern="^[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2,})$" colSpan="12"/>
					</editor>
				</field>
				<field name="fax" placeholder="+33000000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fax"/>
				<field name="mainAddress" canNew="true" form-view="address-form" grid-view="address-grid" colSpan="12"/>
				<field name="timeSlot" colSpan="12"/>
			</panel>
			<panel name="activitiesPanel" title="Activities" showIf="id != null" if-module="axelor-crm" onTabSelect="action-partner-method-view-emails-contact" if="__config__.app.isApp('crm')" >
				<button name="showAllEventsBtn" title="Show all events" css="btn-custom text-left" icon="fa-tasks" onClick="action-contact-view-events" readonlyIf="id == null"/>
				<panel-include view="incl-activities-contact-form" from="axelor-crm" />
				<panel-include if-module="axelor-supplychain" view="incl-sales-contact-form" from="axelor-supplychain" if="__config__.app.isApp('supplychain')" />
				<field name="$emailsList" colSpan="12" type="many-to-many" target="com.axelor.apps.message.db.Message" title="Emails" canNew="false" canSelect="false" canRemove="false"/>
			</panel>
			<panel-dashlet name="contactPartnerPanel" action="action-contact-partner-dashlet" title="Partners"/>
		</panel-tabs>

		<panel name="employeePanel" hidden="true" sidebar="true">
        	<button name="openEmployeeFormBtn" title="Open employee form" onClick="action-partner-view-open-employee-form"/>
      	</panel>

		<panel name="settingsPanel" sidebar="true" title="Settings">
			<field name="partnerSeq"/>
			<field name="language" canEdit="false"/>
			<panel name="assignedToPanel" title="Assigned to" canCollapse="true" colSpan="12">
				<field name="user" colSpan="6" form-view="user-form" grid-view="user-grid" canNew="false" canEdit="false" canView="false"/>
				<field name="team" canEdit="false" colSpan="6" form-view="team-form" grid-view="team-grid" if="__config__.app.getApp('base').getTeamManagement()"/>
				<field name="companySet" colSpan="12" widget="TagSelect" canNew="false" form-view="company-form" grid-view="company-grid"/>
			</panel>
		</panel>
		<panel name="notesPanel" title="Notes" colSpan="12" sidebar="true">
			<field name="description" showTitle="false" colSpan="12" height="6" widget="Html"/>
		</panel>
		<panel name="contactAttrsPanel">
			<field name="contactAttrs" colSpan="12" />
		</panel>
		<panel-mail name="mailsPanel">
			<mail-messages limit="4" />
			<mail-followers />
		</panel-mail>
	</form>
	
	<form name="partner-contact-summary-form" title="Contact" model="com.axelor.apps.base.db.Partner">
		<panel name="mainPanel" >
			<field name="emailAddress" canSelect="false" form-view="email-address-simple-form" x-show-icons="false">
				<editor>
					<field name="address" placeholder="whatever@example.com" pattern="^[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2,})$"/>
				</editor>
			</field>
			<field name="fax" placeholder="+33000000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fax"/>
			<field name="fixedPhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fixedPhone"/>
			<field name="mobilePhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-mobilePhone"/>
			<field name="webSite" placeholder="http://www.url.com" pattern="^(?:http(?:s)?://)?\S+(?:\.\S+)+$"/>
		</panel>
	</form>

	<cards name="partner-cards" model="com.axelor.apps.base.db.Partner" title="Partners" css="rect-image">
		<field name="fullName" />
		<field name="picture" />
		<field name="fixedPhone"/>
		<field name="emailAddress.address" title="Email"/>
		<field name="partnerCategory" />
		<field name="partnerTypeSelect" />
		<field name="titleSelect" />
		<field name="fiscalPosition.code"/>
		<field name="registrationCode" />
		<field name="companyStr"/>
		<field name="mainAddress"/>
		<template><![CDATA[
			<div>
				<div class="span12"><strong>{{fullName}}</strong></div>
		 	</div>
			<div>
			  <div class="span4 card-image">
                <img ng-show="picture" ng-src="{{$image('picture', 'content')}}" />
                <img ng-show="!picture && partnerTypeSelect != 2" src="img/company-default.jpg" />
                <img ng-show="!picture && partnerTypeSelect == 2 && titleSelect == 1" src="img/partner-m-default.png" />
                <img ng-show="!picture && partnerTypeSelect == 2 && titleSelect == 2" src="img/partner-w-default.png" />
                <img ng-show="!picture && partnerTypeSelect == 2 && (titleSelect > 2 || !titleSelect)" src="img/partner-default.png" />
			  </div>
			  <div class="span8">
			  	{{registrationCode}}
			  	<address>
			  	{{mainAddress.fullName}}
			  	</address>
			    <span>
			    {{fixedPhone}}<br/>
			    {{emailAddress.address}}<br/>
			    {{partnerCategory.name}}<br/>
			    <strong><span x-translate>Companies</span></strong> : {{companyStr}}<br/>
			    <strong><span x-translate>Fiscal position</span></strong> : {{fiscalPosition.code}}</span>
			  </div>
			</div>
		]]>
		</template>
	</cards>

	<cards name="partner-contact-cards" model="com.axelor.apps.base.db.Partner" title="Contacts" css="rect-image">
		<toolbar>
			<button name="checkDuplicateBtn" title="Check Duplicate" onClick="action-general-check-duplicate-records"/>
		</toolbar>
		<field name="fullName" />
		<field name="picture" />
		<field name="fixedPhone"/>
		<field name="mobilePhone"/>
		<field name="emailAddress.address" title="Email"/>
		<field name="mainPartner.simpleFullName"/>
		<field name="partnerCategory" />
		<field name="mainAddress" />
		<field name="titleSelect" />
		<template><![CDATA[
			<div>
				<div class="span12"><strong>{{fullName}}</strong></div>
		 	</div>
			<div>
			  <div class="span4 card-image">
			    <img ng-show="picture" ng-src="{{$image('picture', 'content')}}" />
                <img ng-show="!picture && titleSelect == 1" src="img/partner-m-default.png" />
                <img ng-show="!picture && titleSelect == 2" src="img/partner-w-default.png" />
                <img ng-show="!picture && (titleSelect > 2 || !titleSelect)" src="img/partner-default.png" />
			  </div>
			  <div class="span8">
			    <span>{{mainAddress.fullName}}<br/>
			    <span ng-if="fixedPhone"><i class='fa fa-phone fa-flip-horizontal'/>  {{fixedPhone}}<br/></span>
			    <span  ng-if="mobilePhone"><i class='fa fa-mobile' style="margin-right:9px;"/>{{mobilePhone}}<br/></span>
			    {{emailAddress.address}}<br/>
			    <span  ng-if="mainPartner.simpleFullName"><strong><span x-translate>Companies</span></strong> : {{mainPartner.simpleFullName}}<br/></span>
			    {{partnerCategory.name}}</span>
			  </div>
			</div>
		]]>
		</template>
	</cards>

	<grid title="Employee List" name="partner-employee-grid" model="com.axelor.apps.base.db.Partner">
		<!-- name/firstName/fixedPhone/mobilePhone/emailAddress.address -->
		<field name="name"/>
		<field name="firstName"/>
		<field name="fixedPhone"/>
		<field name="mobilePhone"/>
		<field name="emailAddress.address" title="Email"/>
	</grid>

	<form name="partner-employee-form" title="Employee" model="com.axelor.apps.base.db.Partner"
		  onNew="action-partner-employee-record-default"
		  onLoad="action-partner-attrs-change-name,action-partner-method-set-social-network-url" onSave="save,action-partner-method-set-user-partner">
		<menubar>
            <menu name="partnerReportsMenu" title="Reports" icon="fa-files-o" showTitle="true">
				<item name="envelopeItem" title="Envelope" action="save,action-partner-method-show-envelope" readonlyIf="id == null"/>
				<item name="customerSituationItem" title="Customer Situation" action="save,action-partner-method-show-client-situation" readonlyIf="id == null" showIf="isContact == false" if-module="axelor-account"/>
			</menu>
		</menubar>
		<panel-include view="incl-event-actions-partner-form" />
		<panel name="mainPanel" >
			<panel name="imagePanel" colSpan="3">
				<field name="picture" widget="Image" showTitle="false" colSpan="12"/>
				<panel colSpan="12" name="socialNetworkPanel">
					<label name="googleLabel" title="&lt;a class='fa fa-google' href='http://www.google.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="facebookLabel" title="&lt;a class='fa fa-facebook' href='http://www.facebook.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="twitterLabel" title="&lt;a class='fa fa-twitter' href='http://www.twitter.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="linkedinLabel" title="&lt;a class='fa fa-linkedin' href='http://www.linkedin.com' target='_blank' /&gt;" colSpan="2"/>
					<label name="youtubeLabel" title="&lt;a class='fa fa-youtube' href='http://www.youtube.com' target='_blank' /&gt;" colSpan="2"/>
				</panel>
			</panel>
			<panel name="namePanel" colSpan="9">
				<field name="titleSelect" showTitle="false" placeholder="Civility" colSpan="2" />
				<field name="name" showTitle="false" css="highlight" placeholder="Name"   onChange="action-group-base-partner-contact-name-onchange" colSpan="5" />
				<field name="firstName" showTitle="false" css="highlight" placeholder="First name"  onChange="action-group-base-partner-contact-name-onchange" colSpan="5" />
				<static name="duplicatePartnerText" hidden="true" colSpan="12"><![CDATA[<span class='label label-warning'>There is already a partner with this name.</span>]]></static>
				<panel name="companyPanel" title="Company" colSpan="12" >
					<field name="mainPartner" domain="self.isContact = false  AND self in (SELECT p FROM Partner p join p.companySet c where c in :companySet)" form-view="partner-form" grid-view="partner-grid"/>
				</panel>
				<field name="isContact" hidden="true" colSpan="12"/>
				<field name="isEmployee" readonly="true" colSpan="12"/>
			</panel>
		</panel>
		<panel-tabs name="mainPanelTab">
			<panel name="contactDetailsPanel" title="Contact details">
				<field name="jobTitleFunction"/>
				<field name="reportsTo" domain="self.isContact = true"/>
				<field name="fixedPhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fixedPhone"/>
				<field name="mobilePhone" placeholder="+33100000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-mobilePhone"/>
				<field name="emailAddress" canSelect="false" form-view="email-address-simple-form" x-show-icons="false">
					<editor x-show-titles="false">
						<field name="address" placeholder="whatever@example.com" pattern="^[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9A-ZáàâäãåçéèêëíìîïñóòôöõúùûüýÿæœÁÀÂÄÃÅÇÉÈÊËÍÌÎÏÑÓÒÔÖÕÚÙÛÜÝŸÆŒ!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[a-z]{2,})$"/>
					</editor>
				</field>
				<field name="fax" placeholder="+33000000000" pattern="^\+?([\s()-.]*\d){7,}$" onChange="action-partner-method-normalize-fax"/>
				<field name="mainAddress" canNew="true" form-view="address-form" grid-view="address-grid"/>
			</panel>
			<panel name="activitiesPanel" title="Activities" showIf="id != null" if-module="axelor-crm" onTabSelect="action-partner-method-view-emails-contact" if="__config__.app.isApp('crm')">
				<panel-include view="incl-activities-contact-form" from="axelor-crm" />
				<panel-include if-module="axelor-supplychain" view="incl-sales-contact-form" from="axelor-supplychain" if="__config__.app.isApp('supplychain')" />
				<field name="$emailsList" colSpan="12" type="many-to-many" target="com.axelor.apps.message.db.Message" title="Emails" canNew="false" canSelect="false" canRemove="false"/>
			</panel>
			<panel-dashlet name="contactPartnerDetailsPanel" action="action-contact-partner-dashlet" title="Partners"/>
		</panel-tabs>
		<panel name="settingsPanel" sidebar="true" title="Settings">
			<field name="partnerSeq"/>
			<field name="language" canEdit="false"/>
			<panel name="assignedToPanel" title="Assigned to" canCollapse="true" colSpan="12">
				<field name="user" colSpan="6" form-view="user-form" grid-view="user-grid" canNew="false" canEdit="false" canView="false"/>
				<field name="team" canEdit="false" colSpan="6" form-view="team-form" grid-view="team-grid" if="__config__.app.getApp('base').getTeamManagement()"/>
				<field name="companySet" colSpan="12" widget="TagSelect" canNew="false" form-view="company-form" grid-view="company-grid"/>
			</panel>
		</panel>
		<panel name="notesPanel" title="Notes" colSpan="12" sidebar="true">
			<field name="description" showTitle="false" colSpan="12" height="6" widget="Html"/>
		</panel>
	</form>

	<action-group name="action-group-partner-onload">
		<action name="action-partner-attrs-change-name"/>
		<action name="action-partner-attrs-show-specific-tax-note"/>
		<action name="action-partner-method-set-social-network-url"/>
		<action name="action-partner-attrs-hide-employee-panel"/>
		<action name="action-partner-account-attrs-hide-supplier-account"/>
		<action name="action-partner-account-attrs-hide-customer-account"/>
		<action name="action-partner-account-attrs-hide-employee-account"/>
		<action name="action-partner-record-set-balance" if="__config__.app.isApp('account')"/>
		<action name="action-partner-record-set-positive-balance" if="__config__.app.isApp('account')"/>
		<action name="action-partner-attrs-name-balance"/>
		<action name="action-partner-attrs-partner-seq-editable"/>
        <action name="action-partner-method-check-name"/>
        <action name="action-partner-method-check-name-in-archive"/>
        <action name="action-partner-attrs-hide-invoice-and-delivery-address-text"/>
	</action-group>

	<action-group name="action-group-base-partner-onnew">
		<action name="action-partner-record-partner-type-select"/>
		<action name="action-partner-record-set-default"/>
		<action name="action-partner-attrs-set-default"/>
		<action name="action-partner-record-set-default-cash-management"/>
		<action name="action-partner-record-set-payment-modes"/>
		<action name="action-partner-record-payment-condition"/>
		<action name="action-partner-attrs-partner-seq-editable"/>
	</action-group>

	<action-group name="action-group-base-partner-contact-name-onchange">
		<action name="action-partner-method-check-name"/>
		<action name="action-partner-method-check-name-in-archive"/>
		<action name="action-partner-record-simple-and-full-name"/>
		<action name="action-partner-method-set-social-network-url"/>
	</action-group>

	<action-method name="action-partner-method-check-name">
		<call class="com.axelor.apps.base.web.PartnerController" method="checkPartnerName"/>
	</action-method>

	<action-method name="action-partner-method-check-name-in-archive">
		<call class="com.axelor.apps.base.web.PartnerController" method="checkPartnerNameArchived"/>
	</action-method>

	<action-method name="action-partner-method-show-envelope">
		<call class="com.axelor.apps.base.web.PartnerController" method="showEnvelope"/>
	</action-method>

	<action-method name="action-partner-method-set-social-network-url">
		<call class="com.axelor.apps.base.web.PartnerController" method="setSocialNetworkUrl" />
	</action-method>

	<action-method name="action-partner-method-add-contact-partner">
		<call class="com.axelor.apps.base.web.PartnerController" method="addContactToPartner"/>
	</action-method>

	<action-method name="action-partner-method-set-user-partner">
		<call class="com.axelor.apps.base.web.UserController" method="setUserPartner"/>
	</action-method>

	<action-attrs name="action-partner-attrs-partner-seq-editable">
		<attribute name="readonly" for="partnerSeq" expr="__config__.app.getApp('base').getGeneratePartnerSequence()"/>
        <attribute name="readonly" for="companyPanel" expr="#{_parent != null &amp;&amp; _parent._model == 'com.axelor.apps.base.db.Partner'}"/>
	</action-attrs>

    <action-attrs name="action-partner-attrs-change-name">
        <attribute name="title" for="name" expr="Business name" if="partnerTypeSelect == __repo__(Partner).PARTNER_TYPE_COMPANY" />
        <attribute name="title" for="name" expr="Name" if="partnerTypeSelect == __repo__(Partner).PARTNER_TYPE_INDIVIDUAL" />
    </action-attrs>

   	<action-attrs name="action-partner-attrs-hide-invoice-and-delivery-address-text">
			<attribute name="hidden" for="invoiceAndDeliveryAddressText" expr="eval: partnerAddressList?.findAll{it.isInvoicingAddr}?.size() &gt; 0 &amp;&amp; partnerAddressList?.findAll{it.isDeliveryAddr}?.size() &gt; 0" />
    </action-attrs>

    <action-group name="action-partner-partner-type-select-change">
        <action name="action-partner-attrs-change-name"/>
        <action name="action-partner-empty-first-name" if="partnerTypeSelect != __repo__(Partner).PARTNER_TYPE_INDIVIDUAL" />
    </action-group>
    
    <action-group name="action-group-partner-contact-onload">
    	<action name="action-partner-attrs-hide-employee-panel"/>
    	<action name="action-partner-method-check-name"/>
    	<action name="action-partner-method-check-name-in-archive"/>
    	<action name="action-partner-attrs-change-name"/>
    	<action name="action-partner-method-set-social-network-url"/>
    	<action name="action-partner-attrs-partner-seq-editable"/>
    </action-group>

    <action-record name="action-partner-empty-first-name" model="com.axelor.apps.base.db.Partner">
        <field name="firstName" expr="eval: null" />
    </action-record>

	<action-attrs name="action-partner-attrs-hide-contact-partner">
		<attribute name="hidden" for="contactPartner" expr="#{clientPartner != null &amp;&amp; clientPartner.partnerTypeSelect == 2}" />
	</action-attrs>

	<action-attrs name="action-partner-attrs-unset-prospect">
		<attribute name="value" for="isProspect" expr="eval:false" if="isCustomer"/>
	</action-attrs>

	<action-attrs name="action-partner-attrs-unset-customer">
		<attribute name="value" for="isCustomer" expr="eval:false" if="isProspect"/>
	</action-attrs>

	<action-attrs name="action-partner-attrs-name-balance">
		<attribute name="title" for="$positiveBalanceBtn" expr="eval: com.axelor.i18n.I18n.get('Debit Balance')" if="$balance &gt; 0"/>
		<attribute name="title" for="$positiveBalanceBtn" expr="eval: com.axelor.i18n.I18n.get('Credit Balance')" if="$balance &lt; 0"/>
		<attribute name="title" for="$positiveBalanceBtn" expr="eval: com.axelor.i18n.I18n.get('Balance')" if="$positiveBalanceBtn == 0"/>
	</action-attrs>
	
	<action-attrs name="action-partner-attrs-set-default">
	  <attribute name="value:add" expr="call:com.axelor.apps.base.web.PartnerController:getActiveCompany()" for="companySet"/>
	</action-attrs>
	
	<action-attrs name="action-partner-attrs-set-domain">
		<attribute name="domain" for="partner" expr="eval: &quot; (self.isCustomer = true OR self.isSupplier = true OR self.isProspect = true) AND self.isEmployee = false &quot;"/>
	</action-attrs>
	
	<action-attrs name="action-partner-attrs-hide-customer-recovery">
		<attribute name="hidden" for="customerRecovery" expr="eval: accountingSituationList.every{accountingSituation -> accountingSituation.debtRecovery == null}"/>
	</action-attrs>

	<action-attrs name="action-partner-attrs-hide-employee-panel">
		<attribute name="hidden" for="employeePanel"
		expr="eval:!( __this__.employee != null &amp;&amp; __user__.employee != null  &amp;&amp;
		(__user__.employee.hrManager &amp;&amp;  __user__ == __this__.employee.managerUser))"/>
	</action-attrs>

    <action-record name="action-partner-record-set-balance"
        model="com.axelor.apps.base.db.Partner">
        <field name="$balance"
            expr="#{accountingSituationList.stream().map(
                    __config__.app.getApp('account').partnerBalConfigSelect == 3 ? (x -> x.balanceDueDebtRecoveryCustAccount)
                    : __config__.app.getApp('account').partnerBalConfigSelect == 2 ? (x -> x.balanceDueCustAccount)
                    : (x -> x.balanceCustAccount)
                ).sum()}"/>
    </action-record>
	
	<action-record name="action-partner-record-set-positive-balance" model="com.axelor.apps.base.db.Partner">
		<field name="$positiveBalanceBtn" expr="eval: $balance &lt; 0 ? $balance * -1 : $balance" if="$balance != null"/>
		<field name="$positiveBalanceBtn" expr="eval: 0" if="$balance == null"/>
	</action-record>

	<action-record name="action-partner-record-employee" model="com.axelor.apps.base.db.Partner">
		<field name="isEmployee" expr="eval: false" if="partnerTypeSelect == 1"/>
	</action-record>

	<action-record name="action-partner-record-invoices-copy-default-value" model="com.axelor.apps.base.db.Partner" if-module="axelor-account">
		<field name="invoicesCopySelect" expr="eval:1" if="isCustomer &amp;&amp; __config__.app.isApp('account')"/>
	</action-record>

	<action-record name="action-partner-record-partner-type-select" model="com.axelor.apps.base.db.Partner" >
		<field name="partnerTypeSelect" expr="#{__user__.activeCompany.defaultPartnerTypeSelect}"/>
	</action-record>
	
	<action-record name="action-partner-record-simple-and-full-name" model="com.axelor.apps.base.db.Partner" >
		<field name="simpleFullName" expr="call:com.axelor.apps.base.service.PartnerService:computeSimpleFullName(__this__)"/>
		<field name="fullName" expr="call:com.axelor.apps.base.service.PartnerService:computeFullName(__this__)"/>
	</action-record>
	
	<action-record name="action-partner-record-set-default" model="com.axelor.apps.base.db.Partner">
		<field name="currency" expr="#{__user__.activeCompany.currency}" if="#{!isContact}"/>
		<field name="invoiceSendingFormatSelect" expr="#{'emailpaper'}" if="#{!isContact}" />
		<field name="user"  expr="#{__user__}"/>
		<field name="team"  expr="#{__user__.activeTeam}"/>
		<field name="language" expr="#{__config__.app.getApp('base').getDefaultPartnerLanguage()}" />
		<field name="isCustomer" expr="true" if="_isCustomer"/>
		<field name="isSupplier" expr="true" if="_isSupplier"/>
		<field name="isCarrier" expr="true" if="_isCarrier"/>
	</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="#{_parent.companySet}"/>
		<field name="language" expr="#{_parent != null ? _parent.language : __config__.app.getApp('base').getDefaultPartnerLanguage()}"/>
		<field name="user"  expr="#{_parent.user}" if="#{_parent != null &amp;&amp; _parent._model == 'com.axelor.apps.base.db.Partner'}"/>
		<field name="team"  expr="#{_parent.team}" if="#{_parent != null &amp;&amp; _parent._model == 'com.axelor.apps.base.db.Partner'}"/>
		<field name="user"  expr="#{__user__}" if="#{_parent == null || _parent._model != 'com.axelor.apps.base.db.Partner'}"/>
		<field name="team"  expr="#{__user__.activeTeam}" if="#{_parent == null || _parent._model != 'com.axelor.apps.base.db.Partner'}"/>
		<field name="companySet" expr="eval: __repo__(Company).all().fetchOne()" if="!__config__.app.getApp('base').getEnableMultiCompany()"/>
	</action-record>

	<action-record name="action-partner-employee-record-default" model="com.axelor.apps.base.db.Partner">
		<field name="partnerTypeSelect" expr="#{2}" />
		<field name="isContact" expr="#{false}"/>
		<field name="isEmployee" expr="#{true}"/>
		<field name="companySet" expr="#{__parent__.companySet}"/>
		<field name="language" expr="#{__parent__ != null ? __parent__.language : __config__.app.getApp('base').getDefaultPartnerLanguage()}"/>
		<field name="user"  expr="#{__parent__.user}" if="#{__parent__ &amp;&amp; __parent__._model == 'com.axelor.apps.base.db.Partner'}"/>
		<field name="team"  expr="#{__parent__.team}" if="#{__parent__ &amp;&amp; __parent__._model == 'com.axelor.apps.base.db.Partner'}"/>
		<field name="user"  expr="#{__user__}" if="#{__parent__ == null || __parent__._model != 'com.axelor.apps.base.db.Partner'}"/>
		<field name="team"  expr="#{__user__.activeTeam}" if="#{__parent__ == null || __parent__._model != 'com.axelor.apps.base.db.Partner'}"/>
		<field name="mainPartner" expr="#{__repo__(Partner).find(__parent__.id)}" if="#{__parent__ &amp;&amp; __parent__.id != null &amp;&amp; __parent__._model == 'com.axelor.apps.base.db.Partner'}"/>
	</action-record>

    <action-method name="action-partner-method-normalize-fixedPhone">
        <call class="com.axelor.apps.base.web.PartnerController" method="normalizePhoneNumber"/>
    </action-method>

    <action-method name="action-partner-method-normalize-fax">
        <call class="com.axelor.apps.base.web.PartnerController" method="normalizePhoneNumber"/>
    </action-method>

    <action-method name="action-partner-method-normalize-mobilePhone">
        <call class="com.axelor.apps.base.web.PartnerController" method="normalizePhoneNumber"/>
    </action-method>

	<action-record name="action-partner-record-empty-freight-carrier-mode" model="com.axelor.apps.base.db.Partner">
		<field name="freightCarrierMode" expr="eval:null"/>
		<field name="carrierPartner" expr="eval:null"/>
	</action-record>

	<action-record name="action-partner-record-freight-carrier" model="com.axelor.apps.base.db.Partner">
		<field name="carrierPartner" expr="eval:freightCarrierMode?.carrierPartner"/>
	</action-record>

	<action-record name="action-partner-record-set-payment-modes" model="com.axelor.apps.base.db.Partner" if-module="axelor-account">
		<field name="inPaymentMode" expr="eval: __user__?.activeCompany?.accountConfig?.inPaymentMode"/>
		<field name="outPaymentMode" expr="eval: __user__?.activeCompany?.accountConfig?.outPaymentMode"/>
	</action-record>

	<action-record name="action-partner-record-payment-condition" model="com.axelor.apps.base.db.Partner" if-module="axelor-account">
		<field name="paymentCondition" expr="eval: __user__?.activeCompany?.accountConfig?.defPaymentCondition"/>
	</action-record>

	<action-method name="action-print-company-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-view-emails">
		<call class="com.axelor.apps.base.web.PartnerController" method="findPartnerMails"/>
	</action-method>

	<action-method name="action-partner-method-view-emails-contact">
		<call class="com.axelor.apps.base.web.PartnerController" method="findContactMails"/>
	</action-method>

	<action-method name="action-partner-iban-check-on-save">
		<call class="com.axelor.apps.base.web.PartnerController" method="checkIbanValidity"/>
	</action-method>

    <action-method name="action-partner-method-show-on-map">
        <call class="com.axelor.apps.base.web.PartnerController" method="showPartnerOnMap"/>
    </action-method>

	<action-view name="action-contact-partner-dashlet" title="Partners"  model="com.axelor.apps.base.db.Partner">
		<view type="grid" name="partner-grid"/>
		<view type="form" name="partner-form"/>
		<domain>self.contactPartnerSet.id = :_contactId</domain>
		<context name="_contactId" expr="eval: id"/>
	</action-view>

	<action-view name="action-partner-view-show-move-lines" title="Move lines" model="com.axelor.apps.account.db.MoveLine">
		<view type="grid" name="move-line-grid"/>
		<view type="form" name="move-line-form"/>
		<domain>self.partner.id = :partnerId AND self.account.useForPartnerBalance = true</domain>
		<context name="partnerId" expr="eval: id"/>
	</action-view>

	<action-view name="action-partner-view-open-employee-form" model="com.axelor.apps.hr.db.Employee" title="Employee">
    	<view name="employee-form" type="form"/>
        <view name="employee-grid" type="grid"/>
        <context name="_showRecord" expr="eval:employee.id"/>
   	</action-view>

	<action-method name="action-convert-into-individual-partner">
		<call class="com.axelor.apps.base.web.PartnerController" method="convertToIndividualPartner"/>
	</action-method>

    <action-record name="action-partner-record-unset-factor" model="com.axelor.apps.base.db.Partner">
        <field name="isFactor" expr="eval: false" />
    </action-record>

    <action-record name="action-partner-record-set-factor" model="com.axelor.apps.base.db.Partner">
        <field name="isProspect" expr="eval: false" />
        <field name="isEmployee" expr="eval: false" />
        <field name="isCustomer" expr="eval: false" />
        <field name="isSupplier" expr="eval: false" />
        <field name="isCarrier" expr="eval: false" />
    </action-record>

    <action-validate name="action-partner-validate-partner-stock-settings-list">
    	<alert message="Partner has duplicate stock settings for same company" if="partnerStockSettingsList != null &amp;&amp; partnerStockSettingsList.collect{it->it.company}.unique().size() &lt; partnerStockSettingsList.size"/>
    </action-validate>
   	 
   	<action-attrs name="action-partner-attrs-user-group" if-module="axelor-crm">
		<attribute name="domain" for="user" expr="eval: &quot;self.group IN (${__config__.app.getApp('crm').groupsAssignable?.collect{it.id}.join(',')})&quot;" if="__config__.app.getApp('crm').assignableUsers == 1"/>
	</action-attrs>
   	
	<search-filters name="partner-filters" model="com.axelor.apps.base.db.Partner" title="Partner filters">
	    <field name="partnerAddressList" hidden="true"/>
        <field name="mainAddress" title="Main address"/>
        <field name="isContact" title="Is a contact"/>
        <field name="simpleFullName" hidden="true"/>
        <field name="isCarrier" title="Is a carrier" if="__config__.app.isApp('stock')"/>
		<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.isProspect = true AND self.isContact = false</domain>
		</filter>
		<filter title="All Clients">
			<domain>self.isCustomer = true AND self.isContact = false</domain>
		</filter>
		<filter title="All Suppliers">
			<domain>self.isSupplier = true AND self.isContact = false</domain>
		</filter>
		<filter title="All Employees">
			<domain>self.isEmployee = true AND self.isContact = false</domain>
		</filter>
	</search-filters>


</object-views>
