<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<object-views xmlns="http://axelor.com/xml/ns/object-views"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd">
	
	<form name="app-sale-config-form" title="App sale" model="com.axelor.apps.base.db.AppSale" canDelete="false" canNew="false" width="large">
		<panel name="mainPanel">
			<field name="manageSalesUnits" widget="boolean-switch"/>
      		<field name="manageSaleOrderVersion" widget="boolean-switch" onChange="action-app-sale-attrs-manage-sale-order-version-onchange"/>
      		<field name="printingOnSOFinalization" widget="boolean-switch" readonlyIf="manageSaleOrderVersion" />
			<field name="productPackMgt" widget="boolean-switch"/>
			<field name="enableConfigurator" widget="boolean-switch"/>
			<field name="allowPendingOrderModification" widget="boolean-switch"/>
            <field name="manageMultipleSaleQuantity" widget="boolean-switch"/>
            <field  name="printingConfigPerSaleOrder" widget="boolean-switch"/>
            <field name="closeOpportunityUponSaleOrderConfirmation" widget="boolean-switch"/><field name="isEnabledProductDescriptionCopy" widget="boolean-switch"/>
            <field name="salemanSelect"/>
            <field name="enableCustomerCatalogMgt" widget="boolean-switch"/>
            <field name="isDisplaySaleOrderLineNumber" widget="boolean-switch"/>
		</panel>
		<panel name="actionsPanel">
			<button name="generateSaleConfigurationsBtn" colSpan="4" title="Generate sale configurations" onClick="save,com.axelor.apps.sale.web.AppSaleController:generateSaleConfigurations"/>
			<panel-dashlet name="saleConfigPanel" action="admin.root.conf.sale.config" colSpan="12"/>
		</panel>
		
		<panel-mail name="mailPanel">
			<mail-messages limit="4"/>
			<mail-followers/>
		</panel-mail>
	</form>
	
	<action-view name="admin.root.conf.sale.config" title="Sale configurations"
		model="com.axelor.apps.sale.db.SaleConfig" >
		<view type="grid" name="sale-config-grid" />
		<view type="form" name="sale-config-form"/>
	</action-view>

  <action-attrs name="action-app-sale-attrs-manage-sale-order-version-onchange">
    <attribute name="value" expr="eval: true" for="printingOnSOFinalization" if="manageSaleOrderVersion"/>
  </action-attrs>

</object-views>
