[Product Services] Merged Services branch
authorAaron Calero <aaron.calero@openbravo.com>
Thu, 22 Oct 2015 16:04:57 +0200
changeset 28628 c0c71c2626d6
parent 28627 46c65da90714 (current diff)
parent 28626 6b13d8b64b05 (diff)
child 28629 d677d6d0d6a5
[Product Services] Merged Services branch
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
src-db/database/lib/dbsourcemanager.jar
src-db/database/model/tables/C_BPARTNER.xml
src-db/database/model/tables/C_ORDER.xml
src-db/database/model/tables/M_INOUT.xml
src-db/database/model/tables/M_PRODUCT.xml
src-db/database/sourcedata/AD_AUXILIARINPUT.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_MODULE.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
src-db/database/sourcedata/M_OFFER_TYPE.xml
src/org/openbravo/base/model/ModelProvider.java
src/org/openbravo/base/secureApp/LoginHandler.java
src/org/openbravo/erpCommon/security/SessionActive.java
--- a/referencedata/sampledata/QA_Testing/C_ORDERLINE.xml	Thu Oct 22 13:33:46 2015 +0200
+++ b/referencedata/sampledata/QA_Testing/C_ORDERLINE.xml	Thu Oct 22 16:04:57 2015 +0200
@@ -472,6 +472,8 @@
   <MANAGE_RESERVATION><![CDATA[N]]></MANAGE_RESERVATION>
   <MANAGE_PRERESERVATION><![CDATA[N]]></MANAGE_PRERESERVATION>
   <EXPLODE><![CDATA[N]]></EXPLODE>
+  <PRINT_DESCRIPTION><![CDATA[N]]></PRINT_DESCRIPTION>
+  <RELATE_ORDERLINE><![CDATA[N]]></RELATE_ORDERLINE>
 </C_ORDERLINE>
 
 <C_ORDERLINE>
@@ -3182,6 +3184,8 @@
   <MANAGE_RESERVATION><![CDATA[N]]></MANAGE_RESERVATION>
   <MANAGE_PRERESERVATION><![CDATA[N]]></MANAGE_PRERESERVATION>
   <EXPLODE><![CDATA[N]]></EXPLODE>
+  <PRINT_DESCRIPTION><![CDATA[N]]></PRINT_DESCRIPTION>
+  <RELATE_ORDERLINE><![CDATA[N]]></RELATE_ORDERLINE>
 </C_ORDERLINE>
 
 <C_ORDERLINE>
Binary file src-db/database/lib/dbsourcemanager.jar has changed
--- a/src-db/database/model/tables/M_PRODUCT.xml	Thu Oct 22 13:33:46 2015 +0200
+++ b/src-db/database/model/tables/M_PRODUCT.xml	Thu Oct 22 16:04:57 2015 +0200
@@ -384,7 +384,6 @@
       <column name="UNIQUE_PER_DOCUMENT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
-      </column>
       <column name="RELATEPRODCATTOSERVICE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
         <default/>
         <onCreateDefault/>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Oct 22 13:33:46 2015 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Oct 22 16:04:57 2015 +0200
@@ -261849,6 +261849,41 @@
 <!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--5E02C5CF3E894313AE8EF4A35287843D--></AD_COLUMN>
 
+<!--5E02C5CF3E894313AE8EF4A35287843D--><AD_COLUMN>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_COLUMN_ID><![CDATA[5E02C5CF3E894313AE8EF4A35287843D]]></AD_COLUMN_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <NAME><![CDATA[Overdue_Return_Days]]></NAME>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <DESCRIPTION><![CDATA[Indicates if a Service is Returnable how many days has the customer to return it after buying]]></DESCRIPTION>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <HELP><![CDATA[Indicates if a Service is Returnable how many days has the customer to return it after buying]]></HELP>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <COLUMNNAME><![CDATA[Overdue_Return_Days]]></COLUMNNAME>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_TABLE_ID><![CDATA[208]]></AD_TABLE_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <SEQNO><![CDATA[620]]></SEQNO>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_ELEMENT_ID><![CDATA[A11314C983E0497AA506DACC73FFB0C6]]></AD_ELEMENT_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <POSITION><![CDATA[96]]></POSITION>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--5E02C5CF3E894313AE8EF4A35287843D-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--5E02C5CF3E894313AE8EF4A35287843D--></AD_COLUMN>
+
 <!--5E168828581F4A39847C969F9D3646A1--><AD_COLUMN>
 <!--5E168828581F4A39847C969F9D3646A1-->  <AD_COLUMN_ID><![CDATA[5E168828581F4A39847C969F9D3646A1]]></AD_COLUMN_ID>
 <!--5E168828581F4A39847C969F9D3646A1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -343223,6 +343258,40 @@
 <!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ENTITY_ALIAS><![CDATA[sol.lineNo]]></ENTITY_ALIAS>
 <!--F2E3FEB60A004EB6A237CFE7F32C1262--></AD_COLUMN>
 
+<!--F2E3FEB60A004EB6A237CFE7F32C1262--><AD_COLUMN>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_COLUMN_ID><![CDATA[F2E3FEB60A004EB6A237CFE7F32C1262]]></AD_COLUMN_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <NAME><![CDATA[lineNo]]></NAME>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <HELP><![CDATA[Number of the line]]></HELP>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <COLUMNNAME><![CDATA[lineNo]]></COLUMNNAME>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_TABLE_ID><![CDATA[15EAF61631484A11B6921AB05A342E8B]]></AD_TABLE_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <FIELDLENGTH><![CDATA[10]]></FIELDLENGTH>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_ELEMENT_ID><![CDATA[800017]]></AD_ELEMENT_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262-->  <ENTITY_ALIAS><![CDATA[sol.lineNo]]></ENTITY_ALIAS>
+<!--F2E3FEB60A004EB6A237CFE7F32C1262--></AD_COLUMN>
+
 <!--F3068D25956B4C8093F10627B1AD71F5--><AD_COLUMN>
 <!--F3068D25956B4C8093F10627B1AD71F5-->  <AD_COLUMN_ID><![CDATA[F3068D25956B4C8093F10627B1AD71F5]]></AD_COLUMN_ID>
 <!--F3068D25956B4C8093F10627B1AD71F5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Oct 22 13:33:46 2015 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Oct 22 16:04:57 2015 +0200
@@ -26958,6 +26958,18 @@
 <!--F4F23BF40CD04B969BDCBE7860D3574E-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--F4F23BF40CD04B969BDCBE7860D3574E--></AD_MESSAGE>
 
+<!--F4F23BF40CD04B969BDCBE7860D3574E--><AD_MESSAGE>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <AD_MESSAGE_ID><![CDATA[F4F23BF40CD04B969BDCBE7860D3574E]]></AD_MESSAGE_ID>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <VALUE><![CDATA[ServicePriceRuleVersionNotFound]]></VALUE>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <MSGTEXT><![CDATA[No active and valid service price rule version found for Service Product:]]></MSGTEXT>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F4F23BF40CD04B969BDCBE7860D3574E-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--F4F23BF40CD04B969BDCBE7860D3574E--></AD_MESSAGE>
+
 <!--F572F66AA4F344769920F13B233D0B01--><AD_MESSAGE>
 <!--F572F66AA4F344769920F13B233D0B01-->  <AD_MESSAGE_ID><![CDATA[F572F66AA4F344769920F13B233D0B01]]></AD_MESSAGE_ID>
 <!--F572F66AA4F344769920F13B233D0B01-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/common/actionhandler/ServiceRelatedLinePriceActionHandler.java	Thu Oct 22 13:33:46 2015 +0200
+++ b/src/org/openbravo/common/actionhandler/ServiceRelatedLinePriceActionHandler.java	Thu Oct 22 16:04:57 2015 +0200
@@ -59,12 +59,16 @@
       final OrderLine orderLineToRelate = OBDal.getInstance().get(OrderLine.class,
           jsonRequest.getString("orderLineToRelateId"));
       String tabId = jsonRequest.getString("tabId");
+      boolean state = false;
+      if (jsonRequest.has("state") && jsonRequest.get("state") != JSONObject.NULL) {
+        state = jsonRequest.getBoolean("state");
+      }
       JSONObject deferredSale = null;
       BigDecimal serviceTotalAmount = ServicePriceUtils.getServiceAmount(serviceOrderline, amount,
           discounts, priceamount, relatedQty, unitDiscountsAmt);
       if (jsonRequest.has("orderLineToRelateId")
           && jsonRequest.get("orderLineToRelateId") != JSONObject.NULL
-          && !RFC_ORDERLINE_TAB_ID.equals(tabId)) {
+          && !RFC_ORDERLINE_TAB_ID.equals(tabId) && state) {
         deferredSale = ServicePriceUtils.deferredSaleAllowed(serviceOrderline, orderLineToRelate);
       }
       result.put("amount", serviceTotalAmount);
--- a/web/js/productServices.js	Thu Oct 22 13:33:46 2015 +0200
+++ b/web/js/productServices.js	Thu Oct 22 16:04:57 2015 +0200
@@ -28,7 +28,7 @@
 
 OB.ProductServices.onLoadGrid = function (grid) {
   OB.ProductServices.updateTotalLinesAmount(this.view.theForm);
-  OB.ProductServices.updateServicePrice(this.view, null);
+  OB.ProductServices.updateServicePrice(this.view, null, null);
 };
 
 OB.ProductServices.updateTotalLinesAmount = function (form) {
@@ -142,10 +142,10 @@
     }
   }
   OB.ProductServices.updateTotalLinesAmount(view.theForm);
-  OB.ProductServices.updateServicePrice(view, record);
+  OB.ProductServices.updateServicePrice(view, record, state);
 };
 
-OB.ProductServices.updateServicePrice = function (view, record) {
+OB.ProductServices.updateServicePrice = function (view, record, state) {
   var callback, totalServiceAmount = view.theForm.getItem('totalserviceamount'),
       orderLinesGrid = view.theForm.getItem('grid').canvas.viewGrid,
       recordId, contextInfo;
@@ -182,6 +182,7 @@
     relatedqty: view.theForm.getItem('totalrelatedqty').getValue(),
     unitdiscountsamt: view.theForm.getItem('totalUnitDiscountsAmt').getValue(),
     orderLineToRelateId: recordId,
-    tabId: contextInfo.inpTabId
+    tabId: contextInfo.inpTabId,
+    state: state
   }, {}, callback);
 };