You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2020/05/31 06:52:12 UTC

[ofbiz-framework] branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed created (now 2ff8190)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a change to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git.


      at 2ff8190  Improved: removes useless "@deprecated No replacement" comments in Java code

This branch includes the following new commits:

     new 3f6e976  Fixed: Entering manually date in date-time field become unworkable (OFBIZ-10432)
     new 39d0b91  Improved: Clean how HTTP vs HTTPS is handled
     new 1f44bcd  Improved: Apply multi-block attr to each application (OFBIZ-11706)
     new 2621fd4  Fixed: showjGrowl called twice (OFBIZ-11720)
     new c020b56  Improved: Apply multi-block attr to each application (OFBIZ-11706)
     new ffede15  Improved: just remove trailing space
     new fa1c0eb  Improved: Converted getPaymentRunningTotal service from mini-lang to groovy DSL (OFBIZ-11488) Thanks Nitish Mishra for the patch and Devanshu Vyas for reporting and review.
     new a45f0f2  Improved: Refactor simple methods names as per naming convention best practices. (#137)
     new 05640f7  Improved: Apply multi-block attr to each application (OFBIZ-11706)
     new 3e4a2ec  Improved: Converted createPaymentContent, updatePaymentContent services from mini-lang to groovy. (#155)
     new ae2585c  Improved: Convert setContentStatus service from mini-lang to groovy DSL(OFBIZ-11365). Thanks Devanshu Vyas for the contribution.
     new d0fb482  Improved: Converted massChangePaymentStatus service from mini-lang to groovy. (OFBIZ-11498) Thanks Devanshu Vyas for reporting and Rushikesh Mawal for initial patch.
     new d5c7151  Improved: Converted createPaymentAndApplicationForParty service from mini-lang to groovy (OFBIZ-11491) Thanks Devanshu Vyas for reporting and Sourabh Punyani for providing the patch.
     new 452a893  Improved: Make shipment services loosely coupled with work-effort generation. (#132)
     new 71b4abe  Fixed: paginateOrderList does not find orders on next page specific to FindOrders.ftl (OFBIZ-11356) Adding the missing showAll flag in the paginateOrder form because of which the orders were not shown while submitting the next button. Thanks Michael Brohl for reporting the issue and Ankit Joshi for providing the patch
     new 36b4837  Improved: All the service level error messages for missing required field for humanares component. (OFBIZ-8716) Thanks Jagpreet for reporting and Prasheel for providing the initial patch
     new 835de70  Improved: Converted updatePayment service from mini-lang to groovy. (OFBIZ-11480) Thanks Devanshu Vyas for reporting and Priya Sharma for the patch.
     new 335b346  Fixed: Requesthandler exception is showing after clicking cancel/done button on editPerson screen (OFBIZ-10890) Set the value of missing parameter. Thanks Minal Phalak for reporting and providing the patch
     new c759ccd  Fixed: RuntimeException in getPartyNameForDate service for partyNameHistory.gender field(OFBIZ-11736)
     new 8a290d3  Improved: Added UI labels for success/error messages for humanres, marketing, order component. (OFBIZ-7696) Thanks Deepak Nigam for reporting and Sourabh Punyani for the patch.
     new 0caf66d  Improved: Converted createDownloadContent,updateDownloadContent services from mini-lang to groovy. (OFBIZ-11372)(OFBIZ-11373) Thanks Devanshu Vyas for reporting, Harman Kaur and Rahul for initial patch, Pawan for review.
     new 260ae0f  Improved: downgrades tasks.checkstyleMain.maxErrors to stop failures in Buildbot
     new ae3f166  Improved: quote menu
     new 7603d5c  Improved: Improved: Changed lineSplit value to 150. (OFBIZ-11737) Earlier it was 120, as per discussion over ML we decided to make it 150 instead.
     new 4f07148  Fixed: organisation tree in humanres doesn't show person names (OFBIZ-11677) (#121)
     new db463e7  Documented: datamodel markdown migration to asciidoc (OFBIZ-11574)
     new 9c54082  Improved: instructions to upgrade due to datamodel changes (OFBIZ-11719) (#162)
     new 2ff8190  Improved: removes useless "@deprecated No replacement" comments in Java code

The 28 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ofbiz-framework] 27/28: Improved: instructions to upgrade due to datamodel changes (OFBIZ-11719) (#162)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 9c540826486499ea1d0a206acbf2af424078ead3
Author: Pierre Smits <pi...@orrtiz.com>
AuthorDate: Tue May 26 13:51:05 2020 +0200

    Improved: instructions to upgrade due to datamodel changes (OFBIZ-11719) (#162)
---
 applications/datamodel/DATAMODEL_CHANGES.adoc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/applications/datamodel/DATAMODEL_CHANGES.adoc b/applications/datamodel/DATAMODEL_CHANGES.adoc
index ca21746..44e017f 100644
--- a/applications/datamodel/DATAMODEL_CHANGES.adoc
+++ b/applications/datamodel/DATAMODEL_CHANGES.adoc
@@ -43,7 +43,18 @@ The following file contains information about the data model changes in the Apac
 |Entity                 |Field   |Action |IsPK |Revision
 | GlXbrlClass | parentGlXbrlClassId | Added | No | 36a123a
 |=======================================================
+If in the list above fields are mentioned where 'IsPK' = yes, we advice to follow steps below for a successful upgrade:
 
+. Stop your OFBiz implementation
+. Go to the entity definition in the appropriate entitymodel.xml file
+. Disable temporarily the prim-key reference of the added field, and save the file
+. Restart the OFBiz implementation
+. Check with your RDBMS client that the new field is present in the table
+. Add values for the field in the table (if appropriate)
+. Stop the OFBiz implementation
+. Go back to the definition in the appropriate entitymodel.xml file
+. Enable the temporary disabled prim-key reference of the added field, and save the file
+. Check with your RDBMS client that the new field is part of the primary key defintion of the table
 
 === Migration Scripts
 1.  Migration service migrateProductPromoCodeEmail is implemented to migrate the


[ofbiz-framework] 22/28: Improved: downgrades tasks.checkstyleMain.maxErrors to stop failures in Buildbot

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 260ae0fb4f65c5c1d28db388658c6f10c290bcb6
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Sun May 24 12:37:41 2020 +0200

    Improved: downgrades tasks.checkstyleMain.maxErrors to stop failures in Buildbot
---
 build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.gradle b/build.gradle
index ebbbce1..e6ef484 100644
--- a/build.gradle
+++ b/build.gradle
@@ -286,7 +286,7 @@ checkstyle {
     // the sum of errors found last time it was changed after using the
     // ‘checkstyle’ tool present in the framework and in the official
     // plugins.
-    tasks.checkstyleMain.maxErrors = 37096
+    tasks.checkstyleMain.maxErrors = 37101
     // Currently there are a lot of errors so we need to temporarily
     // hide them to avoid polluting the terminal output.
     showViolations = false


[ofbiz-framework] 13/28: Improved: Converted createPaymentAndApplicationForParty service from mini-lang to groovy (OFBIZ-11491) Thanks Devanshu Vyas for reporting and Sourabh Punyani for providing the patch.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit d5c7151223df334c0d35b06990bfc569d37f693f
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat May 23 15:57:21 2020 +0530

    Improved: Converted createPaymentAndApplicationForParty service from mini-lang to groovy
    (OFBIZ-11491)
    Thanks Devanshu Vyas for reporting and Sourabh Punyani for providing the patch.
---
 .../groovyScripts/payment/PaymentServices.groovy   | 61 +++++++++++++++++++++-
 .../minilang/payment/PaymentServices.xml           | 59 ---------------------
 .../accounting/servicedef/services_payment.xml     |  4 +-
 3 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index 212207d..5e2749b 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -23,6 +23,7 @@ import org.apache.ofbiz.base.util.UtilProperties
 import org.apache.ofbiz.entity.condition.EntityCondition
 import org.apache.ofbiz.entity.condition.EntityOperator
 import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.service.ModelService
 import org.apache.ofbiz.service.ServiceUtil
 import java.sql.Timestamp
 
@@ -62,7 +63,65 @@ def createPayment() {
     result.paymentId = paymentId
     return result
 }
-
+def createPaymentAndApplicationForParty() {
+    paymentAmount = 0
+    List invoiceIds = []
+    Map result = success()
+    parameters.invoices.each { invoice ->
+        if ("INVOICE_READY" == invoice.statusId) {
+            Map serviceContext = dispatcher.getDispatchContext().makeValidContext('getInvoicePaymentInfoList', ModelService.IN_PARAM, invoice)
+            serviceContext.userLogin = userLogin
+            serviceResult = run service: 'getInvoicePaymentInfoList', with: serviceContext
+            if (ServiceUtil.isError(serviceResult)) return serviceResult
+            invoicePaymentInfo = serviceResult.invoicePaymentInfoList[0]
+            paymentAmount += invoicePaymentInfo.outstandingAmount
+        } else {
+            return error(UtilProperties.getMessage("AccountingUiLabels", "AccountingInvoicesRequiredInReadyStatus", parameters.locale))
+        }
+    }
+    if (paymentAmount > 0) {
+        serviceResult = run service: 'getPartyAccountingPreferences', with: parameters
+        if (ServiceUtil.isError(serviceResult)) return serviceResult
+        partyAcctgPreference = serviceResult.partyAccountingPreference
+        Map createPaymentMap = [:]
+        createPaymentMap.paymentTypeId = "VENDOR_PAYMENT"
+        createPaymentMap.partyIdFrom = parameters.organizationPartyId
+        createPaymentMap.currencyUomId = partyAcctgPreference.baseCurrencyUomId
+        createPaymentMap.partyIdTo = parameters.partyId
+        createPaymentMap.statusId = "PMNT_SENT"
+        createPaymentMap.amount = paymentAmount
+        createPaymentMap.paymentMethodTypeId = parameters.paymentMethodTypeId
+        createPaymentMap.paymentMethodId = parameters.paymentMethodId
+        createPaymentMap.paymentRefNum = parameters.checkStartNumber
+        createPaymentMap.userLogin = userLogin
+        serviceResult = run service: 'createPayment', with: createPaymentMap
+        if (ServiceUtil.isError(serviceResult)) return serviceResult
+        paymentId = serviceResult.paymentId
+        result.paymentId = paymentId
+
+        parameters.invoices.each {invoice ->
+        if ("INVOICE_READY" == invoice.statusId) {
+            Map serviceContext = dispatcher.getDispatchContext().makeValidContext('getInvoicePaymentInfoList', ModelService.IN_PARAM, invoice)
+            serviceContext.userLogin = userLogin
+            serviceResult = run service: 'getInvoicePaymentInfoList', with: serviceContext
+            if (ServiceUtil.isError(serviceResult)) return serviceResult
+            invoicePaymentInfo = serviceResult.invoicePaymentInfoList[0]
+            if (invoicePaymentInfo.outstandingAmount > 0) {
+                Map createPaymentApplicationMap = [:]
+                createPaymentApplicationMap.paymentId =  paymentId
+                createPaymentApplicationMap.amountApplied = invoicePaymentInfo.outstandingAmount
+                createPaymentApplicationMap.invoiceId = invoice.invoiceId
+                serviceResult = run service: 'createPaymentApplication', with: createPaymentApplicationMap
+                if (ServiceUtil.isError(serviceResult)) return serviceResult
+            }
+        }
+        invoiceIds.add(invoice.invoiceId)
+        }
+    }
+    result.invoiceIds = invoiceIds
+    result.amount =  paymentAmount
+    return result
+}
 def getPaymentRunningTotal(){
     paymentIds = parameters.paymentIds;
     runningTotal = 0;
diff --git a/applications/accounting/minilang/payment/PaymentServices.xml b/applications/accounting/minilang/payment/PaymentServices.xml
index ae862251..9ce7e3b 100644
--- a/applications/accounting/minilang/payment/PaymentServices.xml
+++ b/applications/accounting/minilang/payment/PaymentServices.xml
@@ -593,65 +593,6 @@ under the License.
         </if-empty>
     </simple-method>
 
-    <simple-method method-name="createPaymentAndApplicationForParty" short-description="create Payment and PaymentApplications for multiple invoices for one party">
-        <set field="paymentAmount" type="BigDecimal" value="0"/>
-        <iterate list="parameters.invoices" entry="invoice">
-            <if-compare field="invoice.statusId" operator="equals" value="INVOICE_READY" type="String">
-                <set-service-fields service-name="getInvoicePaymentInfoList" map="invoice" to-map="getInvoicePaymentInfoListCtx"/>
-                <call-service service-name="getInvoicePaymentInfoList" in-map-name="getInvoicePaymentInfoListCtx">
-                    <result-to-field result-name="invoicePaymentInfoList"/>
-                </call-service>
-                <first-from-list list="invoicePaymentInfoList" entry="invoicePaymentInfo"/>
-                <set field="paymentAmount" value="${paymentAmount + invoicePaymentInfo.outstandingAmount}"/>
-            <else>
-                <add-error>
-                    <fail-property resource="AccountingUiLabels" property="AccountingInvoicesRequiredInReadyStatus"/>
-                </add-error>
-                <check-errors/>
-            </else>
-            </if-compare>
-        </iterate>
-        <if-compare field="paymentAmount" operator="greater" type="BigDecimal" value="0">
-            <set-service-fields service-name="getPartyAccountingPreferences" map="parameters" to-map="getPartyAccountingPreferencesMap"/>
-            <call-service service-name="getPartyAccountingPreferences" in-map-name="getPartyAccountingPreferencesMap">
-                <result-to-field result-name="partyAccountingPreference" field="partyAcctgPreference"/>
-            </call-service>
-            <set field="createPaymentMap.paymentTypeId" value="VENDOR_PAYMENT"/>
-            <set field="createPaymentMap.partyIdFrom" from-field="parameters.organizationPartyId"/>
-            <set field="createPaymentMap.currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
-            <set field="createPaymentMap.partyIdTo" from-field="parameters.partyId"/>
-            <set field="createPaymentMap.statusId" value="PMNT_SENT"/>
-            <set field="createPaymentMap.amount" type="BigDecimal" from-field="paymentAmount"/>
-            <set field="createPaymentMap.paymentMethodTypeId" from-field="parameters.paymentMethodTypeId"/>
-            <set field="createPaymentMap.paymentMethodId" from-field="parameters.paymentMethodId"/>
-            <set field="createPaymentMap.paymentRefNum" type="String" from-field="parameters.checkStartNumber"/>
-            <call-service service-name="createPayment" in-map-name="createPaymentMap">
-                <result-to-field result-name="paymentId"/>
-                <result-to-result result-name="paymentId"/>
-            </call-service>
-            <iterate list="parameters.invoices" entry="invoice">
-                <if-compare field="invoice.statusId" operator="equals" value="INVOICE_READY">
-                    <set-service-fields service-name="getInvoicePaymentInfoList" map="invoice" to-map="getInvoicePaymentInfoListCtx"/>
-                    <call-service service-name="getInvoicePaymentInfoList" in-map-name="getInvoicePaymentInfoListCtx">
-                        <result-to-field result-name="invoicePaymentInfoList" field="invoicePaymentInfoList"/>
-                    </call-service>
-                    <first-from-list list="invoicePaymentInfoList" entry="invoicePaymentInfo"/>
-                    <if-compare field="invoicePaymentInfo.outstandingAmount" operator="greater" value="0">
-                        <set field="createPaymentApplicationMap.paymentId" from-field="paymentId"/>
-                        <set field="createPaymentApplicationMap.amountApplied" from-field="invoicePaymentInfo.outstandingAmount"/>
-                        <set field="createPaymentApplicationMap.invoiceId" from-field="invoice.invoiceId"/>
-                        <call-service service-name="createPaymentApplication" in-map-name="createPaymentApplicationMap"/>
-                    </if-compare>
-                </if-compare>
-                <field-to-list field="invoice.invoiceId" list="invoiceIds"/>
-                <clear-field field="createPaymentApplicationMap"/>
-            </iterate>
-        </if-compare>
-        <field-to-result field="invoiceIds"/>
-        <set field="amount" type="BigDecimal" from-field="paymentAmount"/>
-        <field-to-result field="amount"/>
-    </simple-method>
-
     <simple-method method-name="createFinAccoutnTransFromPayment" short-description="Creates a record for FinAccountTrans on creation of payment.">
         <set-service-fields service-name="createFinAccountTrans" map="parameters" to-map="createFinAccountTransMap"/>
         <set field="createFinAccountTransMap.finAccountTransTypeId" value="WITHDRAWAL"/>
diff --git a/applications/accounting/servicedef/services_payment.xml b/applications/accounting/servicedef/services_payment.xml
index e1c8344..00099dd 100644
--- a/applications/accounting/servicedef/services_payment.xml
+++ b/applications/accounting/servicedef/services_payment.xml
@@ -174,8 +174,8 @@ under the License.
         <attribute name="paymentGroupId" type="String" mode="OUT" optional="true"/>
         <attribute name="errorMessage" type="String" optional="true" mode="OUT"/>
     </service>
-    <service name="createPaymentAndApplicationForParty" engine="simple"
-            location="component://accounting/minilang/payment/PaymentServices.xml" invoke="createPaymentAndApplicationForParty" auth="true">
+    <service name="createPaymentAndApplicationForParty" engine="groovy"
+            location="component://accounting/groovyScripts/payment/PaymentServices.groovy" invoke="createPaymentAndApplicationForParty" auth="true">
         <description>create Payment and PaymentApplications for multiple invoices for one party</description>
         <attribute name="organizationPartyId" type="String" mode="INOUT" optional="true"/>
         <attribute name="partyId" type="String" mode="IN" optional="false"/>


[ofbiz-framework] 01/28: Fixed: Entering manually date in date-time field become unworkable (OFBIZ-10432)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 3f6e976c208718308a985f11b0ee1c52ef2159f7
Author: Pawan Verma <pa...@hotwaxsystems.com>
AuthorDate: Wed May 20 14:26:52 2020 +0530

    Fixed: Entering manually date in date-time field become unworkable
    (OFBIZ-10432)
    
    Thanks, Olivier for the report.
---
 themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
index fa549ea..ea4763d 100644
--- a/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/HtmlFormMacroLibrary.ftl
@@ -84,7 +84,7 @@ under the License.
     <#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
     <#if visualEditorEnable?has_content> data-toolbar="${buttons?default("maxi")}"</#if><#rt/>
     <#if language?has_content> data-language="${language!"en"}"</#if><#rt/>
-    <#if disabled?has_content> disabled="${disabled}"</#if><#rt/>
+    <#if disabled?has_content && disabled> disabled="disabled"</#if><#rt/>
     ><#t/>
     <#if value?has_content>${value}</#if><#t/>
   </textarea><#lt/>
@@ -98,7 +98,7 @@ under the License.
         <#if value?has_content> value="${value}"</#if>
         <#if size?has_content> size="${size}"</#if><#rt/>
         <#if maxlength?has_content>  maxlength="${maxlength}"</#if>
-        <#if disabled?has_content> disabled="${disabled}"</#if><#rt/>
+        <#if disabled?has_content && disabled> disabled="disabled"</#if><#rt/>
         <#if id?has_content> id="${id}_i18n"</#if>/><#rt/>
         <#local className = className + " date-time-picker"/>
     </#if>
@@ -198,7 +198,7 @@ under the License.
   <#list items as item>
     <span <@renderClass className alert />><#rt/>
       <input type="radio"<#if currentValue?has_content><#if currentValue==item.key> checked="checked"</#if><#if tabindex?has_content> tabindex="${tabindex}"</#if><#rt/>
-        <#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> checked="checked"</#if><#if disabled?has_content> disabled="${disabled}"</#if>
+        <#elseif noCurrentSelectedKey?has_content && noCurrentSelectedKey == item.key> checked="checked"</#if><#if disabled?has_content && disabled> disabled="disabled"</#if>
         name="${name?default("")?html}" value="${item.key?default("")?html}"<#if event?has_content> ${event}="${action}"</#if>/><#rt/>
       ${item.description}
     </span>


[ofbiz-framework] 21/28: Improved: Converted createDownloadContent, updateDownloadContent services from mini-lang to groovy. (OFBIZ-11372)(OFBIZ-11373) Thanks Devanshu Vyas for reporting, Harman Kaur and Rahul for initial patch, Pawan for review.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 0caf66d514bafd5d3d2eacde2bc68ea439aa7f47
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Mon May 25 13:37:16 2020 +0530

    Improved: Converted createDownloadContent,updateDownloadContent services from mini-lang to groovy.
    (OFBIZ-11372)(OFBIZ-11373)
    Thanks Devanshu Vyas for reporting, Harman Kaur and Rahul for initial patch, Pawan for review.
---
 .../groovyScripts/content/ContentServices.groovy     | 20 +++++++++++++++++++-
 .../content/minilang/content/ContentServices.xml     | 19 -------------------
 applications/content/servicedef/services.xml         |  4 ++--
 3 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/applications/content/groovyScripts/content/ContentServices.groovy b/applications/content/groovyScripts/content/ContentServices.groovy
index fef62e4..c9680dd 100644
--- a/applications/content/groovyScripts/content/ContentServices.groovy
+++ b/applications/content/groovyScripts/content/ContentServices.groovy
@@ -18,7 +18,7 @@
  */
 
 import java.sql.Timestamp
- 
+
 import org.apache.ofbiz.common.UrlServletHelper
 import org.apache.ofbiz.entity.condition.EntityCondition
 import org.apache.ofbiz.entity.condition.EntityOperator
@@ -340,4 +340,22 @@ def setContentStatus() {
         return failure("No Content is not available in the system with content ID - " + parameters.contentId)
     }
     return resultMap
+}
+def createDownloadContent() {
+    Map serviceResult = success()
+    result = runService("createOtherDataResource", [dataResourceContent : parameters.file])
+    if (ServiceUtil.isError(result)) return result
+    Map serviceCtx = dispatcher.dispatchContext.makeValidContext("createContent", ModelService.IN_PARAM, parameters)
+    serviceCtx.dataResourceId = result.dataResourceId
+    result = runService("createContent", serviceCtx)
+    if (ServiceUtil.isError(result)) return result
+    serviceResult.contentId = result.contentId
+    return serviceResult;
+}
+def updateDownloadContent() {
+    Map result = success()
+    if(parameters.fileDataResourceId) {
+        result = runService("updateOtherDataResource", [dataResourceId: parameters.fileDataResourceId, dataResourceContent: parameters.file])
+    }
+    return result
 }
\ No newline at end of file
diff --git a/applications/content/minilang/content/ContentServices.xml b/applications/content/minilang/content/ContentServices.xml
index d920e1d..3ff187f 100644
--- a/applications/content/minilang/content/ContentServices.xml
+++ b/applications/content/minilang/content/ContentServices.xml
@@ -209,25 +209,6 @@
 
         <field-to-result field="createBodyAssoc.contentId" result-name="contentId"/>
     </simple-method>
-
-    <simple-method method-name="createDownloadContent" short-description="Create Download as Content">
-        <set-service-fields service-name="createContent" map="parameters" to-map="createDownloadContent"/>
-        <set from-field="parameters.file" field="createDownload.dataResourceContent"/>
-        <call-service service-name="createOtherDataResource" in-map-name="createDownload">
-            <result-to-field result-name="dataResourceId" field="createDownloadContent.dataResourceId"/>
-        </call-service>
-        <call-service service-name="createContent" in-map-name="createDownloadContent">
-            <result-to-result result-name="contentId"/>
-        </call-service>
-    </simple-method>
-    <simple-method method-name="updateDownloadContent" short-description="Update Download Content">
-        <if-not-empty field="parameters.fileDataResourceId">
-            <set from-field="parameters.fileDataResourceId" field="updateFile.dataResourceId"/>
-            <set from-field="parameters.file" field="updateFile.dataResourceContent"/>
-            <call-service service-name="updateOtherDataResource" in-map-name="updateFile"/>
-        </if-not-empty>
-    </simple-method>
-
     <simple-method method-name="createSimpleTextContent" short-description="Create Simple Text Content">
         <set-service-fields service-name="createContent" map="parameters" to-map="createSimpleTextContent"/>
         <set value="DOCUMENT" field="createSimpleTextContent.contentTypeId"/>
diff --git a/applications/content/servicedef/services.xml b/applications/content/servicedef/services.xml
index 43fede2..71a6b6c 100644
--- a/applications/content/servicedef/services.xml
+++ b/applications/content/servicedef/services.xml
@@ -143,7 +143,7 @@
         <attribute name="htmlBody" type="String" mode="IN" optional="true" allow-html="any"/>
     </service>
 
-    <service name="createDownloadContent" engine="simple" location="component://content/minilang/content/ContentServices.xml" invoke="createDownloadContent">
+    <service name="createDownloadContent" engine="simple" location="component://content/groovyScripts/content/ContentServices.groovy" invoke="createDownloadContent">
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="IN" entity-name="Content" optional="true"/>
         <attribute name="file" type="String" mode="IN" optional="false">
@@ -153,7 +153,7 @@
         </attribute>
         <override name="contentId" mode="INOUT"/>
     </service>
-    <service name="updateDownloadContent" engine="simple" location="component://content/minilang/content/ContentServices.xml" invoke="updateDownloadContent">
+    <service name="updateDownloadContent" engine="simple" location="component://content/groovyScripts/content/ContentServices.groovy" invoke="updateDownloadContent">
         <permission-service service-name="contentManagerPermission" main-action="UPDATE"/>
         <attribute name="fileDataResourceId" type="String" mode="IN" optional="true"/>
         <attribute name="file" type="String" mode="IN" optional="true"/>


[ofbiz-framework] 23/28: Improved: quote menu

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit ae3f166177c23649f977a5a2d928e081b03ddaf9
Author: Pierre Smits <pi...@orrtiz.com>
AuthorDate: Wed May 20 08:51:26 2020 +0200

    Improved: quote menu
    
    (OFBIZ-11715)
    
    updated: QuoteTabBar - simplified labels
    updated: moved 'Edit quote' menu item to QuoteSubTabBar
    updated: reordering of menu-items of QuoteTabBar
    updated: various UiLabels used by menu-items in QuoteTabBar
---
 applications/order/config/OrderUiLabels.xml       | 16 ++---
 applications/order/widget/ordermgr/OrderMenus.xml | 74 ++++++++++-------------
 framework/common/config/CommonUiLabels.xml        | 10 ++-
 3 files changed, 49 insertions(+), 51 deletions(-)

diff --git a/applications/order/config/OrderUiLabels.xml b/applications/order/config/OrderUiLabels.xml
index dddda46..8bc0fdc 100644
--- a/applications/order/config/OrderUiLabels.xml
+++ b/applications/order/config/OrderUiLabels.xml
@@ -8260,16 +8260,16 @@
         <value xml:lang="zh-TW">係數值</value>
     </property>
     <property key="OrderOrderQuoteCoefficients">
-        <value xml:lang="de">Angebotskoeffizienten</value>
-        <value xml:lang="de-CH">Offertkoeffizienten</value>
-        <value xml:lang="en">Quote Coefficients</value>
+        <value xml:lang="de">Koeffizienten</value>
+        <value xml:lang="de-CH">Koeffizienten</value>
+        <value xml:lang="en">Coefficients</value>
         <value xml:lang="es">Coeficientes</value>
-        <value xml:lang="fr">Coefficients du devis</value>
-        <value xml:lang="it">Coefficienti Preventivo</value>
+        <value xml:lang="fr">Coefficients</value>
+        <value xml:lang="it">Coefficienti</value>
         <value xml:lang="ja">見積係数</value>
-        <value xml:lang="nl">Offerte coefficiënten</value>
-        <value xml:lang="pt-BR">Coeficientes de cotação</value>
-        <value xml:lang="ro">Coeficienti Oferta</value>
+        <value xml:lang="nl">coefficiënten</value>
+        <value xml:lang="pt-BR">Coeficientes</value>
+        <value xml:lang="ro">Coeficienti</value>
         <value xml:lang="ru">Коэффициенты предложения</value>
         <value xml:lang="th">ตัวลข</value>
         <value xml:lang="vi">Hệ số Báo giá</value>
diff --git a/applications/order/widget/ordermgr/OrderMenus.xml b/applications/order/widget/ordermgr/OrderMenus.xml
index cf74511..d98e9c9 100644
--- a/applications/order/widget/ordermgr/OrderMenus.xml
+++ b/applications/order/widget/ordermgr/OrderMenus.xml
@@ -132,31 +132,12 @@ under the License.
     </menu>
 
     <menu name="QuoteTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
-        <menu-item name="ViewQuote" title="${uiLabelMap.OrderViewQuote}">
+        <menu-item name="ViewQuote" title="${uiLabelMap.CommonQuote}">
             <link target="ViewQuote">
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
-        <menu-item name="EditQuote" title="${uiLabelMap.OrderOrderQuote}">
-            <condition>
-                <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
-            </condition>
-            <link target="EditQuote">
-                <parameter param-name="quoteId" from-field="quote.quoteId"/>
-            </link>
-        </menu-item>
-
-        <menu-item name="ListQuoteRoles" title="${uiLabelMap.OrderOrderQuoteRoles}">
-            <condition>
-                <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
-            </condition>
-            <link target="ListQuoteRoles">
-                <parameter param-name="quoteId" from-field="quote.quoteId"/>
-            </link>
-        </menu-item>
-
-        <menu-item name="ListQuoteItems" title="${uiLabelMap.OrderOrderQuoteItems}">
+        <menu-item name="ListQuoteItems" title="${uiLabelMap.CommonItems}">
             <condition>
                 <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
             </condition>
@@ -164,17 +145,7 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
-        <menu-item name="ListQuoteNotes" title="${uiLabelMap.OrderOrderQuoteNotes}">
-            <condition>
-                <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
-            </condition>
-            <link target="ListQuoteNotes">
-                <parameter param-name="quoteId" from-field="quote.quoteId"/>
-            </link>
-        </menu-item>
-
-        <menu-item name="ListQuoteAttributes" title="${uiLabelMap.OrderOrderQuoteAttributes}">
+        <menu-item name="ListQuoteAttributes" title="${uiLabelMap.CommonAttributes}">
             <condition>
                 <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
             </condition>
@@ -182,7 +153,6 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
         <menu-item name="ListQuoteCoefficients" title="${uiLabelMap.OrderOrderQuoteCoefficients}">
             <condition>
                 <and>
@@ -194,8 +164,7 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
-        <menu-item name="ManageQuotePrices" title="${uiLabelMap.OrderOrderQuotePrices}">
+        <menu-item name="ManageQuotePrices" title="${uiLabelMap.CommonPrices}">
             <condition>
                 <and>
                     <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
@@ -206,8 +175,7 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
-        <menu-item name="ListQuoteAdjustments" title="${uiLabelMap.OrderOrderQuoteAdjustments}">
+        <menu-item name="ListQuoteAdjustments" title="${uiLabelMap.CommonAdjustments}">
             <condition>
                 <and>
                     <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
@@ -218,8 +186,7 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
-        <menu-item name="ViewQuoteProfit" title="${uiLabelMap.OrderViewQuoteProfit}">
+        <menu-item name="ViewQuoteProfit" title="${uiLabelMap.CommonProfit}">
             <condition>
                 <if-has-permission permission="ORDERMGR" action="_QUOTE_PRICE"/>
             </condition>
@@ -227,8 +194,7 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-
-        <menu-item name="QuoteWorkEfforts" title="${uiLabelMap.OrderOrderQuoteWorkEfforts}">
+        <menu-item name="QuoteWorkEfforts" title="${uiLabelMap.CommonWorkEfforts}">
             <condition>
                 <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
             </condition>
@@ -236,7 +202,23 @@ under the License.
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
             </link>
         </menu-item>
-        <menu-item name="QuoteTerms" title="${uiLabelMap.OrderOrderQuoteTerms}">
+        <menu-item name="ListQuoteNotes" title="${uiLabelMap.CommonNotes}">
+            <condition>
+                <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
+            </condition>
+            <link target="ListQuoteNotes">
+                <parameter param-name="quoteId" from-field="quote.quoteId"/>
+            </link>
+        </menu-item>
+        <menu-item name="ListQuoteRoles" title="${uiLabelMap.CommonRoles}">
+            <condition>
+                <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
+            </condition>
+            <link target="ListQuoteRoles">
+                <parameter param-name="quoteId" from-field="quote.quoteId"/>
+            </link>
+        </menu-item>
+        <menu-item name="QuoteTerms" title="${uiLabelMap.PartyTerms}">
             <condition>
                 <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
             </condition>
@@ -248,6 +230,14 @@ under the License.
 
     <menu name="QuoteSubTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml"
         menu-container-style="button-bar button-style-2">
+        <menu-item name="EditQuote" title="${uiLabelMap.CommonEdit}">
+            <condition>
+                <if-compare operator="equals" value="QUO_CREATED" field="quote.statusId"/>
+            </condition>
+            <link target="EditQuote">
+                <parameter param-name="quoteId" from-field="quote.quoteId"/>
+            </link>
+        </menu-item>
         <menu-item name="quoteReport" title="${uiLabelMap.CommonPdf}">
             <link target="QuoteReport" target-window="_BLANK">
                 <parameter param-name="quoteId" from-field="quote.quoteId"/>
diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml
index b761ce9..41e5547 100644
--- a/framework/common/config/CommonUiLabels.xml
+++ b/framework/common/config/CommonUiLabels.xml
@@ -895,6 +895,14 @@
         <value xml:lang="zh-CN">應用</value>
         <value xml:lang="zh-TW">應用程式</value>
     </property>
+    <property key="CommonApplication">
+        <value xml:lang="de">Anwendung</value>
+        <value xml:lang="en">Applications</value>
+        <value xml:lang="fr">Application</value>
+        <value xml:lang="hi-IN">एप्प्लिकेशन्स</value>
+        <value xml:lang="it">Applicazione</value>
+        <value xml:lang="nl">Toepassing</value>
+    </property>
     <property key="CommonApply">
         <value xml:lang="ar">تطبيق</value>
         <value xml:lang="cs">Použít</value>
@@ -13323,7 +13331,7 @@
         <value xml:lang="zh">人工服务</value>
     </property>
     <property key="CommonWorkEfforts">
-        <value xml:lang="en">Work Effort</value>
+        <value xml:lang="en">Work Efforts</value>
         <value xml:lang="nl">Activiteiten</value>
         <value xml:lang="zh">人工服务</value>
     </property>


[ofbiz-framework] 24/28: Improved: Improved: Changed lineSplit value to 150. (OFBIZ-11737) Earlier it was 120, as per discussion over ML we decided to make it 150 instead.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 7603d5ce8a2bcc1353a15debfe214f8c04f60752
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Mon May 25 17:24:30 2020 +0530

    Improved: Improved: Changed lineSplit value to 150.
    (OFBIZ-11737)
    Earlier it was 120, as per discussion over ML we decided to make it 150 instead.
---
 build.gradle                     | 2 +-
 config/checkstyle/checkstyle.xml | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/build.gradle b/build.gradle
index e6ef484..759327c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -286,7 +286,7 @@ checkstyle {
     // the sum of errors found last time it was changed after using the
     // ‘checkstyle’ tool present in the framework and in the official
     // plugins.
-    tasks.checkstyleMain.maxErrors = 37101
+    tasks.checkstyleMain.maxErrors = 27599
     // Currently there are a lot of errors so we need to temporarily
     // hide them to avoid polluting the terminal output.
     showViolations = false
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index 527945a..af7b1dc 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -22,7 +22,7 @@ under the License.
           "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
           "https://checkstyle.org/dtds/configuration_1_3.dtd">
 <!-- This configuration corresponds to the OFBiz coding conventions
-     which are simply “Sun Coding Standards” + “120 characters line length” -->
+     which are simply “Sun Coding Standards” + “150 characters line length” -->
 <module name="Checker">
     <module name="BeforeExecutionExclusionFileFilter">
         <property name="fileNamePattern" value="module\-info\.java$"/>
@@ -40,9 +40,9 @@ under the License.
        <property name="maximum" value="0"/>
        <property name="message" value="Line has trailing spaces."/>
     </module>
-        <module name="LineLength">
-            <property name="max" value="120"/>
-        </module>
+    <module name="LineLength">
+        <property name="max" value="150"/>
+    </module>
 
     <module name="TreeWalker">
         <!-- Naming conventions -->


[ofbiz-framework] 12/28: Improved: Converted massChangePaymentStatus service from mini-lang to groovy. (OFBIZ-11498) Thanks Devanshu Vyas for reporting and Rushikesh Mawal for initial patch.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit d0fb482257128b5471bb71f15218fcd6057a495c
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat May 23 15:23:13 2020 +0530

    Improved: Converted massChangePaymentStatus service from mini-lang to groovy.
    (OFBIZ-11498)
    Thanks Devanshu Vyas for reporting and Rushikesh Mawal for initial patch.
---
 .../accounting/groovyScripts/payment/PaymentServices.groovy | 13 +++++++++++++
 .../accounting/minilang/payment/PaymentServices.xml         | 10 ----------
 applications/accounting/servicedef/services_payment.xml     |  4 ++--
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index c28ce07..212207d 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -133,4 +133,17 @@ def updatePaymentContent() {
         return ServiceUtil.returnError("Error getting Payment Content")
     }
 }
+def massChangePaymentStatus() {
+    serviceResult = success()
+    Map setPaymentStatusMap = [:]
+    parameters.paymentIds.each{ paymentId ->
+        setPaymentStatusMap.paymentId = paymentId
+        setPaymentStatusMap.statusId = parameters.statusId
+        setPaymentStatusMap.userLogin = parameters.userLogin
+        result = run service: 'setPaymentStatus', with: setPaymentStatusMap
+        if (ServiceUtil.isError(result)) return result
+        setPaymentStatusMap.clear()
+    }
+    return serviceResult
+}
 
diff --git a/applications/accounting/minilang/payment/PaymentServices.xml b/applications/accounting/minilang/payment/PaymentServices.xml
index 1c32621..ae862251 100644
--- a/applications/accounting/minilang/payment/PaymentServices.xml
+++ b/applications/accounting/minilang/payment/PaymentServices.xml
@@ -785,16 +785,6 @@ under the License.
         </else>
         </if-not-empty>
     </simple-method>
-
-    <simple-method method-name="massChangePaymentStatus" short-description="Service set status of Payments in bulk.">
-        <iterate list="parameters.paymentIds" entry="paymentId">
-            <set field="setPaymentStatusMap.paymentId" from-field="paymentId"/>
-            <set field="setPaymentStatusMap.statusId" from-field="parameters.statusId"/>
-            <call-service service-name="setPaymentStatus" in-map-name="setPaymentStatusMap"/>
-            <clear-field field="setPaymentStatusMap"/>
-        </iterate>
-    </simple-method>
-
     <simple-method method-name="createPaymentFromOrder" short-description="Service auto create Payment from Order when payment does exist yet and not disabled by accounting config">
         <entity-one entity-name="OrderHeader" value-field="orderHeader"/>
 
diff --git a/applications/accounting/servicedef/services_payment.xml b/applications/accounting/servicedef/services_payment.xml
index dd9b2cd..e1c8344 100644
--- a/applications/accounting/servicedef/services_payment.xml
+++ b/applications/accounting/servicedef/services_payment.xml
@@ -227,8 +227,8 @@ under the License.
         <implements service="createPaymentGroupAndMember"/>
     </service>
     
-    <service name="massChangePaymentStatus" engine="simple"
-            location="component://accounting/minilang/payment/PaymentServices.xml" invoke="massChangePaymentStatus" auth="true">
+    <service name="massChangePaymentStatus" engine="groovy"
+        location="component://accounting/groovyScripts/payment/PaymentServices.groovy" invoke="massChangePaymentStatus" auth="true">
         <description>Set status of Payments in bulk.</description>
         <attribute name="paymentIds" type="List" mode="IN" optional="false"/>
         <attribute name="statusId" type="String" mode="IN" optional="false"/>


[ofbiz-framework] 08/28: Improved: Refactor simple methods names as per naming convention best practices. (#137)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit a45f0f26981a1cfdbfd81bc1d3f1eae5f4d86301
Author: Suraj Khurana <64...@users.noreply.github.com>
AuthorDate: Sat May 23 10:33:46 2020 +0530

    Improved: Refactor simple methods names as per naming convention best practices. (#137)
    
    (OFBIZ-11700)
---
 .../accounting/minilang/invoice/InvoiceServices.xml    | 18 +++++++++---------
 .../minilang/test/AutoAcctgTransTestsPurchase.xml      |  8 ++++----
 .../minilang/test/AutoAcctgTransTestsSales.xml         |  8 ++++----
 applications/order/minilang/order/OrderServices.xml    |  2 +-
 applications/order/minilang/test/ShoppingCartTests.xml |  2 +-
 applications/order/servicedef/services.xml             |  4 ++--
 .../imagemanagement/ImageManagementServices.xml        |  2 +-
 applications/product/servicedef/services.xml           |  2 +-
 8 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/applications/accounting/minilang/invoice/InvoiceServices.xml b/applications/accounting/minilang/invoice/InvoiceServices.xml
index 4629f1e..166b166 100644
--- a/applications/accounting/minilang/invoice/InvoiceServices.xml
+++ b/applications/accounting/minilang/invoice/InvoiceServices.xml
@@ -102,7 +102,7 @@ under the License.
     </simple-method>
 
     <simple-method method-name="updateInvoice" short-description="Update the header of an existing Invoice">
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
         <!-- find the current record -->
         <make-value entity-name="Invoice" value-field="lookupPKMap"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
@@ -150,7 +150,7 @@ under the License.
 
     <simple-method method-name="createInvoiceItem" short-description="Create a new Invoice Item">
         <set field="invoiceId" from-field="parameters.invoiceId"/>
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
         <make-value entity-name="InvoiceItem" value-field="newEntity"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
@@ -184,7 +184,7 @@ under the License.
     </simple-method>
     <simple-method method-name="updateInvoiceItem"
         short-description="Update an existing Invoice Item">
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
         <make-value entity-name="InvoiceItem" value-field="lookupPKMap"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
 
@@ -218,9 +218,9 @@ under the License.
         <field-to-result field="lookedUpValue.invoiceId" result-name="invoiceId"/>
     </simple-method>
     <simple-method method-name="removeInvoiceItem" short-description="Remove an existing Invoice Item">
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
         <set field="invoiceId" from-field="parameters.invoiceId"/>
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
 
         <set field="paymentApplicationMap.invoiceId" from-field="parameters.invoiceId"/>
         <set field="paymentApplicationMap.invoiceItemSeqId" from-field="parameters.invoiceItemSeqId"/>
@@ -328,7 +328,7 @@ under the License.
     </simple-method>
 
     <simple-method method-name="createInvoiceRole" short-description="Create a Invoice Role">
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
         <make-value entity-name="InvoiceRole" value-field="newEntity"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
@@ -337,7 +337,7 @@ under the License.
     </simple-method>
 
     <simple-method method-name="removeInvoiceRole" short-description="Remove existing Invoice Role">
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
         <entity-one entity-name="InvoiceRole" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
@@ -433,7 +433,7 @@ under the License.
     </simple-method>
 
     <simple-method method-name="createInvoiceTerm" short-description="Create a Invoice Term">
-        <call-simple-method method-name="InvoiceStatusInProgress"/>
+        <call-simple-method method-name="checkInvoiceStatusInProgress"/>
 
         <make-value entity-name="InvoiceTerm" value-field="newEntity"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
@@ -456,7 +456,7 @@ under the License.
     </simple-method>
 
     <!-- ===============subroutine services =================-->
-    <simple-method method-name="InvoiceStatusInProgress" short-description="Check if the invoiceStatus is in progress">
+    <simple-method method-name="checkInvoiceStatusInProgress" short-description="Check if the invoiceStatus is in progress">
         <!-- find the current header record -->
         <entity-one entity-name="Invoice" value-field="headerValue"/>
         <if-empty field="headerValue">
diff --git a/applications/accounting/minilang/test/AutoAcctgTransTestsPurchase.xml b/applications/accounting/minilang/test/AutoAcctgTransTestsPurchase.xml
index 7174d54..f6523a3 100644
--- a/applications/accounting/minilang/test/AutoAcctgTransTestsPurchase.xml
+++ b/applications/accounting/minilang/test/AutoAcctgTransTestsPurchase.xml
@@ -67,7 +67,7 @@ under the License.
 
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
+        <call-simple-method method-name="checkEntriesBalance"/>
 
         <iterate list="acctgTransEntryList" entry="acctgTransEntry">
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
@@ -133,7 +133,7 @@ under the License.
 
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
+        <call-simple-method method-name="checkEntriesBalance"/>
 
         <iterate list="acctgTransEntryList" entry="acctgTransEntry">
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
@@ -177,7 +177,7 @@ under the License.
 
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
+        <call-simple-method method-name="checkEntriesBalance"/>
 
         <iterate list="acctgTransEntryList" entry="acctgTransEntry">
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
@@ -198,7 +198,7 @@ under the License.
     </simple-method>
 
 
-    <simple-method method-name="UtilCheckEntriesBalance" login-required="false"
+    <simple-method method-name="checkEntriesBalance" login-required="false"
             short-description="Short util method that takes a list of AcctgTransEntry values (acctgTransEntryList) and checks that the debit and credit totals balance.">
         <set field="debitTotal" type="BigDecimal" value="0.0"/>
         <set field="creditTotal" type="BigDecimal" value="0.0"/>
diff --git a/applications/accounting/minilang/test/AutoAcctgTransTestsSales.xml b/applications/accounting/minilang/test/AutoAcctgTransTestsSales.xml
index e1095bd..b826d7e 100644
--- a/applications/accounting/minilang/test/AutoAcctgTransTestsSales.xml
+++ b/applications/accounting/minilang/test/AutoAcctgTransTestsSales.xml
@@ -68,7 +68,7 @@ under the License.
         <get-related list="acctgTransEntryList" relation-name="AcctgTransEntry" value-field="acctgTrans"/>
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
+        <call-simple-method method-name="checkEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
 
         <iterate list="acctgTransEntryList" entry="acctgTransEntry">
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
@@ -144,7 +144,7 @@ under the License.
 
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
+        <call-simple-method method-name="checkEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
 
         <set field="acctgTransEntryFilter.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
         <set field="acctgTransEntryFilter.glAccountId" value="120000"/>
@@ -168,7 +168,7 @@ under the License.
 
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
+        <call-simple-method method-name="checkEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
 
         <set field="acctgTransEntryFilter.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
         <set field="acctgTransEntryFilter.glAccountId" value="120000"/>
@@ -226,7 +226,7 @@ under the License.
 
         <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
 
-        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
+        <call-simple-method method-name="checkEntriesBalance" xml-resource="component://accounting/minilang/test/AutoAcctgTransTestsPurchase.xml"/>
 
         <iterate list="acctgTransEntryList" entry="acctgTransEntry">
             <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
diff --git a/applications/order/minilang/order/OrderServices.xml b/applications/order/minilang/order/OrderServices.xml
index a0c7eb1..f318825 100644
--- a/applications/order/minilang/order/OrderServices.xml
+++ b/applications/order/minilang/order/OrderServices.xml
@@ -1269,7 +1269,7 @@ under the License.
         </if-not-empty>
     </simple-method>
 
-    <simple-method method-name="MoveItemBetweenShipGroups" short-description="Move order items between ship groups">
+    <simple-method method-name="moveItemBetweenShipGroups" short-description="Move order items between ship groups">
         <entity-one entity-name="OrderItemShipGroupAssoc" value-field="orderItemShipGroupAssoc">
             <field-map field-name="orderId" from-field="parameters.orderId"/>
             <field-map field-name="orderItemSeqId" from-field="parameters.orderItemSeqId"/>
diff --git a/applications/order/minilang/test/ShoppingCartTests.xml b/applications/order/minilang/test/ShoppingCartTests.xml
index a881b14..0e4e08a 100644
--- a/applications/order/minilang/test/ShoppingCartTests.xml
+++ b/applications/order/minilang/test/ShoppingCartTests.xml
@@ -720,7 +720,7 @@ under the License.
         <set field="map.fromGroupIndex" value="00001"/>
         <set field="map.toGroupIndex" value="00002"/>
         <set field="map.quantity" value="2" type="BigDecimal"/>
-        <call-service service-name="MoveItemBetweenShipGroups" in-map-name="map"/>
+        <call-service service-name="moveItemBetweenShipGroups" in-map-name="map"/>
         
         <entity-one entity-name="OrderItemShipGroupAssoc" value-field="orderItemShipGroupAssoc1">
             <field-map field-name="orderId" from-field="orderMap.orderId"/>
diff --git a/applications/order/servicedef/services.xml b/applications/order/servicedef/services.xml
index 3ad4c59..76d5eb0 100644
--- a/applications/order/servicedef/services.xml
+++ b/applications/order/servicedef/services.xml
@@ -1567,8 +1567,8 @@ under the License.
         </attribute>
     </service>
     
-    <service name="MoveItemBetweenShipGroups" engine="simple" 
-        location="component://order/minilang/order/OrderServices.xml" invoke="MoveItemBetweenShipGroups">
+    <service name="moveItemBetweenShipGroups" engine="simple"
+        location="component://order/minilang/order/OrderServices.xml" invoke="moveItemBetweenShipGroups">
         <description>Move order items between ship groups</description>
         <attribute name="orderId" type="String" mode="IN"/>
         <attribute name="orderItemSeqId" type="String" mode="IN"/>
diff --git a/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml b/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml
index 5cf0d23..436c64d 100644
--- a/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml
+++ b/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml
@@ -21,7 +21,7 @@ under the License.
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
     
-    <simple-method method-name="UploadProductImages" short-description="Method to upload multiple images for product">
+    <simple-method method-name="uploadProductImages" short-description="Method to upload multiple images for product">
         <set-service-fields service-name="addMultipleuploadForProduct" map="parameters" to-map="addAdditionalViewForProductMap"/>
         <if-not-empty field="parameters._additionalImageOne_fileName">
             <set field="addAdditionalViewForProductMap.productId" from-field="parameters.productId"/>
diff --git a/applications/product/servicedef/services.xml b/applications/product/servicedef/services.xml
index 203a971..ac7f217 100644
--- a/applications/product/servicedef/services.xml
+++ b/applications/product/servicedef/services.xml
@@ -1388,7 +1388,7 @@ under the License.
     </service>
 
     <service name="multipleUploadProductImages" engine="simple"
-        location="component://product/minilang/product/imagemanagement/ImageManagementServices.xml" invoke="UploadProductImages" auth="true">
+        location="component://product/minilang/product/imagemanagement/ImageManagementServices.xml" invoke="uploadProductImages" auth="true">
         <description>Multiple upload Images For Product</description>
         <permission-service service-name="genericContentPermission" main-action="CREATE"/>
         <attribute name="productId" type="String" mode="INOUT" optional="false"/>


[ofbiz-framework] 06/28: Improved: just remove trailing space

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit ffede15c589ed6e0ac7d7635e2cae4a0ddf5e478
Author: holivier <ho...@apache.org>
AuthorDate: Fri May 22 11:44:23 2020 +0200

    Improved: just remove trailing space
---
 framework/widget/dtd/widget-form.xsd | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/framework/widget/dtd/widget-form.xsd b/framework/widget/dtd/widget-form.xsd
index 68a9829..9eb3efd 100644
--- a/framework/widget/dtd/widget-form.xsd
+++ b/framework/widget/dtd/widget-form.xsd
@@ -168,9 +168,9 @@ under the License.
             </xs:attribute>
             <xs:attribute type="xs:string" name="override-list-size">
                 <xs:annotation>
-                    <xs:documentation>The total number of rows in the original list (used for pagination). 
+                    <xs:documentation>The total number of rows in the original list (used for pagination).
                                       If not specified, the size of the list will be used. Accepts ${} notation.
-                                      You may use any value, true makes sense, when using performFindList, but one value must be passed. 
+                                      You may use any value, true makes sense, when using performFindList, but one value must be passed.
                     </xs:documentation>
                 </xs:annotation>
             </xs:attribute>
@@ -659,9 +659,9 @@ under the License.
             <xs:attribute type="xs:string" name="title">
                 <xs:annotation>
                     <xs:documentation>
-                        The name of this field that will be shown to the user. 
+                        The name of this field that will be shown to the user.
                         It can use the ${} and foo.bar (dot) syntax to insert values from the context for parameterization or internationalization.
-                        
+
                         Be sure a "FormFieldTitle_" labels does not already exist, else it will be overridden.
                     </xs:documentation>
                 </xs:annotation>
@@ -1035,7 +1035,7 @@ under the License.
     <xs:element name="display-entity" substitutionGroup="AllFields">
         <xs:annotation>
             <xs:documentation>
-                This is just like display but looks up a description using the Entity Engine; 
+                This is just like display but looks up a description using the Entity Engine;
                 note that if also-hidden is true then it uses the key as the value, not the shown description.
             </xs:documentation>
         </xs:annotation>
@@ -1049,7 +1049,7 @@ under the License.
             <xs:attribute type="xs:integer" name="size">
                 <xs:annotation>
                     <xs:documentation>
-                        Specifies the size of the field (as a number of characters), 
+                        Specifies the size of the field (as a number of characters),
                         when the text to display exceed the given size it is truncated and add the complete text as a hint
                      </xs:documentation>
                 </xs:annotation>
@@ -1231,7 +1231,7 @@ under the License.
                           type="xs:boolean" default="true">
                 <xs:annotation>
                     <xs:documentation>
-                        Tells the browser whether or not to try and autocomplete with values previously entered. 
+                        Tells the browser whether or not to try and autocomplete with values previously entered.
                         Default to true.
                     </xs:documentation>
                 </xs:annotation>
@@ -1244,7 +1244,7 @@ under the License.
             <xs:attribute name="presentation" default="layer">
                 <xs:annotation>
                     <xs:documentation>
-                        Shows the lookup as moveable and resizable layer or popup window. 
+                        Shows the lookup as moveable and resizable layer or popup window.
                         if set to none only autocompletion is active (no lookup form would be call)
                         Default to layer.
                     </xs:documentation>
@@ -1295,8 +1295,8 @@ under the License.
             </xs:attribute>
             <xs:attribute name="show-description" type="xs:boolean">
                 <xs:annotation>
-                    <xs:documentation>If true, a special span with css class "tooltip" will be created at right of the lookup button 
-                        and a description will fill in. 
+                    <xs:documentation>If true, a special span with css class "tooltip" will be created at right of the lookup button
+                        and a description will fill in.
                         If not set then it depends on the "widget.lookup.showDescription" setting.
                     </xs:documentation>
                 </xs:annotation>


[ofbiz-framework] 03/28: Improved: Apply multi-block attr to each application (OFBIZ-11706)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 1f44bcda85741c3e981a98e7204360541ed9d9af
Author: James Yong <ja...@apache.org>
AuthorDate: Thu May 21 00:07:36 2020 +0800

    Improved: Apply multi-block attr to each application (OFBIZ-11706)
    
    Revert regression for showHelp.
---
 themes/common-theme/template/includes/LookupFooter.ftl | 1 +
 themes/common-theme/widget/CommonScreens.xml           | 2 +-
 themes/common-theme/widget/HelpScreens.xml             | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/themes/common-theme/template/includes/LookupFooter.ftl b/themes/common-theme/template/includes/LookupFooter.ftl
index 638bbdf..1c9f388 100644
--- a/themes/common-theme/template/includes/LookupFooter.ftl
+++ b/themes/common-theme/template/includes/LookupFooter.ftl
@@ -17,4 +17,5 @@ specific language governing permissions and limitations
 under the License.
 -->
   </body>
+  <@scriptTemplateList/>
 </html>
diff --git a/themes/common-theme/widget/CommonScreens.xml b/themes/common-theme/widget/CommonScreens.xml
index b02d774..a7655d4 100644
--- a/themes/common-theme/widget/CommonScreens.xml
+++ b/themes/common-theme/widget/CommonScreens.xml
@@ -368,7 +368,7 @@ under the License.
                                 <if-compare value="layer" operator="not-equals" field="parameters.presentation"/>
                         </condition>
                             <widgets>
-                                <platform-specific><html><html-template multi-block="true" location="component://common-theme/template/includes/Lookup.ftl" /></html></platform-specific>
+                                <platform-specific><html><html-template location="component://common-theme/template/includes/Lookup.ftl" /></html></platform-specific>
                             </widgets>
                         </section>
                         <platform-specific><html><html-template location="${messagesTemplateLocation}"/></html></platform-specific>
diff --git a/themes/common-theme/widget/HelpScreens.xml b/themes/common-theme/widget/HelpScreens.xml
index 0c9563c..7385377 100644
--- a/themes/common-theme/widget/HelpScreens.xml
+++ b/themes/common-theme/widget/HelpScreens.xml
@@ -30,7 +30,7 @@ under the License.
                 <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC" default-value="component://common-theme/template/includes/Messages.ftl"/>
             </actions>
             <widgets>
-                <platform-specific><html><html-template multi-block="true" location="component://common-theme/template/includes/Lookup.ftl"/></html></platform-specific>
+                <platform-specific><html><html-template location="component://common-theme/template/includes/Lookup.ftl"/></html></platform-specific>
                 <platform-specific><html><html-template multi-block="true" location="${messagesTemplateLocation}"/></html></platform-specific>
                 <container style="contentarea">
                     <container id="column-container">


[ofbiz-framework] 16/28: Improved: All the service level error messages for missing required field for humanares component. (OFBIZ-8716) Thanks Jagpreet for reporting and Prasheel for providing the initial patch

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 36b48372ea2d8687a387b7bf143f8e5572e96ac1
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat May 23 17:06:18 2020 +0530

    Improved: All the service level error messages for missing required field for humanares component.
    (OFBIZ-8716)
    Thanks Jagpreet for reporting and Prasheel for providing the initial patch
---
 .../humanres/config/HumanResErrorUiLabels.xml      | 29 +++++++-
 applications/humanres/servicedef/services.xml      | 78 ++++++++++++++++++----
 2 files changed, 93 insertions(+), 14 deletions(-)

diff --git a/applications/humanres/config/HumanResErrorUiLabels.xml b/applications/humanres/config/HumanResErrorUiLabels.xml
index 4eda749..f521936 100644
--- a/applications/humanres/config/HumanResErrorUiLabels.xml
+++ b/applications/humanres/config/HumanResErrorUiLabels.xml
@@ -21,7 +21,34 @@
 
 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
     <property key="HumanResRequiredFieldMissingTrainingClassTypeId">
-    	<value xml:lang="de">benötigter Eintrag fehlt: Weiterbildungsklasse Typ ID.</value>
+        <value xml:lang="de">benötigter Eintrag fehlt: Weiterbildungsklasse Typ ID.</value>
+        <value xml:lang="en">Required Field Missing : Training Class Type Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingDescription">
+        <value xml:lang="en">Required Field Missing : Description.</value>
+    </property>
+    <property key="HRRequiredFieldMissingEmployeePartyId">
+        <value xml:lang="en">Required Field Missing : Employee Party Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingEmployeeRoleTypeId">
+        <value xml:lang="en">Required Field Missing : Employee Role Type Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingPartyId">
+        <value xml:lang="en">Required Field Missing : Party Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingPartyQualTypeId">
+        <value xml:lang="en">Required Field Missing : Party Qual Type Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingPeriodTypeId">
+        <value xml:lang="en">Required Field Missing : Period Type Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingPostalAddContactMechPurpTypeId">
+        <value xml:lang="en">Required Field Missing : Postal Address Contact Mech Purpose.</value>
+    </property>
+    <property key="HRRequiredFieldMissingPrefReviewID">
+        <value xml:lang="en">Required Field Missing : Pref Review Id.</value>
+    </property>
+    <property key="HRRequiredFieldMissingTrainingClassTypeId">
         <value xml:lang="en">Required Field Missing : Training Class Type Id.</value>
     </property>
 </resource>
\ No newline at end of file
diff --git a/applications/humanres/servicedef/services.xml b/applications/humanres/servicedef/services.xml
index d47bc17..e5340ad 100644
--- a/applications/humanres/servicedef/services.xml
+++ b/applications/humanres/servicedef/services.xml
@@ -28,8 +28,16 @@ under the License.
         <description>Create a Party Qualification entry</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
-        <attribute name="partyId" mode="IN" type="String"/>
-        <attribute name="partyQualTypeId" mode="IN" type="String"/>
+        <attribute name="partyId" mode="IN" type="String">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingPartyId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
+        <attribute name="partyQualTypeId" mode="IN" type="String">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingPartyQualTypeId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
         <attribute name="fromDate" mode="INOUT" type="Timestamp" optional="true"/>
     </service>
 
@@ -91,9 +99,21 @@ under the License.
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <attribute mode="IN" type="String" name="perfReviewId" optional="true"/>
-        <attribute mode="OUT" type="String" name="perfReviewId" optional="false"/>
-        <attribute mode="INOUT" type="String" name="employeePartyId" optional="false"/>
-        <attribute mode="INOUT" type="String" name="employeeRoleTypeId" optional="false"/>
+        <attribute mode="OUT" type="String" name="perfReviewId" optional="false">
+            <type-validate>
+                <fail-property property="NoPrefReviewId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
+        <attribute mode="INOUT" type="String" name="employeePartyId" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingEmployeePartyId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
+        <attribute mode="INOUT" type="String" name="employeeRoleTypeId" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingEmployeeRoleTypeId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
     </service>
 
     <service name="updatePerfReview" engine="entity-auto" default-entity-name="PerfReview" invoke="update" auth="true">
@@ -113,9 +133,21 @@ under the License.
         <description>Create Performance Review Item</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
-        <attribute mode="IN" type="String" name="employeePartyId" optional="false"/>
-        <attribute mode="IN" type="String" name="employeeRoleTypeId" optional="false"/>
-        <attribute mode="IN" type="String" name="perfReviewId" optional="false"/>
+        <attribute mode="IN" type="String" name="employeePartyId" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingEmployeePartyId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
+        <attribute mode="IN" type="String" name="employeeRoleTypeId" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingEmployeeRoleTypeId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
+        <attribute mode="IN" type="String" name="perfReviewId" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingPrefReviewID" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
         <attribute mode="OUT" type="String" name="perfReviewItemSeqId" optional="false"/>
     </service>
 
@@ -501,7 +533,11 @@ under the License.
         </auto-attributes>
         <attribute name="emailAddress" type="String" mode="IN" optional="true"/>
         <attribute name="fromDate" type="String" mode="IN" optional="true"/>
-        <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false"/>
+        <attribute name="postalAddContactMechPurpTypeId" type="String" mode="IN" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingPostalAddContactMechPurpTypeId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
         <attribute name="partyId" type="String" mode="OUT"/>
     </service>
 
@@ -575,7 +611,11 @@ under the License.
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <attribute name="rateAmount" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="rateCurrencyUomId" type="String" mode="IN" optional="true"/>
-        <attribute name="periodTypeId" type="String" mode="IN"/>
+        <attribute name="periodTypeId" type="String" mode="IN">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingPeriodTypeId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
         <override name="fromDate" optional="true"/>
     </service>
 
@@ -655,7 +695,11 @@ under the License.
         location="component://humanres/minilang/HumanResServices.xml" invoke="getCurrentPartyEmploymentData" auth="true">
         <description>Delete Valid LeaveType</description>
         <permission-service service-name="humanResManagerPermission" main-action="VIEW"/>
-        <attribute name="partyId" type="String" mode="IN"/>
+        <attribute name="partyId" type="String" mode="IN">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingPartyId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
         <attribute name="partyBenefitTypes" type="java.util.List" mode="OUT" optional="true"/>
         <attribute name="employment" type="org.apache.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
         <attribute name="emplPosition" type="org.apache.ofbiz.entity.GenericValue" mode="OUT" optional="true"/>
@@ -812,9 +856,17 @@ under the License.
     <service name="createTrainingTypes" engine="entity-auto" default-entity-name="TrainingClassType" invoke="create" auth="true">
         <description>Create a New Training type</description>
         <permission-service service-name="humanResManagerPermission" main-action="CREATE"/>
-        <attribute name="trainingClassTypeId" mode="IN" type="String" optional="false"/>
+        <attribute name="trainingClassTypeId" mode="IN" type="String" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingTrainingClassTypeId" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
         <attribute name="parentTypeId" mode="IN" type="String" optional="true"/>
-        <attribute name="description" mode="IN" type="String" optional="false"/>
+        <attribute name="description" mode="IN" type="String" optional="false">
+            <type-validate>
+                <fail-property property="HRRequiredFieldMissingDescription" resource="HumanResErrorUiLabels"/>
+            </type-validate>
+        </attribute>
     </service>
 
     <service name="updateTrainingTypes" engine="entity-auto" default-entity-name="TrainingClassType" invoke="update" auth="true">


[ofbiz-framework] 20/28: Improved: Added UI labels for success/error messages for humanres, marketing, order component. (OFBIZ-7696) Thanks Deepak Nigam for reporting and Sourabh Punyani for the patch.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 8a290d3a0e4c3b981cdc33a81d06a6da4c1017b6
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sun May 24 13:03:03 2020 +0530

    Improved: Added UI labels for success/error messages for humanres, marketing, order component.
    (OFBIZ-7696)
    Thanks Deepak Nigam for reporting and Sourabh Punyani for the patch.
---
 applications/humanres/config/HumanResErrorUiLabels.xml       |  9 +++++++++
 applications/humanres/minilang/HumanResEvents.xml            |  6 +++---
 applications/marketing/config/MarketingUiLabels.xml          |  9 +++++++++
 .../minilang/marketing/contact/ContactListServices.xml       | 12 +++++++++---
 applications/order/config/OrderErrorUiLabels.xml             |  3 +++
 applications/order/minilang/order/OrderServices.xml          |  2 +-
 6 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/applications/humanres/config/HumanResErrorUiLabels.xml b/applications/humanres/config/HumanResErrorUiLabels.xml
index f521936..7829a38 100644
--- a/applications/humanres/config/HumanResErrorUiLabels.xml
+++ b/applications/humanres/config/HumanResErrorUiLabels.xml
@@ -51,4 +51,13 @@
     <property key="HRRequiredFieldMissingTrainingClassTypeId">
         <value xml:lang="en">Required Field Missing : Training Class Type Id.</value>
     </property>
+    <property key="HumanResHolidayNameMissing">
+        <value xml:lang="en">The Holiday Name is missing.</value>
+    </property>
+    <property key="HumanResFromDateMissing">
+        <value xml:lang="en">The FromDate is missing</value>
+    </property>
+    <property key="HumanResFromDateAlreadyExist">
+        <value xml:lang="en">This FromDate : ${parameters.estimatedStartDate} already exist.</value>
+    </property>
 </resource>
\ No newline at end of file
diff --git a/applications/humanres/minilang/HumanResEvents.xml b/applications/humanres/minilang/HumanResEvents.xml
index 21ae3c9..6d6187e 100644
--- a/applications/humanres/minilang/HumanResEvents.xml
+++ b/applications/humanres/minilang/HumanResEvents.xml
@@ -57,13 +57,13 @@
     <simple-method method-name="createPublicHoliday" short-description="Create Public Holiday">
         <if-empty field="parameters.workEffortName">            
             <add-error>
-                <fail-message message="The Holiday Name is missing."/>
+                <fail-property resource="HumanResErrorUiLabels" property="HumanResHolidayNameMissing"/>
             </add-error>
             <check-errors/>
         </if-empty>     
         <if-empty field="parameters.estimatedStartDate">
             <add-error>
-                <fail-message message="The FromDate is missing"/>
+                <fail-property resource="HumanResErrorUiLabels" property="HumanResFromDateMissing"/>
             </add-error>
             <check-errors/>
         </if-empty>
@@ -82,7 +82,7 @@
             </call-service>
             <else>
                 <add-error>
-                    <fail-message message="This FromDate : ${parameters.estimatedStartDate} already exist."/>
+                    <fail-property resource="HumanResErrorUiLabels" property="HumanResFromDateAlreadyExist"/>
                 </add-error>
                 <check-errors/>
             </else>
diff --git a/applications/marketing/config/MarketingUiLabels.xml b/applications/marketing/config/MarketingUiLabels.xml
index db4c218..937c473 100644
--- a/applications/marketing/config/MarketingUiLabels.xml
+++ b/applications/marketing/config/MarketingUiLabels.xml
@@ -856,6 +856,15 @@
         <value xml:lang="de">Der bevorzugte Kontaktmechanismus für Party [${partyId}] konnte nicht gefunden werden</value>
         <value xml:lang="en">Could not find the preferred contact mechanism for party [${parameters.partyId}]</value>
     </property>
+    <property key="MarketingContactListInvalidVerifyCode">
+        <value xml:lang="en">Invalid verify code for the ${contactList.contactListName}</value>
+    </property>
+    <property key="MarketingContactListAnotherEmailNotExist">
+        <value xml:lang="en">The email address (${parameters.email}) does not have the Other Email Address as contact purpose</value>
+    </property>
+    <property key="MarketingContactListPermissionError">
+        <value xml:lang="en">Security Error: to run sendContactListPartyVerifyEmail you must have the MARKETING_VIEW or MARKETING_ADMIN permissions</value>
+    </property>
     <property key="MarketingContactMechNotRightForContactList">
         <value xml:lang="de">Der bevorzugte Kontaktmechanismus [${preferredContactMechType.description}] ist vom falschen Typ für die Liste [${listContactMechType.description}].</value>
         <value xml:lang="en">The preferred contact mechanism [${preferredContactMechType.description}] was not of the right type for the list [${listContactMechType.description}].</value>
diff --git a/applications/marketing/minilang/marketing/contact/ContactListServices.xml b/applications/marketing/minilang/marketing/contact/ContactListServices.xml
index 5dac862..0bb7117 100644
--- a/applications/marketing/minilang/marketing/contact/ContactListServices.xml
+++ b/applications/marketing/minilang/marketing/contact/ContactListServices.xml
@@ -172,7 +172,9 @@ under the License.
             <set field="updateContactListPartyMap.baseLocation" from-field="parameters.baseLocation"/>
             <call-service service-name="updateContactListParty" in-map-name="updateContactListPartyMap"/>
             <else>
-                <add-error><fail-message message="Invalid verify code for the ${contactList.contactListName}"/></add-error>
+                <add-error>
+                    <fail-property resource="MarketingUiLabels.xml" property="MarketingContactListInvalidVerifyCode"/>
+                </add-error>
                 <check-errors/>
             </else>
         </if-not-empty>
@@ -226,7 +228,9 @@ under the License.
                     <set field="updateContactListPartyMap.baseLocation" from-field="parameters.baseLocation"/>
                     <call-service service-name="updateContactListParty" in-map-name="updateContactListPartyMap"/>
                     <else>
-                        <add-error><fail-message message="The email address (${parameters.email}) does not have the Other Email Address as contact purpose."/></add-error>
+                        <add-error>
+                            <fail-property resource="MarketingUiLabels.xml" property="MarketingContactListAnotherEmailNotExist"/>
+                        </add-error>
                         <check-errors/>
                     </else>
                 </if-not-empty>
@@ -545,7 +549,9 @@ under the License.
                     <not><if-has-permission permission="MARKETING" action="_VIEW"/></not>
                 </and>
             </condition>
-            <then><add-error><fail-message message="Security Error: to run sendContactListPartyVerifyEmail you must have the MARKETING_VIEW or MARKETING_ADMIN permissions."/></add-error></then>
+            <then><add-error>
+                <fail-property resource="MarketingUiLabels.xml" property="MarketingContactListPermissionError"/>
+            </add-error></then>
         </if>
         <check-errors/>
 
diff --git a/applications/order/config/OrderErrorUiLabels.xml b/applications/order/config/OrderErrorUiLabels.xml
index d093fef..941e334 100644
--- a/applications/order/config/OrderErrorUiLabels.xml
+++ b/applications/order/config/OrderErrorUiLabels.xml
@@ -4570,6 +4570,9 @@
         <value xml:lang="zh">服务没有执行</value>
         <value xml:lang="zh-TW">服務沒有執行</value>
     </property>
+    <property key="OrderServiceOrderItemShipGroupAssocNotExist">
+        <value xml:lang="en">The orderItemShipGroupAssoc qualified by orderId=${parameters.orderId} orderItemSeqId=${parameters.orderItemSeqId} shipGroupSeqId=${parameters.fromGroupIndex} does not exist</value>
+    </property>
     <property key="OrderSetCurrencyError">
         <value xml:lang="ar">حدد خطأ العملة : </value>
         <value xml:lang="de">Fehler beim Auswählen der Währung : </value>
diff --git a/applications/order/minilang/order/OrderServices.xml b/applications/order/minilang/order/OrderServices.xml
index f318825..6906b73 100644
--- a/applications/order/minilang/order/OrderServices.xml
+++ b/applications/order/minilang/order/OrderServices.xml
@@ -1300,7 +1300,7 @@ under the License.
         </entity-one>
         <if-empty field="orderItemShipGroupAssoc">
             <add-error>
-                <fail-message message="The orderItemShipGroupAssoc qualified by orderId=${parameters.orderId} orderItemSeqId=${parameters.orderItemSeqId} shipGroupSeqId=${parameters.fromGroupIndex} does not exist"/>
+                <fail-property resource="OrderErrorUiLabels" property="OrderServiceOrderItemShipGroupAssocNotExist"/>
             </add-error>
         </if-empty>
         <check-errors/>


[ofbiz-framework] 11/28: Improved: Convert setContentStatus service from mini-lang to groovy DSL(OFBIZ-11365). Thanks Devanshu Vyas for the contribution.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit ae2585c32d5d7ef475d7d2d42bed86b360350373
Author: Mridul Pathak <mr...@apache.org>
AuthorDate: Sat May 23 18:12:13 2020 +0530

    Improved: Convert setContentStatus service from mini-lang to groovy DSL(OFBIZ-11365). Thanks Devanshu Vyas for the contribution.
---
 .../groovyScripts/content/ContentServices.groovy   | 22 ++++++++++++++++++
 .../content/minilang/content/ContentServices.xml   | 26 ----------------------
 .../content/servicedef/services_content.xml        |  4 ++--
 3 files changed, 24 insertions(+), 28 deletions(-)

diff --git a/applications/content/groovyScripts/content/ContentServices.groovy b/applications/content/groovyScripts/content/ContentServices.groovy
index 4ecc039..fef62e4 100644
--- a/applications/content/groovyScripts/content/ContentServices.groovy
+++ b/applications/content/groovyScripts/content/ContentServices.groovy
@@ -319,3 +319,25 @@ def createArticleContent() {
     result.contentId = contentId
     return result
 }
+
+def setContentStatus() {
+    Map resultMap = new HashMap()
+    content = from("Content").where("contentId", parameters.contentId).queryOne()
+    if (content) {
+        oldStatusId = content.statusId
+        resultMap.oldStatusId = oldStatusId
+        if (!oldStatusId.equals(parameters.statusId)) {
+            statusChange = from("StatusValidChange").where("statusId", oldStatusId, "statusIdTo", parameters.statusId).queryOne()
+            if (statusChange) {
+                content.put("statusId", parameters.statusId)
+                content.store()
+            } else {
+                resultMap.errorMessage = "Cannot change from " + oldStatusId + " to " + parameters.statusId
+                logError(resultMap.errorMessage)
+            }
+        }
+    } else {
+        return failure("No Content is not available in the system with content ID - " + parameters.contentId)
+    }
+    return resultMap
+}
\ No newline at end of file
diff --git a/applications/content/minilang/content/ContentServices.xml b/applications/content/minilang/content/ContentServices.xml
index b8e451b..d920e1d 100644
--- a/applications/content/minilang/content/ContentServices.xml
+++ b/applications/content/minilang/content/ContentServices.xml
@@ -46,32 +46,6 @@
         </if-not-empty>
     </simple-method>
 
-    <!-- update content; just status -->
-    <simple-method method-name="setContentStatus" short-description="Set The Content Status">
-
-        <entity-one entity-name="Content" value-field="content"/>
-        <field-to-result field="content.statusId" result-name="oldStatusId"/>
-
-       <if-compare-field field="content.statusId" to-field="parameters.statusId" operator="not-equals">
-            <entity-one entity-name="StatusValidChange" value-field="statusChange" auto-field-map="false">
-                <field-map field-name="statusId" from-field="content.statusId"/>
-                <field-map field-name="statusIdTo" from-field="parameters.statusId"/>
-            </entity-one>
-
-            <if-empty field="statusChange">
-                <add-error>
-                    <fail-property resource="ContentUiLabels" property="ContentCannotChangeStatus"/>
-                </add-error>
-                <log level="error" message="Cannot change from ${content.statusId} to ${parameters.statusId}"/>
-                <check-errors/>
-                <else>
-                    <set from-field="parameters.statusId" field="content.statusId"/>
-                    <store-value value-field="content"/>
-                </else>
-            </if-empty>
-        </if-compare-field>
-    </simple-method>
-
     <simple-method method-name="copyContentAndElectronicTextandAssoc" short-description="copy a content, electronic text and assocs and set status in progress">
         <set-service-fields service-name="getContent" map="parameters" to-map="getC"/>
         <call-service service-name="getContent" in-map-name="getC">
diff --git a/applications/content/servicedef/services_content.xml b/applications/content/servicedef/services_content.xml
index ee931fa..a85b902 100644
--- a/applications/content/servicedef/services_content.xml
+++ b/applications/content/servicedef/services_content.xml
@@ -288,8 +288,8 @@
     </service>
 
     <!-- content status services -->
-    <service name="setContentStatus" engine="simple" auth="true"
-            location="component://content/minilang/content/ContentServices.xml" invoke="setContentStatus">
+    <service name="setContentStatus" engine="groovy" auth="true"
+            location="component://content/groovyScripts/content/ContentServices.groovy" invoke="setContentStatus">
         <description>Set the Content Status</description>
         <permission-service service-name="genericContentPermission" main-action="UPDATE"/>
         <attribute name="contentId" type="String" mode="IN" optional="false">


[ofbiz-framework] 10/28: Improved: Converted createPaymentContent, updatePaymentContent services from mini-lang to groovy. (#155)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 3e4a2ecd1a2fb114ae1acb77abac6a5be892109b
Author: Suraj Khurana <64...@users.noreply.github.com>
AuthorDate: Sat May 23 12:38:07 2020 +0530

    Improved: Converted createPaymentContent, updatePaymentContent services from mini-lang to groovy. (#155)
    
    (OFBIZ-11501)(OFBIZ-11502)
    Thanks Devanshu Vyas for reporting and Sourabh Punyani for providing the patch.
---
 .../groovyScripts/payment/PaymentServices.groovy   | 40 ++++++++++++++++++++++
 .../minilang/payment/PaymentServices.xml           | 31 -----------------
 .../accounting/servicedef/services_payment.xml     |  8 ++---
 3 files changed, 44 insertions(+), 35 deletions(-)

diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index b71c419..c28ce07 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -23,6 +23,8 @@ import org.apache.ofbiz.base.util.UtilProperties
 import org.apache.ofbiz.entity.condition.EntityCondition
 import org.apache.ofbiz.entity.condition.EntityOperator
 import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.service.ServiceUtil
+import java.sql.Timestamp
 
 MODULE = "PaymentServices.groovy"
 def createPayment() {
@@ -94,3 +96,41 @@ def getPaymentRunningTotal(){
     result.paymentRunningTotal = paymentRunningTotal
     return result
 }
+def createPaymentContent() {
+    GenericValue newEntity = delegator.makeValue("PaymentContent")
+    newEntity.setPKFields(parameters, true)
+    newEntity.setNonPKFields(parameters, true)
+
+    if (!newEntity.fromDate) {
+        Timestamp nowTimestamp = UtilDateTime.nowTimestamp()
+        newEntity.fromDate  = nowTimestamp
+    }
+    newEntity.create()
+
+    result = run service: 'updateContent', with: parameters
+    if (ServiceUtil.isError(result)) return result
+
+    Map result = success()
+    result.contentId = newEntity.contentId
+    result.paymentId = newEntity.paymentId
+    result.paymentContentTypeId = newEntity.paymentContentTypeId
+    return result
+}
+//TODO: This can be converted into entity-auto with a seca rule for updateContent
+def updatePaymentContent() {
+    serviceResult = success()
+    GenericValue lookupPKMap = delegator.makeValue("PaymentContent")
+    lookupPKMap.setPKFields(parameters, true)
+
+    GenericValue lookedUpValue = findOne("PaymentContent", lookupPKMap, false)
+    if (lookedUpValue) {
+        lookedUpValue.setNonPKFields(parameters)
+        lookedUpValue.store()
+        result = run service: 'updateContent', with: parameters
+        if (ServiceUtil.isError(result)) return result
+        return serviceResult
+    } else {
+        return ServiceUtil.returnError("Error getting Payment Content")
+    }
+}
+
diff --git a/applications/accounting/minilang/payment/PaymentServices.xml b/applications/accounting/minilang/payment/PaymentServices.xml
index 3811bf7..1c32621 100644
--- a/applications/accounting/minilang/payment/PaymentServices.xml
+++ b/applications/accounting/minilang/payment/PaymentServices.xml
@@ -1074,35 +1074,4 @@ under the License.
             </if-not-empty>
         </if-not-empty>
     </simple-method>
-
-    <!-- PaymentContent -->
-    <simple-method method-name="createPaymentContent" short-description="Create Content For Payment">
-        <make-value entity-name="PaymentContent" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-
-        <if-empty field="newEntity.fromDate">
-            <now-timestamp field="nowTimestamp"/>
-            <set field="newEntity.fromDate" from-field="nowTimestamp"/>
-        </if-empty>
-
-        <create-value value-field="newEntity"/>
-
-        <set-service-fields service-name="updateContent" map="parameters" to-map="updateContent"/>
-        <call-service service-name="updateContent" in-map-name="updateContent"/>
-
-        <field-to-result field="newEntity.contentId" result-name="contentId"/>
-        <field-to-result field="newEntity.paymentId" result-name="paymentId"/>
-        <field-to-result field="newEntity.paymentContentTypeId" result-name="paymentContentTypeId"/>
-    </simple-method>
-    <simple-method method-name="updatePaymentContent" short-description="Update Content For Payment">
-        <make-value entity-name="PaymentContent" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key map="lookupPKMap" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <store-value value-field="lookedUpValue"/>
-
-        <set-service-fields service-name="updateContent" map="parameters" to-map="updateContent"/>
-        <call-service service-name="updateContent" in-map-name="updateContent"/>
-    </simple-method>
 </simple-methods>
diff --git a/applications/accounting/servicedef/services_payment.xml b/applications/accounting/servicedef/services_payment.xml
index a7d9554..dd9b2cd 100644
--- a/applications/accounting/servicedef/services_payment.xml
+++ b/applications/accounting/servicedef/services_payment.xml
@@ -253,16 +253,16 @@ under the License.
     </service>
 
     <!-- Payment content services -->
-    <service name="createPaymentContent" default-entity-name="PaymentContent" engine="simple"
-        location="component://accounting/minilang/payment/PaymentServices.xml" invoke="createPaymentContent" auth="true">
+    <service name="createPaymentContent" default-entity-name="PaymentContent" engine="groovy"
+             location="component://accounting/groovyScripts/payment/PaymentServices.groovy" invoke="createPaymentContent" auth="true">
         <description>Add Content To Payment</description>
         <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
         <auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
         <override name="fromDate" optional="true"/>
     </service>
-    <service name="updatePaymentContent" default-entity-name="PaymentContent" engine="simple"
-        location="component://accounting/minilang/payment/PaymentServices.xml" invoke="updatePaymentContent" auth="true">
+    <service name="updatePaymentContent" default-entity-name="PaymentContent" engine="groovy"
+             location="component://accounting/groovyScripts/payment/PaymentServices.groovy" invoke="updatePaymentContent" auth="true">
         <description>Update Content To Payment</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>


[ofbiz-framework] 19/28: Fixed: RuntimeException in getPartyNameForDate service for partyNameHistory.gender field(OFBIZ-11736)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit c759ccd50ae1fbacafc2d517b004f503e650f035
Author: Pawan Verma <pa...@hotwaxsystems.com>
AuthorDate: Sat May 23 23:35:39 2020 +0530

    Fixed: RuntimeException in getPartyNameForDate service for partyNameHistory.gender field(OFBIZ-11736)
    
    The reason for this issue is code is trying to get the gender of person from partyNameHistory record and gender is not a field in partyNameHistory entity. During conversion we minimized duplicate code which caused that issue.
    
    I've added a check to avoid checking gender in partyNameHistory record.
---
 applications/party/groovyScripts/party/PartyServices.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/applications/party/groovyScripts/party/PartyServices.groovy b/applications/party/groovyScripts/party/PartyServices.groovy
index 872ed75..60c438f 100644
--- a/applications/party/groovyScripts/party/PartyServices.groovy
+++ b/applications/party/groovyScripts/party/PartyServices.groovy
@@ -104,7 +104,7 @@ def getPartyNameForDate() {
         if (person.middleName) resultMap.middleName = person.middleName
         if (person.personalTitle) resultMap.personalTitle = person.personalTitle
         if (person.suffix) resultMap.suffix = person.suffix
-        if (person.gender) resultMap.gender = person.gender
+        if (!partyNameHistoryCurrent && person.gender) resultMap.gender = person.gender
 
         resultMap.fullName = PartyHelper.getPartyName(person, parameters.lastNameFirst == "Y")
     } else if (partyGroup) {


[ofbiz-framework] 02/28: Improved: Clean how HTTP vs HTTPS is handled

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 39d0b91ea14fb80bf1a4a9cb60c19ed95a540f9d
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed May 20 13:01:22 2020 +0200

    Improved: Clean how HTTP vs HTTPS is handled
    
    (OFBIZ-11717)
    
    No functional changes, just better comments
---
 .../java/org/apache/ofbiz/webapp/control/RequestHandler.java  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index b17a55b..d9a5251 100644
--- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@ -323,12 +323,14 @@ public class RequestHandler {
             // Check if we SHOULD be secure and are not.
             boolean forwardedHTTPS = "HTTPS".equalsIgnoreCase(request.getHeader("X-Forwarded-Proto"));
             if (!request.isSecure() && !forwardedHTTPS && requestMap.securityHttps) {
-                // If the request method was POST then return an error to avoid problems with XSRF where the request may have come from another machine/program and had the same session ID but was not encrypted as it should have been (we used to let it pass to not lose data since it was too late to protect that data anyway)
+                // If the request method was POST then return an error to avoid problems with CSRF where the request 
+                // may have come from another machine/program and had the same session ID but was not encrypted as it 
+                // should have been (we used to let it pass to not lose data since it was too late to protect that data anyway)
                 if ("POST".equalsIgnoreCase(request.getMethod())) {
-                    // we can't redirect with the body parameters, and for better security from XSRF, just return an error message
+                    // we can't redirect with the body parameters, and for better security from CSRF, just return an error message
                     Locale locale = UtilHttp.getLocale(request);
                     String errMsg = UtilProperties.getMessage("WebappUiLabels", "requestHandler.InsecureFormPostToSecureRequest", locale);
-                    Debug.logError("Got a insecure (non-https) form POST to a secure (http) request [" + requestMap.uri + "], returning error", MODULE);
+                    Debug.logError("Got an insecure (non HTTPS) form POST to a secure (HTTPS) request [" + requestMap.uri + "], returning error", MODULE);
 
                     // see if HTTPS is enabled, if not then log a warning instead of throwing an exception
                     Boolean enableHttps = null;
@@ -346,7 +348,8 @@ public class RequestHandler {
                     }
 
                     if (Boolean.FALSE.equals(enableHttps)) {
-                        Debug.logWarning("HTTPS is disabled for this site, so we can't tell if this was encrypted or not which means if a form was POSTed and it was not over HTTPS we don't know, but it would be vulnerable to an XSRF and other attacks: " + errMsg, MODULE);
+                        Debug.logWarning("HTTPS is disabled for this site, so we can't tell if this was encrypted or not which means if a form was POSTed "
+                                + "and it was not over HTTPS we don't know, but it would be vulnerable to an CSRF and other attacks: " + errMsg, MODULE);
                     } else {
                         throw new RequestHandlerException(errMsg);
                     }


[ofbiz-framework] 14/28: Improved: Make shipment services loosely coupled with work-effort generation. (#132)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 452a893cf64da3d04307815b40f021ae024f2007
Author: Suraj Khurana <64...@users.noreply.github.com>
AuthorDate: Sat May 23 15:26:26 2020 +0530

    Improved: Make shipment services loosely coupled with work-effort generation. (#132)
    
    * Improved: Make shipment services loosely coupled with work-effort generation.
    (OFBIZ-11678)
    Removed workeffort generation related code in separate service, in createShipment and updateShipment service. In this effort, createShipment has been successfully changed to entity-auto as well.
    Thanks: Pierre Smits and Arun Patidar for discussion and review.
---
 .../shipment/shipment/ShipmentServices.groovy      | 156 +-------------------
 applications/product/servicedef/secas_shipment.xml |  16 ++-
 .../product/servicedef/services_shipment.xml       |   7 +-
 .../workeffort/WorkEffortServices.groovy           | 158 +++++++++++++++++++++
 applications/workeffort/servicedef/services.xml    |  12 ++
 .../workeffort/workeffort/WorkEffortServices.java  |   2 +-
 6 files changed, 191 insertions(+), 160 deletions(-)

diff --git a/applications/product/groovyScripts/shipment/shipment/ShipmentServices.groovy b/applications/product/groovyScripts/shipment/shipment/ShipmentServices.groovy
index 026e7a0..1940f59 100644
--- a/applications/product/groovyScripts/shipment/shipment/ShipmentServices.groovy
+++ b/applications/product/groovyScripts/shipment/shipment/ShipmentServices.groovy
@@ -17,8 +17,6 @@
  * under the License.
  */
 
-
-
 import java.sql.Timestamp
 
 import org.apache.ofbiz.base.util.UtilDateTime
@@ -30,83 +28,6 @@ import org.apache.ofbiz.party.contact.ContactMechWorker
 import org.apache.ofbiz.product.product.ProductWorker
 import org.apache.ofbiz.service.ServiceUtil
 
-
-/**
- * Create Shipment
- * @return
- */
-def createShipment() {
-    GenericValue newEntity = makeValue("Shipment")
-    newEntity.setNonPKFields(parameters)
-
-    if (parameters.shipmentId) {
-        newEntity.setPKFields(parameters)
-    } else {
-        newEntity.shipmentId = delegator.getNextSeqId("Shipment")
-    }
-    Map result = success()
-    result.shipmentId = newEntity.shipmentId
-    String shipmentTypeId = parameters.shipmentTypeId
-    // set the created and lastModified info
-    newEntity.createdDate = UtilDateTime.nowTimestamp()
-    newEntity.createdByUserLogin = userLogin.userLoginId
-    newEntity.lastModifiedDate = UtilDateTime.nowTimestamp()
-    newEntity.lastModifiedByUserLogin = userLogin.userLoginId
-    /*
-     * if needed create some WorkEfforts and remember their IDs:
-     * estimatedShipDate: estimatedShipWorkEffId
-     * estimatedArrivalDate: estimatedArrivalWorkEffId
-     */
-    if (parameters.estimatedShipDate) {
-        Map shipWorkEffortMap = [workEffortName: "Shipment #${newEntity.shipmentId} ${newEntity.primaryOrderId} Ship",
-                                 currentStatusId: "CAL_TENTATIVE",
-                                 workEffortPurposeTypeId: "WEPT_WAREHOUSING",
-                                 estimatedStartDate: parameters.estimatedShipDate,
-                                 estimatedCompletionDate: parameters.estimatedShipDate,
-                                 facilityId: parameters.originFacilityId,
-                                 quickAssignPartyId: userLogin.partyId]
-        if (["OUTGOING_SHIPMENT", "SALES_SHIPMENT", "PURCHASE_RETURN"].contains(shipmentTypeId)) {
-            shipWorkEffortMap.workEffortTypeId = "SHIPMENT_OUTBOUND"
-        }
-        Map serviceResultSD = run service: "createWorkEffort", with: shipWorkEffortMap
-        newEntity.estimatedShipWorkEffId = serviceResultSD.workEffortId
-        if (newEntity.partyIdFrom) {
-            run service: "assignPartyToWorkEffort", with: [workEffortId: newEntity.estimatedShipWorkEffId,
-                                                           partyId: newEntity.partyIdFrom,
-                                                           roleTypeId: "CAL_ATTENDEE",
-                                                           statusId: "CAL_SENT"]
-        }
-    }
-    if (parameters.estimatedArrivalDate) {
-        Map arrivalWorkEffortMap = [workEffortName: "Shipment #${newEntity.shipmentId} ${newEntity.primaryOrderId} Arrival",
-                                    currentStatusId: "CAL_TENTATIVE",
-                                    workEffortPurposeTypeId: "WEPT_WAREHOUSING",
-                                    estimatedStartDate: parameters.estimatedArrivalDate,
-                                    estimatedCompletionDate: parameters.estimatedArrivalDate,
-                                    facilityId: parameters.destinationFacilityId,
-                                    quickAssignPartyId: userLogin.partyId]
-        if (["INCOMING_SHIPMENT", "PURCHASE_SHIPMENT", "SALES_RETURN"].contains(shipmentTypeId)) {
-            arrivalWorkEffortMap.workEffortTypeId = "SHIPMENT_INBOUND"
-        }
-        Map serviceResultAD = run service: "createWorkEffort", with: arrivalWorkEffortMap
-        newEntity.estimatedArrivalWorkEffId = serviceResultAD.workEffortId
-        if (newEntity.partyIdTo) {
-            run service: "assignPartyToWorkEffort", with: [workEffortId: newEntity.estimatedArrivalWorkEffId,
-                                                           partyId: newEntity.partyIdTo,
-                                                           roleTypeId: "CAL_ATTENDEE",
-                                                           statusId: "CAL_SENT"]
-        }
-    }
-    newEntity.create()
-
-    // get the ShipmentStatus history started
-    if (newEntity.statusId) {
-        run service: "createShipmentStatus", with: [shipmentId: newEntity.shipmentId,
-                                                    statusId: newEntity.statusId]
-    }
-    return result
-}
-
 /**
  * Update Shipment
  * @return
@@ -140,80 +61,11 @@ def updateShipment() {
     }
     // now finally check for errors
     if (errorList) {
-        return error(errorList)
-    }
-    // Check the pickup and delivery dates for changes and update the corresponding WorkEfforts
-    if ((parameters.estimatedShipDate && parameters.estimatedShipDate != lookedUpValue.estimatedShipDate)
-            || (parameters.originFacilityId && parameters.originFacilityId != lookedUpValue.originFacilityId)
-            || (parameters.statusId && parameters.statusId != lookedUpValue.statusId
-                && ["SHIPMENT_CANCELLED", "SHIPMENT_PACKED", "SHIPMENT_SHIPPED"].contains(parameters.statusId))) {
-        GenericValue estShipWe = from("WorkEffort").where(workEffortId: lookedUpValue.estimatedShipWorkEffId).queryOne()
-        if (estShipWe) {
-            estShipWe.estimatedStartDate = parameters.estimatedShipDate
-            estShipWe.estimatedCompletionDate = parameters.estimatedShipDate
-            estShipWe.facilityId = parameters.originFacilityId
-            if ((parameters.statusId) && (parameters.statusId != lookedUpValue.statusId)) {
-                if (parameters.statusId == "SHIPMENT_CANCELLED") {
-                    estShipWe.currentStatusId = "CAL_CANCELLED"
-                }
-                if (parameters.statusId == "SHIPMENT_PACKED") {
-                    estShipWe.currentStatusId = "CAL_CONFIRMED"
-                }
-                if (parameters.statusId == "SHIPMENT_SHIPPED") {
-                    estShipWe.currentStatusId = "CAL_COMPLETED"
-                }
-            }
-            Map estShipWeUpdMap = [:]
-            estShipWeUpdMap << estShipWe
-            run service: "updateWorkEffort", with: estShipWeUpdMap
-        }
-    }
-    if ((parameters.estimatedArrivalDate
-            && parameters.estimatedArrivalDate != lookedUpValue.estimatedArrivalDate)
-            || (parameters.destinationFacilityId
-            && parameters.destinationFacilityId != lookedUpValue.destinationFacilityId)) {
-        GenericValue estimatedArrivalWorkEffort = from("WorkEffort")
-                .where(workEffortId: lookedUpValue.estimatedArrivalWorkEffId)
-                .queryOne()
-        if (estimatedArrivalWorkEffort) {
-            estimatedArrivalWorkEffort.estimatedStartDate = parameters.estimatedArrivalDate
-            estimatedArrivalWorkEffort.estimatedCompletionDate = parameters.estimatedArrivalDate
-            estimatedArrivalWorkEffort.facilityId = parameters.destinationFacilityId
-            run service: "updateWorkEffort", with: estimatedArrivalWorkEffort
-        }
-    }
-    // if the partyIdTo or partyIdFrom has changed, add WEPAs
-    //TODO REFACTORING
-    if (parameters.partyIdFrom
-            && parameters.partyIdFrom != lookedUpValue.partyIdFrom
-            && lookedUpValue.estimatedShipWorkEffId) {
-        Map assignPartyToWorkEffortShip = [workEffortId: lookedUpValue.estimatedShipWorkEffId,
-                                           partyId: parameters.partyIdFrom]
-        List existingShipWepas = from("WorkEffortPartyAssignment")
-                .where(assignPartyToWorkEffortShip)
-                .filterByDate()
-                .queryList()
-        if (!existingShipWepas) {
-            assignPartyToWorkEffortShip.roleTypeId = "CAL_ATTENDEE"
-            assignPartyToWorkEffortShip.statusId = "CAL_SENT"
-            run service: "assignPartyToWorkEffort", with: assignPartyToWorkEffortShip
-        }
-    }
-    if (parameters.partyIdTo
-            && parameters.partyIdTo != lookedUpValue.partyIdTo
-            && lookedUpValue.estimatedArrivalWorkEffId) {
-        Map assignPartyToWorkEffortArrival = [workEffortId: lookedUpValue.estimatedArrivalWorkEffId,
-                                              partyId: parameters.partyIdTo]
-        List existingArrivalWepas = from("WorkEffortPartyAssignment")
-                .where(assignPartyToWorkEffortArrival)
-                .filterByDate()
-                .queryList()
-        if (!existingArrivalWepas) {
-            assignPartyToWorkEffortArrival.roleTypeId = "CAL_ATTENDEE"
-            assignPartyToWorkEffortArrival.statusId = "CAL_SENT"
-            run service: "assignPartyToWorkEffort", with: assignPartyToWorkEffortArrival
-        }
+        return error(errorList.toString())
     }
+    Map serviceResult = run service: "checkAndUpdateWorkEffort", with: parameters
+    if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+
     // finally before setting nonpk fields, set the oldStatusId, oldPrimaryOrderId, oldOriginFacilityId, oldDestinationFacilityId
     result.oldStatusId = lookedUpValue.statusId
     result.oldPrimaryOrderId = lookedUpValue.primaryOrderId
diff --git a/applications/product/servicedef/secas_shipment.xml b/applications/product/servicedef/secas_shipment.xml
index b71fbb9..94f8e2d 100644
--- a/applications/product/servicedef/secas_shipment.xml
+++ b/applications/product/servicedef/secas_shipment.xml
@@ -123,18 +123,30 @@ under the License.
         <condition field-name="destinationFacilityId" operator="is-not-empty"/>
         <action service="setShipmentSettingsFromFacilities" mode="sync"/>
     </eca>
-
     <!-- if new primaryOrderId, get settings from order -->
     <eca service="createShipment" event="commit">
         <condition field-name="primaryOrderId" operator="is-not-empty"/>
         <action service="setShipmentSettingsFromPrimaryOrder" mode="sync"/>
     </eca>
-
     <eca service="updateShipment" event="commit">
         <condition-field field-name="primaryOrderId" operator="not-equals" to-field-name="oldPrimaryOrderId"/>
         <condition field-name="primaryOrderId" operator="is-not-empty"/>
         <action service="setShipmentSettingsFromPrimaryOrder" mode="sync"/>
     </eca>
+    <!-- if estimatedShipDate, create work-effort -->
+    <eca service="createShipment" event="commit">
+        <condition field-name="estimatedShipDate" operator="is-not-empty"/>
+        <action service="checkAndCreateWorkEffort" mode="async"/>
+    </eca>
+    <eca service="createShipment" event="commit">
+        <condition field-name="estimatedArrivalDate" operator="is-not-empty"/>
+        <action service="checkAndCreateWorkEffort" mode="async"/>
+    </eca>
+    <eca service="createShipment" event="commit">
+        <condition field-name="statusId" operator="is-not-empty"/>
+        <action service="createShipmentStatus" mode="async"/>
+    </eca>
+
 
     <eca service="createShipmentReceipt" event="commit">
         <condition field-name="returnId" operator="is-not-empty"/>
diff --git a/applications/product/servicedef/services_shipment.xml b/applications/product/servicedef/services_shipment.xml
index 9084f4e..89bea13 100644
--- a/applications/product/servicedef/services_shipment.xml
+++ b/applications/product/servicedef/services_shipment.xml
@@ -163,13 +163,10 @@ under the License.
         </attribute>
         <override name="primaryReturnId" optional="false"/>
     </service>
-
-    <service name="createShipment" default-entity-name="Shipment" engine="groovy"
-            location="component://product/groovyScripts/shipment/shipment/ShipmentServices.groovy" invoke="createShipment" auth="true">
+    <service name="createShipment" default-entity-name="Shipment" engine="entity-auto" invoke="create" auth="true">
         <description>Create Shipment</description>
         <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="OUT" optional="false"/>
-        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="createdDate"/>
             <exclude field-name="createdByUserLogin"/>
diff --git a/applications/workeffort/groovyScripts/workeffort/workeffort/WorkEffortServices.groovy b/applications/workeffort/groovyScripts/workeffort/workeffort/WorkEffortServices.groovy
new file mode 100644
index 0000000..fd0cba7
--- /dev/null
+++ b/applications/workeffort/groovyScripts/workeffort/workeffort/WorkEffortServices.groovy
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import org.apache.ofbiz.entity.GenericValue
+import org.apache.ofbiz.service.ServiceUtil;
+
+def checkAndCreateWorkEffort() {
+    Map result = success()
+    /*
+     * if needed create some WorkEfforts and remember their IDs:
+     * estimatedShipDate: estimatedShipWorkEffId
+     * estimatedArrivalDate: estimatedArrivalWorkEffId
+     */
+    GenericValue lookedUpValue = from("Shipment").where(parameters).queryOne()
+    if (parameters.estimatedShipDate) {
+        Map shipWorkEffortMap = [workEffortName: "Shipment #${parameters.shipmentId} ${parameters.primaryOrderId} Ship",
+                                 currentStatusId: "CAL_TENTATIVE",
+                                 workEffortPurposeTypeId: "WEPT_WAREHOUSING",
+                                 estimatedStartDate: parameters.estimatedShipDate,
+                                 estimatedCompletionDate: parameters.estimatedShipDate,
+                                 facilityId: parameters.originFacilityId,
+                                 quickAssignPartyId: userLogin.partyId]
+        if (["OUTGOING_SHIPMENT", "SALES_SHIPMENT", "PURCHASE_RETURN"].contains(shipmentTypeId)) {
+            shipWorkEffortMap.workEffortTypeId = "SHIPMENT_OUTBOUND"
+        }
+        Map serviceResult = run service: "createWorkEffort", with: shipWorkEffortMap
+        if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        lookedUpValue.estimatedShipWorkEffId = serviceResult.workEffortId
+        if (parameters.partyIdFrom) {
+            serviceResult = run service: "assignPartyToWorkEffort", with: [workEffortId: lookedUpValue.estimatedShipWorkEffId,
+                                                           partyId: parameters.partyIdFrom,
+                                                           roleTypeId: "CAL_ATTENDEE",
+                                                           statusId: "CAL_SENT"]
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        }
+    }
+    if (parameters.estimatedArrivalDate) {
+        Map arrivalWorkEffortMap = [workEffortName: "Shipment #${parameters.shipmentId} ${parameters.primaryOrderId} Arrival",
+                                    currentStatusId: "CAL_TENTATIVE",
+                                    workEffortPurposeTypeId: "WEPT_WAREHOUSING",
+                                    estimatedStartDate: parameters.estimatedArrivalDate,
+                                    estimatedCompletionDate: parameters.estimatedArrivalDate,
+                                    facilityId: parameters.destinationFacilityId,
+                                    quickAssignPartyId: userLogin.partyId]
+        if (["INCOMING_SHIPMENT", "PURCHASE_SHIPMENT", "SALES_RETURN"].contains(shipmentTypeId)) {
+            arrivalWorkEffortMap.workEffortTypeId = "SHIPMENT_INBOUND"
+        }
+        Map serviceResult = run service: "createWorkEffort", with: arrivalWorkEffortMap
+        if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        lookedUpValue.estimatedArrivalWorkEffId = serviceResultAD.workEffortId
+        if (parameters.partyIdTo) {
+            serviceResult = run service: "assignPartyToWorkEffort", with: [workEffortId: lookedUpValue.estimatedArrivalWorkEffId,
+                                                           partyId: parameters.partyIdTo,
+                                                           roleTypeId: "CAL_ATTENDEE",
+                                                           statusId: "CAL_SENT"]
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        }
+    }
+    lookedUpValue.store()
+    return result
+}
+def checkAndUpdateWorkEffort() {
+    Map result = success()
+    GenericValue lookedUpValue = from("Shipment").where(parameters).queryOne()
+    // Check the pickup and delivery dates for changes and update the corresponding WorkEfforts
+    if ((parameters.estimatedShipDate && parameters.estimatedShipDate != lookedUpValue.estimatedShipDate)
+            || (parameters.originFacilityId && parameters.originFacilityId != lookedUpValue.originFacilityId)
+            || (parameters.statusId && parameters.statusId != lookedUpValue.statusId
+            && ["SHIPMENT_CANCELLED", "SHIPMENT_PACKED", "SHIPMENT_SHIPPED"].contains(parameters.statusId))) {
+        GenericValue estShipWe = from("WorkEffort").where(workEffortId: lookedUpValue.estimatedShipWorkEffId).queryOne()
+        if (estShipWe) {
+            estShipWe.estimatedStartDate = parameters.estimatedShipDate
+            estShipWe.estimatedCompletionDate = parameters.estimatedShipDate
+            estShipWe.facilityId = parameters.originFacilityId
+            if ((parameters.statusId) && (parameters.statusId != lookedUpValue.statusId)) {
+                if (parameters.statusId == "SHIPMENT_CANCELLED") {
+                    estShipWe.currentStatusId = "CAL_CANCELLED"
+                }
+                if (parameters.statusId == "SHIPMENT_PACKED") {
+                    estShipWe.currentStatusId = "CAL_CONFIRMED"
+                }
+                if (parameters.statusId == "SHIPMENT_SHIPPED") {
+                    estShipWe.currentStatusId = "CAL_COMPLETED"
+                }
+            }
+            Map estShipWeUpdMap = [:]
+            estShipWeUpdMap << estShipWe
+            Map serviceResult = run service: "updateWorkEffort", with: estShipWeUpdMap
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+
+        }
+    }
+    if ((parameters.estimatedArrivalDate
+            && parameters.estimatedArrivalDate != lookedUpValue.estimatedArrivalDate)
+            || (parameters.destinationFacilityId
+            && parameters.destinationFacilityId != lookedUpValue.destinationFacilityId)) {
+        GenericValue estimatedArrivalWorkEffort = from("WorkEffort")
+                .where(workEffortId: lookedUpValue.estimatedArrivalWorkEffId)
+                .queryOne()
+        if (estimatedArrivalWorkEffort) {
+            estimatedArrivalWorkEffort.estimatedStartDate = parameters.estimatedArrivalDate
+            estimatedArrivalWorkEffort.estimatedCompletionDate = parameters.estimatedArrivalDate
+            estimatedArrivalWorkEffort.facilityId = parameters.destinationFacilityId
+            Map serviceResult = run service: "updateWorkEffort", with: estimatedArrivalWorkEffort
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        }
+    }
+    // if the partyIdTo or partyIdFrom has changed, add WEPAs
+    //TODO REFACTORING
+    if (parameters.partyIdFrom
+            && parameters.partyIdFrom != lookedUpValue.partyIdFrom
+            && lookedUpValue.estimatedShipWorkEffId) {
+        Map assignPartyToWorkEffortShip = [workEffortId: lookedUpValue.estimatedShipWorkEffId,
+                                           partyId: parameters.partyIdFrom]
+        List existingShipWepas = from("WorkEffortPartyAssignment")
+                .where(assignPartyToWorkEffortShip)
+                .filterByDate()
+                .queryList()
+        if (!existingShipWepas) {
+            assignPartyToWorkEffortShip.roleTypeId = "CAL_ATTENDEE"
+            assignPartyToWorkEffortShip.statusId = "CAL_SENT"
+            Map serviceResult = run service: "assignPartyToWorkEffort", with: assignPartyToWorkEffortShip
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        }
+    }
+    if (parameters.partyIdTo
+            && parameters.partyIdTo != lookedUpValue.partyIdTo
+            && lookedUpValue.estimatedArrivalWorkEffId) {
+        Map assignPartyToWorkEffortArrival = [workEffortId: lookedUpValue.estimatedArrivalWorkEffId,
+                                              partyId: parameters.partyIdTo]
+        List existingArrivalWepas = from("WorkEffortPartyAssignment")
+                .where(assignPartyToWorkEffortArrival)
+                .filterByDate()
+                .queryList()
+        if (!existingArrivalWepas) {
+            assignPartyToWorkEffortArrival.roleTypeId = "CAL_ATTENDEE"
+            assignPartyToWorkEffortArrival.statusId = "CAL_SENT"
+            serviceResult = run service: "assignPartyToWorkEffort", with: assignPartyToWorkEffortArrival
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult.errorMessage)
+        }
+    }
+    return result
+}
diff --git a/applications/workeffort/servicedef/services.xml b/applications/workeffort/servicedef/services.xml
index b53ef01..fb169e5 100644
--- a/applications/workeffort/servicedef/services.xml
+++ b/applications/workeffort/servicedef/services.xml
@@ -463,6 +463,18 @@ under the License.
         <attribute name="workEffortIterator" type="java.util.ListIterator" mode="IN" optional="true"/>
         <attribute name="workEfforts" type="java.util.List" mode="INOUT" optional="true"/>
     </service>
+    <service name="checkAndCreateWorkEffort" auth="true" engine="groovy" default-entity-name="Shipment"
+             location="component://workeffort/groovyScripts/workeffort/workeffort/WorkEffortServices.groovy" invoke="checkAndCreateWorkEffort">
+        <description>Check And Create WorkEffort after Shipment Create</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="checkAndUpdateWorkEffort" auth="true" engine="groovy" default-entity-name="Shipment"
+             location="component://workeffort/groovyScripts/workeffort/workeffort/WorkEffortServices.groovy" invoke="checkAndUpdateWorkEffort">
+        <description>Check And Update WorkEffort after Shipment Update</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
     <service name="getProductManufacturingSummaryByFacility" engine="java"
             location="org.apache.ofbiz.workeffort.workeffort.WorkEffortServices" invoke="getProductManufacturingSummaryByFacility">
         <description>
diff --git a/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java b/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java
index bb10cca..478c1bb 100644
--- a/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java
+++ b/applications/workeffort/src/main/java/org/apache/ofbiz/workeffort/workeffort/WorkEffortServices.java
@@ -1107,4 +1107,4 @@ public class WorkEffortServices {
         result.put("workEfforts", resultList);
         return result;
     }
-}
+}
\ No newline at end of file


[ofbiz-framework] 26/28: Documented: datamodel markdown migration to asciidoc (OFBIZ-11574)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit db463e7517450e54a32b63fef834ff209a39eeb1
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Mon May 25 19:46:04 2020 +0530

    Documented: datamodel markdown migration to asciidoc (OFBIZ-11574)
    
    * Documented: datamodel markdown migration to asciidoc
    (OFBIZ-11574)
    
    - DATAMODEL_CHANGE migration to asciidoc and add a included in
    developer_manual
    - Readme migration to asciidoc
    
    * Documented: theme/README.md change theme/README.adoc but with very
    simple content
    (OFBIZ-11574)
    
    README.md  has been migrated to asciidoc as doc/themes.adoc previously
    but remove README.md has been forgot.
    In this commit README.md is removed and a new README.adoc is created
    with only a brief component definition and link to the theme
    documentation (and developer-manual which included theme.adoc)
    
    * Documented: datamodel markdown migration to asciidoc
    (OFBIZ-11574)
    
    Added new field parentGlXbrlClassId taking reference from DATAMODEL_CHANGES.md which was added with OFBIZ-10613 and missing in adoc file
    
    Co-authored-by: holivier <ho...@apache.org>
---
 applications/datamodel/DATAMODEL_CHANGES.adoc | 416 ++++++++++++++++++++++++++
 applications/datamodel/DATAMODEL_CHANGES.md   | 402 -------------------------
 applications/datamodel/README.adoc            |  36 +++
 applications/datamodel/README.md              |  14 -
 docs/asciidoc/developer-manual.adoc           |   2 +
 themes/README.adoc                            |  28 ++
 themes/README.md                              | 314 -------------------
 7 files changed, 482 insertions(+), 730 deletions(-)

diff --git a/applications/datamodel/DATAMODEL_CHANGES.adoc b/applications/datamodel/DATAMODEL_CHANGES.adoc
new file mode 100644
index 0000000..ca21746
--- /dev/null
+++ b/applications/datamodel/DATAMODEL_CHANGES.adoc
@@ -0,0 +1,416 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= Data Model Changes
+The Apache OFBiz® Project
+Release 17.12
+
+Apache OFBiz follows *The Universal Data Model* by **Len Silverston**, with a grain of salt.
+
+The following file contains information about the data model changes in the Apache OFBiz.
+ The detailed description of migration scripts specified here can be found at
+ https://cwiki.apache.org/confluence/x/LoBr[Revisions Requiring Data Migration - upgrade ofbiz] page.
+
+== Changes with OFBiz Trunk (Upcoming Branch)
+
+=== Entity Changes
+*Added 1 new entity*
+
+1. ProdPromoCodeContactMech
+
+*Removed/Deprecate 1 entity*
+
+1. ProductPromoCodeEmail
+
+=== Field Changes
+[cols="<,^,^,^,>",options="header",]
+|=======================================================
+|Entity                 |Field   |Action |IsPK |Revision
+| GlXbrlClass | parentGlXbrlClassId | Added | No | 36a123a
+|=======================================================
+
+
+=== Migration Scripts
+1.  Migration service migrateProductPromoCodeEmail is implemented to migrate the
+    ProductPromoCodeEmail entity to ProductPromoCodeContactMech. +
+    (More detail at https://issues.apache.org/jira/browse/OFBIZ-5426[OFBIZ-5426])
+
+== Changes with OFBiz 17
+Field types `id-ne`, `id-long-ne` & `id-vlong-ne` has been removed. Use `id`, `id-long` and `id-vlong`
+instead (detailed description at https://issues.apache.org/jira/browse/OFBIZ-9351[OFBIZ-9351]).
+
+
+=== Entity Changes
+No changes
+
+=== Field Changes
+[cols="<,^,^,^,>",options="header",]
+|=======================================================
+|Entity                 |Field   |Action |IsPK |Revision
+|MarketingCampaignPrice |fromDate |Added |Yes |R1805961
+|MarketingCampaignPrice |thruDate |Added |No |R1805961
+|MarketingCampaignPromo |fromDate |Added |Yes |R1805961
+|MarketingCampaignPromo |thruDate |Added |No |R1805961
+|MarketingCampaignRole |fromDate |Added |Yes |R1805961
+|MarketingCampaignRole |thruDate |Added |No |R1805961
+|Product |manufacturerPartyId |Removed |No |R1804408
+|SecurityGroupPermission |fromDate |Added |Yes |R1812383
+|SecurityGroupPermission |thruDate |Added |No |R1812383
+|=======================================================
+
+=== Migration Scripts
+1.  Updated sql-type for date-time and time field in fieldtypemysql.xml file at commit R1793300 +
+    __Update msyql sql-type for datetime field-type to support Fractional Seconds in Time Values
+    Please upgrade mysql to at least 5.6.4 or higher.__ +
+    After upgrade run `generateMySqlFileWithAlterTableForTimestamps` service, groupName is required field for
+    this service. +
+    It will generate sql file with alter query statement for date-time and time field
+    at location `$\{ofbiz.home}/runtime/tempfiles/.sql` +
+    You can use execute sql statement from any of the mysql batch command.
+
+
+== Changes between OFBiz 9 to OFBiz 16
+
+=== Entity Changes
+*Added 77 new entities*
+
+1.  JobRequisition
+2.  ProductAverageCostType
+3.  WorkEffortSurveyAppl
+4.  WorkEffortIcalData
+5.  WebSiteContactList
+6.  WebAnalyticsType
+7.  WebAnalyticsConfig
+8.  UserLoginSecurityQuestion
+9.  UomGroup
+10. TrainingRequest
+11. ThirdPartyLogin
+12. TestFieldType
+13. TestingSubtype
+14. TestingStatus
+15. TestingRemoveAll
+16. TestingItem
+17. TestingCrypto
+18. SystemProperty
+19. ShipmentGatewayUsps
+20. ShipmentGatewayUps
+21. ShipmentGatewayFedex
+22. ShipmentGatewayDhl
+23. ShipmentGatewayConfig
+24. ShipmentGatewayConfigType
+25. ReturnContactMech
+26. QuoteNote
+27. ProductPromoContent
+28. ProductPromoContentType
+29. ProductGroupOrder
+30. ProductCostComponentCalc
+31. CostComponentCalc
+32. PayPalPaymentMethod
+33. PaymentGroupType
+34. PaymentGroup
+35. PaymentGroupMember
+36. PaymentGatewayConfig
+37. PaymentGatewayConfigType
+38. PaymentGatewayWorldPay
+39. PaymentGatewaySecurePay
+40. PaymentGatewaySagePay
+41. PaymentGatewayOrbital
+42. PaymentGatewayEway
+43. PaymentGatewayCyberSource
+44. PaymentGatewayAuthorizeNet
+45. PaymentGatewayIDEAL
+46. PaymentContentType
+47. PaymentContent
+48. OAuth2LinkedIn
+49. OAuth2GitHub
+50. JobManagerLock
+51. JobInterviewType
+52. JobInterview
+53. JavaResource
+54. InvoiceNote
+55. InvoiceItemAssocType
+56. InvoiceItemAssoc
+57. InvoiceContentType
+58. InvoiceContent
+59. GlAccountCategoryType
+60. GlAccountCategoryMember
+61. GlAccountCategory
+62. GitHubUser
+63. FixedAssetTypeGlAccount
+64. FacilityContent
+65. ExcelImportHistory
+66. EmplLeaveReasonType
+67. EbayShippingMethod
+68. EbayConfig
+69. CountryAddressFormat
+70. ContentSearchResult
+71. ContentSearchConstraint
+72. ContentKeyword
+73. CheckAccount
+74. AgreementFacilityAppl
+75. AgreementContentType
+76. AgreementContent
+
+*Removed 8 entities*
+
+1.  DepreciationMethod
+2.  FixedAssetMaintMeter
+3.  OagisMessageErrorInfo
+4.  OagisMessageInfo
+5.  SalesOpportunityTrackingCode
+6.  SimpleSalesTaxLookup
+7.  TestBlob
+8.  WorkEffortAssignmentRate
+
+
+=== Field Changes
+[cols="<,^,^,^,^",options="header",]
+|=================================================================
+|Entity              |Field           |Action |IsPK |Revision
+|AcctgTransAttribute |attrDescription |Added  |No   |NA
+|AcctgTransEntry |inventoryItemId |Added |No |NA
+|AcctgTransTypeAttr |description |Added |No |NA
+|BenefitType |parentTypeId |Added |No |NA
+|BenefitType |hasTable |Added |No |NA
+|BudgetAttribute |attrDescription |Added |No |NA
+|BudgetItemAttribute |attrDescription |Added |No |NA
+|BudgetItemTypeAttr |description |Added |No |NA
+|BudgetStatus |changeByUserLoginId |Added |No |NA
+|BudgetTypeAttr |description |Added |No |NA
+|CommunicationEventRole |statusId |Added |No |NA
+|CommunicationEventType |contactMechTypeId |Added |No |NA
+|ContactListCommStatus |partyId |Added |No |NA
+|ContactListCommStatus |messageId |Added |No |NA
+|ContactListCommStatus |changeByUserLoginId |Added |No |NA
+|ContactMechAttribute |attrDescription |Added |No |NA
+|ContactMechTypeAttr |description |Added |No |NA
+|DeductionType |parentTypeId |Added |No |NA
+|DeductionType |hasTable |Added |No |NA
+|DocumentAttribute |attrDescription |Added |No |NA
+|DocumentTypeAttr |description |Added |No |NA
+|EmploymentApp |approverPartyId |Added |No |NA
+|EmploymentApp |jobRequisitionId |Added |No |NA
+|EmploymentAppSourceType |parentTypeId |Added |No |NA
+|EmploymentAppSourceType |hasTable |Added |No |NA
+|EmplPositionClassType |parentTypeId |Added |No |NA
+|EmplPositionClassType |hasTable |Added |No |NA
+|EmplPositionType |parentTypeId |Added |No |NA
+|EmplPositionType |hasTable |Added |No |NA
+|EmplPositionType |partyId |Removed |No |NA
+|EmplPositionType |roleTypeId |Removed |No |NA
+|FinAccountAttribute |attrDescription |Added |No |NA
+|FinAccountTransAttribute |attrDescription |Added |No |NA
+|FinAccountTrans |glReconciliationId |Added |No |NA
+|FinAccountTrans |statusId |Added |No |NA
+|FinAccountTransTypeAttr |description |Added |No |NA
+|FinAccountTypeAttr |description |Added |No |NA
+|FinAccountStatus |changeByUserLoginId |Added |No |NA
+|FixedAsset |acquireOrderId |Added |No |NA
+|FixedAsset |acquireOrderItemSeqId |Added |No |NA
+|FixedAssetAttribute |attrDescription |Added |No |NA
+|FixedAssetTypeAttr |description |Added |No |NA
+|GlAccount |externalId |Added |No |NA
+|GlAccount |openingBalance |Added |No |NA
+|GlReconciliation |createdDate |Added |No |NA
+|GlReconciliation |lastModifiedDate |Added |No |NA
+|GlReconciliation |statusId |Added |No |NA
+|GlReconciliation |openingBalance |Added |No |NA
+|InventoryItemAttribute |attrDescription |Added |No |NA
+|InventoryItemStatus |changeByUserLoginId |Added |No |NA
+|InventoryItemTypeAttr |description |Added |No |NA
+|InvoiceAttribute |attrDescription |Added |No |NA
+|InvoiceItemAttribute |attrDescription |Added |No |NA
+|InvoiceItemTypeAttr |description |Added |No |NA
+|InvoiceStatus |changeByUserLoginId |Added |No |NA
+|InvoiceTypeAttr |description |Added |No |NA
+|InvoiceTermAttribute |attrDescription |Added |No |NA
+|JobSandbox |currentRetryCount |Added |No |NA
+|JobSandbox |tempExprId |Added |No |NA
+|JobSandbox |currentRecurrenceCount |Added |No |NA
+|JobSandbox |maxRecurrenceCount |Added |No |NA
+|JobSandbox |jobResult |Added |No |NA
+|OrderAdjustment |amountAlreadyIncluded |Added |No |NA
+|OrderAdjustment |isManual |Added |No |NA
+|OrderAdjustment |oldPercentage |Added |No |NA
+|OrderAdjustment |oldAmountPerQuantity |Added |No |NA
+|OrderAdjustment |lastModifiedDate |Added |No |NA
+|OrderAdjustment |lastModifiedByUserLogin |Added |No |NA
+|OrderAdjustmentAttribute |attrDescription |Added |No |NA
+|OrderAdjustmentTypeAttr |description |Added |No |NA
+|OrderAttribute |attrDescription |Added |No |NA
+|OrderItem |supplierProductId |Added |No |NA
+|OrderItem |cancelBackOrderDate |Added |No |NA
+|OrderItem |changeByUserLoginId |Added |No |NA
+|OrderItemAttribute |attrDescription |Added |No |NA
+|OrderItemShipGroup |facilityId |Added |No |NA
+|OrderItemShipGroup |estimatedShipDate |Added |No |NA
+|OrderItemShipGroup |estimatedDeliveryDate |Added |No |NA
+|OrderItemShipGrpInvRes |priority |Added |No |NA
+|OrderItemShipGrpInvRes |oldPickStartDate |Added |No |NA
+|OrderItemTypeAttr |description |Added |No |NA
+|OrderTermAttribute |attrDescription |Added |No |NA
+|OrderPaymentPreference |track2 |Added |No |NA
+|OrderPaymentPreference |swipedFlag |Added |No |NA
+|OrderPaymentPreference |lastModifiedDate |Added |No |NA
+|OrderPaymentPreference |lastModifiedByUserLogin |Added |No |NA
+|OrderShipment |shipGroupSeqId |Added |No |NA
+|OrderTypeAttr |description |Added |No |NA
+|PartyAcctgPreference |orderSequenceEnumId |Removed |No |NA
+|PartyAcctgPreference |quoteSequenceEnumId |Removed |No |NA
+|PartyAcctgPreference |invoiceSequenceEnumId |Removed |No |NA
+|PartyAcctgPreference |oldOrderSequenceEnumId |Added |No |NA
+|PartyAcctgPreference |oldQuoteSequenceEnumId |Added |No |NA
+|PartyAcctgPreference |oldInvoiceSequenceEnumId |Added |No |NA
+|PartyAcctgPreference |orderSeqCustMethId |Added |No |NA
+|PartyQual |infoString |Removed |No |NA
+|PartyQual |institutionInternalId |Removed |No |NA
+|PartyQual |institutionPartyId |Removed |No |NA
+|PartyQual |partyQualId |Removed |No |NA
+|PartyRate |percentageUsed |Added |No |NA
+|PartyRate |rate |Removed |No |NA
+|PartyResume |contentId |Added |No |NA
+|PaymentAttribute |attrDescription |Added |No |NA
+|PaymentGatewayResponse |gatewayCvResult |Added |No |NA
+|PaymentMethod |finAccountId |Added |No |NA
+|PaymentTypeAttr |description |Added |No |NA
+|PerfRatingType |parentTypeId |Added |No |NA
+|PerfRatingType |hasTable |Added |No |NA
+|PerfReview |payHistoryRoleTypeIdTo |Removed |No |NA
+|PerfReview |payHistoryRoleTypeIdFrom |Removed |No |NA
+|PerfReview |payHistoryPartyIdTo |Removed |No |NA
+|PerfReview |payHistoryPartyIdFrom |Removed |No |NA
+|PerfReview |payHistoryFromDate |Removed |No |NA
+|PerfReviewItemType |parentTypeId |Added |No |NA
+|PerfReviewItemType |hasTable |Added |No |NA
+|PersonTraining |trainingRequestId |Added |No |NA
+|PersonTraining |workEffortId |Added |No |NA
+|PersonTraining |approverId |Added |No |NA
+|PersonTraining |approvalStatus |Added |No |NA
+|PersonTraining |reason |Added |No |NA
+|PostalAddress |houseNumber |Added |No |NA
+|PostalAddress |houseNumberExt |Added |No |NA
+|PostalAddress |cityGeoId |Added |No |NA
+|PostalAddress |municipalityGeoId |Added |No |NA
+|PostalAddress |geoPointId |Added |No |NA
+|PosTerminal |terminalName |Added |No |NA
+|PosTerminalInternTx |reasonEnumId |Added |No |NA
+|Product |releaseDate |Added |No |NA
+|Product |originalImageUrl |Added |No |NA
+|Product |inventoryItemTypeId |Added |No |NA
+|Product |shippingWeight |Added |No |NA
+|Product |productWeight |Added |No |NA
+|Product |diameterUomId |Added |No |NA
+|Product |productDiameter |Added |No |NA
+|Product |virtualVariantMethodEnum |Added |No |NA
+|Product |defaultShipmentBoxTypeId |Added |No |NA
+|Product |lotIdFilledIn |Added |No |NA
+|Product |orderDecimalQuantity |Added |No |NA
+|Product |weight |Removed |No |NA
+|Product |taxCategory |Removed |No |NA
+|Product |taxVatCode |Removed |No |NA
+|Product |taxDutyCode |Removed |No |NA
+|ProductAttribute |attrDescription |Added |No |NA
+|ProductAverageCost |productAverageCostTypeId |Added |No |NA
+|ProductAverageCost |facilityId |Added |No |NA
+|ProductContent |sequenceNum |Added |No |NA
+|ProductKeyword |keywordTypeId |Added |No |NA
+|ProductKeyword |statusId |Added |No |NA
+|ProductRole |sequenceNum |Added |No |NA
+|ProductStore |balanceResOnOrderCreation |Added |No |NA
+|ProductStore |defaultTimeZoneString |Added |No |NA
+|ProductStore |oldStyleSheet |Added |No |NA
+|ProductStore |oldHeaderLogo |Added |No |NA
+|ProductStore |oldHeaderRightBackground |Added |No |NA
+|ProductStore |oldHeaderMiddleBackground |Added |No |NA
+|ProductStore |styleSheet |Removed |No |NA
+|ProductStore |headerLogo |Removed |No |NA
+|ProductStore |headerRightBackground |Removed |No |NA
+|ProductStore |headerMiddleBackground |Removed |No |NA
+|ProductStorePaymentSetting |paymentCustomMethodId |Added |No |NA
+|ProductStorePaymentSetting |paymentGatewayConfigId |Added |No |NA
+|ProductStoreShipmentMeth |shipmentCustomMethodId |Added |No |NA
+|ProductStoreShipmentMeth |shipmentGatewayConfigId |Added |No |NA
+|ProductStoreShipmentMeth |allowancePercent |Added |No |NA
+|ProductStoreShipmentMeth |minimumPrice |Added |No |NA
+|ProductTypeAttribute |attrDescription |Added |No |NA
+|QuoteAdjustment |lastModifiedDate |Added |No |NA
+|QuoteAdjustment |lastModifiedByUserLogin |Added |No |NA
+|QuoteAttribute |attrDescription |Added |No |NA
+|QuoteItem |leadTimeDays |Added |No |NA
+|QuoteRole |fromDate |Added |Yes |NA
+|QuoteRole |thruDate |Added |No |NA
+|QuoteTerm |termDays |Added |No |NA
+|QuoteTerm |textValue |Added |No |NA
+|QuoteTerm |description |Added |No |NA
+|QuoteTermAttribute |attrDescription |Added |No |NA
+|QuoteTypeAttr |description |Added |No |NA
+|RequirementAttribute |changeByUserLoginId |Added |No |NA
+|RequirementStatus |changeByUserLoginId |Added |No |NA
+|ResponsibilityType |parentTypeId |Added |No |NA
+|ResponsibilityType |hasTable |Added |No |NA
+|ReturnAdjustment |createdByUserLoginId |Added |No |NA
+|ReturnAdjustment |lastModifiedDate |Added |No |NA
+|ReturnAdjustment |lastModifiedByUserLogin |Added |No |NA
+|ReturnHeader |supplierRmaId |Added |No |NA
+|ReturnItemResponse |finAccountTransId |Added |No |NA
+|ReturnStatus |changeByUserLoginId |Added |No |NA
+|SalaryStep |fromDate |Added |Yes |NA
+|SalaryStep |thruDate |Added |No |NA
+|SalaryStep |createdByUserLoginId |Added |No |NA
+|SalaryStep |lastModifiedByUserLogin |Added |No |NA
+|SalesOpportunity |nextStepDate |Added |No |NA
+|ServiceSemaphore |lockedByInstanceId |Added |No |NA
+|ShoppingListItem |modifiedPrice |Added |No |NA
+|SkillType |parentTypeId |Added |No |NA
+|SkillType |hasTable |Added |No |NA
+|SupplierProduct |shippingPrice |Added |No |NA
+|SupplierProduct |supplierCommissionPerc |Removed |No |NA
+|TaxAuthorityRateProduct |isTaxInShippingPrice |Added |No |NA
+|TerminationType |parentTypeId |Added |No |NA
+|TerminationType |hasTable |Added |No |NA
+|TestingNodeMember |extendFromDate |Added |No |NA
+|TestingNodeMember |extendThruDate |Added |No |NA
+|TimeEntry |planHour |Added |No |NA
+|Timesheet |approvedByUserLoginId |Added |No |NA
+|TrainingClassType |parentTypeId |Added |No |NA
+|TrainingClassType |hasTable |Added |No |NA
+|UnemploymentClaim |thruDate |Added |No |NA
+|UserLogin |externalAuthId |Added |No |NA
+|UserLogin |userLdapDn |Added |No |NA
+|UserLogin |disabledBy |Added |No |NA
+|ValueLinkKey |createdByUserLogin |Added |No |NA
+|WebSite |visualThemeSetId |Added |No |NA
+|WebSite |hostedPathAlias |Added |No |NA
+|WebSite |isDefault |Added |No |NA
+|WebSite |displayMaintenancePage |Added |No |NA
+|WebSitePathAlias |fromDate |Added |Yes |R1738588
+|WebSitePathAlias |thruDate |Added |No |R1738588
+|WorkEffort |tempExprId |Added |No |NA
+|WorkEffort |sequenceNum |Added |No |NA
+|WorkEffortAttribute |attrDescription |Added |No |NA
+|WorkEffortAssocAttribute |attrDescription |Added |No |NA
+|WorkEffortAssocTypeAttr |description |Added |No |NA
+|WorkEffortContactMech |fromDate |Added |Yes |NA
+|WorkEffortContactMech |thruDate |Added |No |NA
+|WorkEffortFixedAssetAssign |availabilityStatusId |Added |No |NA
+|WorkEffortPartyAssignment |assignedByUserLoginId |Added |No |NA
+|WorkEffortPurposeType |parentTypeId |Added |No |NA
+|WorkEffortStatus |reason |Added |No |NA
+|WorkEffortTypeAttr |description |Added |No |NA
+|WorkOrderItemFulfillment |shipGroupSeqId |Added |No |NA
+|=================================================================
diff --git a/applications/datamodel/DATAMODEL_CHANGES.md b/applications/datamodel/DATAMODEL_CHANGES.md
deleted file mode 100644
index 9836db0..0000000
--- a/applications/datamodel/DATAMODEL_CHANGES.md
+++ /dev/null
@@ -1,402 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-Apache OFBiz® Data Model Changes
-=============
-Apache OFBiz follows **The Universal Data Model** by **Len Silverston**, with a grain of salt.
-
-The following file contains information about the data model changes in the Apache OFBiz.
-The detailed description of migration scripts specified here can be found at [Revisions Requiring Data Migration - upgrade ofbiz](https://cwiki.apache.org/confluence/x/LoBr) page.
-
-# Changes with OFBiz Trunk (Upcoming Branch)
-
-## Entity Changes
-**Added 1 new entity**
-1. ProdPromoCodeContactMech
-
-**Removed/Deprecate 1 entity**
-1. ProductPromoCodeEmail
-
-## Field Changes
-
-| Entity  | Field  | Action | IsPK | Revision |
-|:------------- |:---------------:|:---------------:|:---------------:| -------------:|
-| GlXbrlClass | parentGlXbrlClassId | Added | No | 36a123a |
-
-
-## Migration Scripts
-1. Migration service migrateProductPromoCodeEmail is implemented to migrate the ProductPromoCodeEmail entity to ProductPromoCodeContactMech. (More detail at [OFBIZ-5426](https://issues.apache.org/jira/browse/OFBIZ-5426))
-
-# Changes with OFBiz 17
-Field types "id-ne", "id-long-ne" & "id-vlong-ne" has been removed. Use "id", "id-long" and "id-vlong" instead (detailed description at [OFBIZ-9351](https://issues.apache.org/jira/browse/OFBIZ-9351)).
-
-## Entity Changes
-No changes
-
-## Field Changes
-
-| Entity  | Field  | Action | IsPK | Revision |
-|:------------- |:---------------:|:---------------:|:---------------:| -------------:|
-| MarketingCampaignPrice | fromDate | Added | Yes | R1805961 |
-| MarketingCampaignPrice | thruDate | Added | No | R1805961 |
-| MarketingCampaignPromo | fromDate | Added | Yes | R1805961 |
-| MarketingCampaignPromo | thruDate | Added | No | R1805961 |
-| MarketingCampaignRole | fromDate | Added | Yes | R1805961 |
-| MarketingCampaignRole | thruDate | Added | No | R1805961 |
-| Product | manufacturerPartyId | Removed | No| R1804408 |
-| SecurityGroupPermission | fromDate | Added | Yes | R1812383 |
-| SecurityGroupPermission | thruDate | Added | No | R1812383 |
-
-## Migration Scripts
-1. Updated sql-type for date-time and time field in fieldtypemysql.xml file
-R1793300 "Update msyql sql-type for datetime field-type to support Fractional Seconds in Time Values
-Please upgrade mysql to at least 5.6.4 or higher.
-After upgrade run 'generateMySqlFileWithAlterTableForTimestamps' service, groupName is required field for this service,
-It will generate sql file with alter query statement for date-time and time field at location "${ofbiz.home}/runtime/tempfiles/<groupName>.sql"
-You can use execute sql statement from any of the mysql batch command.
-
-# Changes between OFBiz 9 to OFBiz 16
-
-## Entity Changes
-**Added 77 new entities**
-
-1. JobRequisition
-2. ProductAverageCostType
-3. WorkEffortSurveyAppl
-4. WorkEffortIcalData
-5. WebSiteContactList
-6. WebAnalyticsType
-7. WebAnalyticsConfig
-8. UserLoginSecurityQuestion
-9. UomGroup
-10. TrainingRequest
-11. ThirdPartyLogin
-12. TestFieldType
-13. TestingSubtype
-14. TestingStatus
-15. TestingRemoveAll
-16. TestingItem
-17. TestingCrypto
-18. SystemProperty
-19. ShipmentGatewayUsps
-20. ShipmentGatewayUps
-21. ShipmentGatewayFedex
-22. ShipmentGatewayDhl
-23. ShipmentGatewayConfig
-24. ShipmentGatewayConfigType
-25. ReturnContactMech
-26. QuoteNote
-27. ProductPromoContent
-28. ProductPromoContentType
-29. ProductGroupOrder
-30. ProductCostComponentCalc
-31. CostComponentCalc
-32. PayPalPaymentMethod
-33. PaymentGroupType
-34. PaymentGroup
-35. PaymentGroupMember
-36. PaymentGatewayConfig
-37. PaymentGatewayConfigType
-38. PaymentGatewayWorldPay
-39. PaymentGatewaySecurePay
-40. PaymentGatewaySagePay
-41. PaymentGatewayOrbital
-42. PaymentGatewayEway
-43. PaymentGatewayCyberSource
-44. PaymentGatewayAuthorizeNet
-45. PaymentGatewayIDEAL
-46. PaymentContentType
-47. PaymentContent
-48. OAuth2LinkedIn
-49. OAuth2GitHub
-50. JobManagerLock
-51. JobInterviewType
-52. JobInterview
-53. JavaResource
-54. InvoiceNote
-55. InvoiceItemAssocType
-56. InvoiceItemAssoc
-57. InvoiceContentType
-58. InvoiceContent
-59. GlAccountCategoryType
-60. GlAccountCategoryMember
-61. GlAccountCategory
-62. GitHubUser
-63. FixedAssetTypeGlAccount
-64. FacilityContent
-65. ExcelImportHistory
-66. EmplLeaveReasonType
-67. EbayShippingMethod
-68. EbayConfig
-69. CountryAddressFormat
-70. ContentSearchResult
-71. ContentSearchConstraint
-72. ContentKeyword
-73. CheckAccount
-74. AgreementFacilityAppl
-75. AgreementContentType
-76. AgreementContent
-
-**Removed 8 entities**
-
-1. DepreciationMethod
-2. FixedAssetMaintMeter
-3. OagisMessageErrorInfo
-4. OagisMessageInfo
-5. SalesOpportunityTrackingCode
-6. SimpleSalesTaxLookup
-7. TestBlob
-8. WorkEffortAssignmentRate
-
-
-## Field Changes
-
-| Entity  | Field  | Action | IsPK | Revision |
-|:------------- |:---------------:|:---------------:|:---------------:|:---------------:|
-| AcctgTransAttribute | attrDescription | Added | No | NA |
-| AcctgTransEntry | inventoryItemId | Added | No | NA |
-| AcctgTransTypeAttr | description | Added | No | NA |
-| BenefitType | parentTypeId | Added | No | NA |
-| BenefitType | hasTable | Added | No | NA |
-| BudgetAttribute | attrDescription | Added | No | NA |
-| BudgetItemAttribute | attrDescription | Added | No | NA |
-| BudgetItemTypeAttr | description | Added | No | NA |
-| BudgetStatus | changeByUserLoginId | Added | No | NA |
-| BudgetTypeAttr | description | Added | No | NA |
-| CommunicationEventRole | statusId | Added | No | NA |
-| CommunicationEventType | contactMechTypeId | Added | No | NA |
-| ContactListCommStatus | partyId | Added | No | NA |
-| ContactListCommStatus | messageId | Added | No | NA |
-| ContactListCommStatus | changeByUserLoginId | Added | No | NA |
-| ContactMechAttribute | attrDescription | Added | No | NA |
-| ContactMechTypeAttr | description | Added | No | NA |
-| DeductionType | parentTypeId | Added | No | NA |
-| DeductionType | hasTable | Added | No | NA |
-| DocumentAttribute | attrDescription | Added | No | NA |
-| DocumentTypeAttr | description | Added | No | NA |
-| EmploymentApp | approverPartyId | Added | No | NA |
-| EmploymentApp | jobRequisitionId | Added | No | NA |
-| EmploymentAppSourceType | parentTypeId | Added | No | NA |
-| EmploymentAppSourceType | hasTable | Added | No | NA |
-| EmplPositionClassType | parentTypeId | Added | No | NA |
-| EmplPositionClassType | hasTable | Added | No | NA |
-| EmplPositionType | parentTypeId | Added | No | NA |
-| EmplPositionType | hasTable | Added | No | NA |
-| EmplPositionType | partyId | Removed | No | NA |
-| EmplPositionType | roleTypeId | Removed | No | NA |
-| FinAccountAttribute | attrDescription | Added | No | NA |
-| FinAccountTransAttribute | attrDescription | Added | No | NA |
-| FinAccountTrans | glReconciliationId | Added | No | NA |
-| FinAccountTrans | statusId | Added | No | NA |
-| FinAccountTransTypeAttr | description | Added | No | NA |
-| FinAccountTypeAttr | description | Added | No | NA |
-| FinAccountStatus | changeByUserLoginId | Added | No | NA |
-| FixedAsset | acquireOrderId | Added | No | NA |
-| FixedAsset | acquireOrderItemSeqId | Added | No | NA |
-| FixedAssetAttribute | attrDescription | Added | No | NA |
-| FixedAssetTypeAttr | description | Added | No | NA |
-| GlAccount | externalId | Added | No | NA |
-| GlAccount | openingBalance | Added | No | NA |
-| GlReconciliation | createdDate | Added | No | NA |
-| GlReconciliation | lastModifiedDate | Added | No | NA |
-| GlReconciliation | statusId | Added | No | NA |
-| GlReconciliation | openingBalance | Added | No | NA |
-| InventoryItemAttribute | attrDescription | Added | No | NA |
-| InventoryItemStatus | changeByUserLoginId | Added | No | NA |
-| InventoryItemTypeAttr | description | Added | No | NA |
-| InvoiceAttribute | attrDescription | Added | No | NA |
-| InvoiceItemAttribute | attrDescription | Added | No | NA |
-| InvoiceItemTypeAttr | description | Added | No | NA |
-| InvoiceStatus | changeByUserLoginId | Added | No | NA |
-| InvoiceTypeAttr | description | Added | No | NA |
-| InvoiceTermAttribute | attrDescription | Added | No | NA |
-| JobSandbox | currentRetryCount | Added | No | NA |
-| JobSandbox | tempExprId | Added | No | NA |
-| JobSandbox | currentRecurrenceCount | Added | No | NA |
-| JobSandbox | maxRecurrenceCount | Added | No | NA |
-| JobSandbox | jobResult | Added | No | NA |
-| OrderAdjustment | amountAlreadyIncluded | Added | No | NA |
-| OrderAdjustment | isManual | Added | No | NA |
-| OrderAdjustment | oldPercentage | Added | No | NA |
-| OrderAdjustment | oldAmountPerQuantity | Added | No | NA |
-| OrderAdjustment | lastModifiedDate | Added | No | NA |
-| OrderAdjustment | lastModifiedByUserLogin | Added | No | NA |
-| OrderAdjustmentAttribute | attrDescription | Added | No | NA |
-| OrderAdjustmentTypeAttr | description | Added | No | NA |
-| OrderAttribute | attrDescription | Added | No | NA |
-| OrderItem | supplierProductId | Added | No | NA |
-| OrderItem | cancelBackOrderDate | Added | No | NA |
-| OrderItem | changeByUserLoginId | Added | No | NA |
-| OrderItemAttribute | attrDescription | Added | No | NA |
-| OrderItemShipGroup | facilityId | Added | No | NA |
-| OrderItemShipGroup | estimatedShipDate | Added | No | NA |
-| OrderItemShipGroup | estimatedDeliveryDate | Added | No | NA |
-| OrderItemShipGrpInvRes | priority | Added | No | NA |
-| OrderItemShipGrpInvRes | oldPickStartDate | Added | No | NA |
-| OrderItemTypeAttr | description | Added | No | NA |
-| OrderTermAttribute | attrDescription | Added | No | NA |
-| OrderPaymentPreference | track2 | Added | No | NA |
-| OrderPaymentPreference | swipedFlag | Added | No | NA |
-| OrderPaymentPreference | lastModifiedDate | Added | No | NA |
-| OrderPaymentPreference | lastModifiedByUserLogin | Added | No | NA |
-| OrderShipment | shipGroupSeqId | Added | No | NA |
-| OrderTypeAttr | description | Added | No | NA |
-| PartyAcctgPreference | orderSequenceEnumId | Removed | No | NA |
-| PartyAcctgPreference | quoteSequenceEnumId | Removed | No | NA |
-| PartyAcctgPreference | invoiceSequenceEnumId | Removed | No | NA |
-| PartyAcctgPreference | oldOrderSequenceEnumId | Added | No | NA |
-| PartyAcctgPreference | oldQuoteSequenceEnumId | Added | No | NA |
-| PartyAcctgPreference | oldInvoiceSequenceEnumId | Added | No | NA |
-| PartyAcctgPreference | orderSeqCustMethId | Added | No | NA |
-| PartyQual | infoString | Removed | No | NA |
-| PartyQual | institutionInternalId | Removed | No | NA |
-| PartyQual | institutionPartyId | Removed | No | NA |
-| PartyQual | partyQualId | Removed | No | NA |
-| PartyRate | percentageUsed | Added | No | NA |
-| PartyRate | rate | Removed | No | NA |
-| PartyResume | contentId | Added | No | NA |
-| PaymentAttribute | attrDescription | Added | No | NA |
-| PaymentGatewayResponse | gatewayCvResult | Added | No | NA |
-| PaymentMethod | finAccountId | Added | No | NA |
-| PaymentTypeAttr | description | Added | No | NA |
-| PerfRatingType | parentTypeId | Added | No | NA |
-| PerfRatingType | hasTable | Added | No | NA |
-| PerfReview | payHistoryRoleTypeIdTo | Removed | No | NA |
-| PerfReview | payHistoryRoleTypeIdFrom | Removed | No | NA |
-| PerfReview | payHistoryPartyIdTo | Removed | No | NA |
-| PerfReview | payHistoryPartyIdFrom | Removed | No | NA |
-| PerfReview | payHistoryFromDate | Removed | No | NA |
-| PerfReviewItemType | parentTypeId | Added | No | NA |
-| PerfReviewItemType | hasTable | Added | No | NA |
-| PersonTraining | trainingRequestId | Added | No | NA |
-| PersonTraining | workEffortId | Added | No | NA |
-| PersonTraining | approverId | Added | No | NA |
-| PersonTraining | approvalStatus | Added | No | NA |
-| PersonTraining | reason | Added | No | NA |
-| PostalAddress | houseNumber | Added | No | NA |
-| PostalAddress | houseNumberExt | Added | No | NA |
-| PostalAddress | cityGeoId | Added | No | NA |
-| PostalAddress | municipalityGeoId | Added | No | NA |
-| PostalAddress | geoPointId | Added | No | NA |
-| PosTerminal | terminalName | Added | No | NA |
-| PosTerminalInternTx | reasonEnumId | Added | No | NA |
-| Product | releaseDate | Added | No | NA |
-| Product | originalImageUrl | Added | No | NA |
-| Product | inventoryItemTypeId | Added | No | NA |
-| Product | shippingWeight | Added | No | NA |
-| Product | productWeight | Added | No | NA |
-| Product | diameterUomId | Added | No | NA |
-| Product | productDiameter | Added | No | NA |
-| Product | virtualVariantMethodEnum | Added | No | NA |
-| Product | defaultShipmentBoxTypeId | Added | No | NA |
-| Product | lotIdFilledIn | Added | No | NA |
-| Product | orderDecimalQuantity | Added | No | NA |
-| Product | weight | Removed | No | NA |
-| Product | taxCategory | Removed | No | NA |
-| Product | taxVatCode | Removed | No | NA |
-| Product | taxDutyCode | Removed | No | NA |
-| ProductAttribute | attrDescription | Added | No | NA |
-| ProductAverageCost | productAverageCostTypeId | Added | No | NA |
-| ProductAverageCost | facilityId | Added | No | NA |
-| ProductContent | sequenceNum | Added | No | NA |
-| ProductKeyword | keywordTypeId | Added | No | NA |
-| ProductKeyword | statusId | Added | No | NA |
-| ProductRole | sequenceNum | Added | No | NA |
-| ProductStore | balanceResOnOrderCreation | Added | No | NA |
-| ProductStore | defaultTimeZoneString | Added | No | NA |
-| ProductStore | oldStyleSheet | Added | No | NA |
-| ProductStore | oldHeaderLogo | Added | No | NA |
-| ProductStore | oldHeaderRightBackground | Added | No | NA |
-| ProductStore | oldHeaderMiddleBackground | Added | No | NA |
-| ProductStore | styleSheet | Removed | No | NA |
-| ProductStore | headerLogo | Removed | No | NA |
-| ProductStore | headerRightBackground | Removed | No | NA |
-| ProductStore | headerMiddleBackground | Removed | No | NA |
-| ProductStorePaymentSetting | paymentCustomMethodId | Added | No | NA |
-| ProductStorePaymentSetting | paymentGatewayConfigId | Added | No | NA |
-| ProductStoreShipmentMeth | shipmentCustomMethodId | Added | No | NA |
-| ProductStoreShipmentMeth | shipmentGatewayConfigId | Added | No | NA |
-| ProductStoreShipmentMeth | allowancePercent | Added | No | NA |
-| ProductStoreShipmentMeth | minimumPrice | Added | No | NA |
-| ProductTypeAttribute | attrDescription | Added | No | NA |
-| QuoteAdjustment | lastModifiedDate | Added | No | NA |
-| QuoteAdjustment | lastModifiedByUserLogin | Added | No | NA |
-| QuoteAttribute | attrDescription | Added | No | NA |
-| QuoteItem | leadTimeDays | Added | No | NA |
-| QuoteRole | fromDate | Added | Yes | NA |
-| QuoteRole | thruDate | Added | No | NA |
-| QuoteTerm | termDays | Added | No | NA |
-| QuoteTerm | textValue | Added | No | NA |
-| QuoteTerm | description | Added | No | NA |
-| QuoteTermAttribute | attrDescription | Added | No | NA |
-| QuoteTypeAttr | description | Added | No | NA |
-| RequirementAttribute | changeByUserLoginId | Added | No | NA |
-| RequirementStatus | changeByUserLoginId | Added | No | NA |
-| ResponsibilityType | parentTypeId | Added | No | NA |
-| ResponsibilityType | hasTable | Added | No | NA |
-| ReturnAdjustment | createdByUserLoginId | Added | No | NA |
-| ReturnAdjustment | lastModifiedDate | Added | No | NA |
-| ReturnAdjustment | lastModifiedByUserLogin | Added | No | NA |
-| ReturnHeader | supplierRmaId | Added | No | NA |
-| ReturnItemResponse | finAccountTransId | Added | No | NA |
-| ReturnStatus | changeByUserLoginId | Added | No | NA |
-| SalaryStep | fromDate | Added | Yes | NA |
-| SalaryStep | thruDate | Added | No | NA |
-| SalaryStep | createdByUserLoginId | Added | No | NA |
-| SalaryStep | lastModifiedByUserLogin | Added | No | NA |
-| SalesOpportunity | nextStepDate | Added | No | NA |
-| ServiceSemaphore | lockedByInstanceId | Added | No | NA |
-| ShoppingListItem | modifiedPrice | Added | No | NA |
-| SkillType | parentTypeId | Added | No | NA |
-| SkillType | hasTable | Added | No | NA |
-| SupplierProduct | shippingPrice | Added | No | NA |
-| SupplierProduct | supplierCommissionPerc | Removed | No | NA |
-| TaxAuthorityRateProduct | isTaxInShippingPrice | Added | No | NA |
-| TerminationType | parentTypeId | Added | No | NA |
-| TerminationType | hasTable | Added | No | NA |
-| TestingNodeMember | extendFromDate | Added | No | NA |
-| TestingNodeMember | extendThruDate | Added | No | NA |
-| TimeEntry | planHour | Added | No | NA |
-| Timesheet | approvedByUserLoginId | Added | No | NA |
-| TrainingClassType | parentTypeId | Added | No | NA |
-| TrainingClassType | hasTable | Added | No | NA |
-| UnemploymentClaim | thruDate | Added | No | NA |
-| UserLogin | externalAuthId | Added | No | NA |
-| UserLogin | userLdapDn | Added | No | NA |
-| UserLogin | disabledBy | Added | No | NA |
-| ValueLinkKey | createdByUserLogin | Added | No | NA |
-| WebSite | visualThemeSetId | Added | No | NA |
-| WebSite | hostedPathAlias | Added | No | NA |
-| WebSite | isDefault | Added | No | NA |
-| WebSite | displayMaintenancePage | Added | No | NA |
-| WebSitePathAlias| fromDate | Added | Yes | R1738588 |
-| WebSitePathAlias| thruDate | Added | No | R1738588 |
-| WorkEffort | tempExprId | Added | No | NA |
-| WorkEffort | sequenceNum | Added | No | NA |
-| WorkEffortAttribute | attrDescription | Added | No | NA |
-| WorkEffortAssocAttribute | attrDescription | Added | No | NA |
-| WorkEffortAssocTypeAttr | description | Added | No | NA |
-| WorkEffortContactMech | fromDate | Added | Yes | NA |
-| WorkEffortContactMech | thruDate | Added | No | NA |
-| WorkEffortFixedAssetAssign | availabilityStatusId | Added | No | NA |
-| WorkEffortPartyAssignment | assignedByUserLoginId | Added | No | NA |
-| WorkEffortPurposeType | parentTypeId | Added | No | NA |
-| WorkEffortStatus | reason | Added | No | NA |
-| WorkEffortTypeAttr | description | Added | No | NA |
-| WorkOrderItemFulfillment | shipGroupSeqId | Added | No | NA |
diff --git a/applications/datamodel/README.adoc b/applications/datamodel/README.adoc
new file mode 100644
index 0000000..7d37a7d
--- /dev/null
+++ b/applications/datamodel/README.adoc
@@ -0,0 +1,36 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= Datamodel component
+The Apache OFBiz® Project
+Release 17.12
+
+This OFBiz component contains all entity definitions used in the various components in the base and plugins stack.
+
+== more information
+For more information about this component visit the product page in the OFBiz WIKI,
+which can be found at https://cwiki.apache.org/confluence/display/OFBIZ/Datamodel
+
+For information about datamodel change read documentation DATAMODEL_CHANGES.adoc.
+It's included in Developer manual > chapter Entity Engine
+
+== issues
+JIRA issues related to this component can be found at https://issues.apache.org/jira/browse/OFBIZ/component/12330107
+
+== commits
+Committed revisions can be viewed at https://svn.apache.org/viewvc/ofbiz/trunk/applications/datamodel/
diff --git a/applications/datamodel/README.md b/applications/datamodel/README.md
deleted file mode 100644
index c042237..0000000
--- a/applications/datamodel/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-<img src="http://ofbiz.apache.org/images/OFBiz-logo.png" alt="Apache OFBiz" />
-
-# Datamodel component
-This OFBiz component contains all entity definitions used in the various components in the base and plugins stack.
-
-## more information
-For more information about this component visit the product page in the OFBiz WIKI, 
-which can be found at https://cwiki.apache.org/confluence/display/OFBIZ/Datamodel
-
-## issues
-JIRA issues related to this component can be found at https://issues.apache.org/jira/browse/OFBIZ/component/12330107
-
-## commits
-Committed revisions can be viewed at https://svn.apache.org/viewvc/ofbiz/trunk/applications/datamodel/
\ No newline at end of file
diff --git a/docs/asciidoc/developer-manual.adoc b/docs/asciidoc/developer-manual.adoc
index 740fd97..56118ef 100644
--- a/docs/asciidoc/developer-manual.adoc
+++ b/docs/asciidoc/developer-manual.adoc
@@ -217,6 +217,8 @@ include::../../framework/webapp/src/docs/asciidoc/webapp.adoc[leveloffset=+1]
 
 === Supported databases
 
+include::../../applications/datamodel/DATAMODEL_CHANGES.adoc[leveloffset=+2]
+
 == Service Engine
 
 === Declaration and Implementation
diff --git a/themes/README.adoc b/themes/README.adoc
new file mode 100644
index 0000000..e159ee3
--- /dev/null
+++ b/themes/README.adoc
@@ -0,0 +1,28 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+////
+= Apache OFBiz Themes
+The Apache OFBiz® Project
+Release 17.12
+
+This OFBiz component contains all elements needed to manage theming in OFBiz.
+
+== more information
+All detailled documtation are in file `../docs/themes.adoc` +
+This detailled documentation is included in Developer manual > chapter Widget System
+
diff --git a/themes/README.md b/themes/README.md
deleted file mode 100644
index 0582954..0000000
--- a/themes/README.md
+++ /dev/null
@@ -1,314 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-Apache OFBiz Themes
-====================
-
-# What is a theme
-A Theme is an ofbiz component that defines all elements necessary to render all information generated by the screen engine through an embedded technology. 
-Currently themes presents in Apache OFBiz use html5/jquery/css to do that.
-
-To realize that, a theme can define some properties, among them some can be necessary. It can define its own ftl macro to render the different modelScreen elements and can define its own screen decorator to prepare the final user screen structure for the technology used by the theme.
-
-# How to define it
-A theme is a standard component, present in the directory themes or plugins with a file definition present on widget/Theme.xml and support the [widget-theme.xsd](http://ofbiz.apache.org/dtds/widget-theme.xsd)
-
-To offer the possibility for end users to select the theme through the "Select Theme Screen", the theme need to load the entity VisualTheme and one or more entries related to this theme.
-
-# Structure of Theme.xml
-The theme definition file help OFBiz to know what specific rendering the Theme want to use.
-It's composed by two definition elements and four optional blocks
-
-## Main definition
-The First mandatory element is one or several visualThemeId related to the theme
-Defined like that
-```xml
-    <visual-themes>
-        <visual-theme id="MY_THEME"/>
-    </visual-themes>
-```
-You need to define in the database an entry in VisualTheme Entity for each visual-theme id defined.
-```xml
-<entity-engine-xml>
-    <VisualTheme visualThemeId="MY_THEME" visualThemeSetId="BACKOFFICE" description="My theme - Example (based on flatgrey)"/>
-</entity-engine-xml>
-```
->_Note_: a theme component can load one or more visual theme id. Usually only one is present.
-
-The second important (but not mandatory) element is **implements**
-```xml
-   <extends location="component://common-theme/widget/Theme.xml"/>
-```
-This element indicates that your theme copies from the extend theme all information not present in its file definition.
-If this element isn't present in your theme, you will need to define all information present in common-theme to be sure that OFBiz misses nothing for a correct run. Otherwise some functionnalities can be broken...
->_Note_: It's highly recommended to extend the common-theme to be sure that your theme works correctly and to surcharge only what you need.
-
-The four following blocks are optionnal if you define an extends theme
-## General properties
-This block contains all properties that the screen engine can use to prepare the rendering and that the theme can implement
-```xml
-    <widget-properties><!--Transversal properties relative to ofbiz widget component-->
-        <default-view-size value="20"/>
-        <autocompleter
-                default-view-size="10"
-                default-min-lenght="2"
-                default-delay="300"
-                display-return-field="true"/>
-        <lookup
-                position="topleft"
-                width="640"
-                height="500"/>
-        <layered-modal
-                width="800"
-                height="600"/>
-    </widget-properties>
-```
-
-## Theme's specific properties
-This block contains all properties specific to this theme. In general these are some properties present on ftl template, that are initialized by the theme and can be surchaged by another theme through the extends elements.
-```xml
-        <property name="jgrowlPosition" value="center" type="String"/><!--possible value: top-left, top-right, bottom-left, bottom-right, center-->
-        <property name="jgrowlWidth" value="800" type="Integer"/>
-        <property name="jgrowlHeight" value="" type="Integer"/>
-        <property name="jgrowlSpeed" value="100" type="Integer"/>
-```
-## Ftl macro library
-This block defines for each technology implemented by the screen engine where it can find the macro library for each model (Screen, Form, Tree, Menu)
-```xml
-   <templates><!-- Freemarker template use by this theme to render widget model-->
-        <template name="screen" type="html" content-type="UTF-8" encoding="none" encoder="html" compress="false">
-            <template-file widget="screen" location="component://common-theme/template/macro/HtmlScreenMacroLibrary.ftl"/>
-            <template-file widget="form" location="component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
-            <template-file widget="tree" location="component://common-theme/template/macro/HtmlTreeMacroLibrary.ftl"/>
-            <template-file widget="menu" location="component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl"/>
-        </template>
-        ...
-   </templates>
-```
->_Note_: If you want surcharge some macros, you can just create the desired macros and import the others from common-theme (at the top of file) like that : ```<#include "component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>```
-
-## Screen library
-This block defines where OFBiz can find all official screens definitions in framework/common
-
-Normally, you don't need to change this file except if you need to define a default screen style that doesn't exist  OOTB. If you need to extend an existing one, you have to do it in the theme directory.
-
-To define a new default screen style, you have to add it in this file, and point to the screen decorator in common-theme to define your default screen style as the default one.
-
-```xml
-     <common-screens><!--list all common screen and decorator global to each application that each theme can be surcharge or not and use the screen present on common theme-->
-        <structural-decorator default-location="component://common-theme/widget/CommonScreens.xml">
-            <screen name="GlobalDecorator"/>
-            ...
-        </structural-decorator>
-        <embed-decorator default-location="component://common-theme/widget/CommonScreens.xml">
-            <screen name="FindScreenDecorator"/>
-        </embed-decorator>
-        <general-screen default-location="component://common-theme/widget/CommonScreens.xml">
-            <screen name="geoChart"/>
-            ...
-        </general-screen>
-    </common-screens>
-```
-Screens are separated in three types :
-* structural-decorator : contains all decorators that organise the screens structures
-* embed-decorator : decorator used only on sub screens
-* general-screen : list all generic inter applications screens
-# The common-theme
-This is the root theme that contains all information to ensure a good basic theme for OFBiz.
-Currently it keeps all old themes system for backward compatibility with ftl template managed by the entity **VisualThemeResource**
-
-# Create your own theme
-As a theme is a component, you can create a new theme like a plugin. 
-
-After creating a component, you can add the two minimal information :
-
-* Theme.xml file in **plugins/my-theme/widget/** with minimal information :
-```xml
-<theme name="my-theme"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd">
-    <visual-themes>
-        <visual-theme id="MY_THEME" display-name="My Theme"/>
-    </visual-themes>
-</theme>
-```
-
-
-* your data file to add your visual theme in **plugins/my-theme/data/**
-```xml
-<entity-engine-xml>
-    <VisualTheme visualThemeId="MY_THEME" visualThemeSetId="BACKOFFICE"/>
-</entity-engine-xml>
-```
-The presence of VisualTheme entity helps to indicate which theme is available in your instance, specially helpful for tenant installations.
-
-To display your theme in OFBiz theme library, you can complete the information on each visual theme like
-```
-<theme name="my-theme"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd">
-    <visual-themes>
-        <visual-theme id="MY_THEME" display-name="My Theme">
-            <description>My new funny theme under nice tecnno</description>
-            <screenshot location="/mytheme/screenshot1.png"/>
-            <screenshot location="/mytheme/screenshot2.png"/>
-        </visual-theme>
-    </visual-themes>
-</theme>
-```
-
->_Note_: **display-name** and **description** support the flexibleStringExpander syntax
-
-## extends common-theme
-This is a first step to understand how the theme system works. With your new theme, you can try to surchage different elements.
-To start, extends the common-theme :
-```xml
-<theme name="my-theme"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd">
-    <visual-themes>
-        <visual-theme id="MY_THEME" display-name="My Theme">
-            <description>My new funny theme under nice tecnno</description>
-            <screenshot location="/mytheme/screenshot1.png"/>
-        </visual-theme>
-    </visual-themes>
-    <extends location="component://common-theme/widget/Theme.xml"/>
-</theme>
-```
-Now your theme should be operational, but without particularity.
-
-You can surcharge a ftl macro, to do this create your own ftl macro file in **plugins/my-theme/templates/macro/HtmlFormMacroLibrary.ftl** with
-
-```ftl
-<#include "component://common-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
-
-<#macro renderDisplayField type imageLocation idName description title class alert inPlaceEditorUrl="" inPlaceEditorParams="">
-    <#if description?has_content>
-    *###*${description?replace("\n", "<br />")}**<#t/>
-    <#else>
-        *#&nbsp;#*<#t/>
-    </#if>
-</#macro>
-```
-Now indicate to your theme that you want use this library
-```xml
-<theme name="my-theme"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-theme.xsd">
-    <visual-themes>
-        <visual-theme id="MY_THEME" display-name="My Theme">
-            <description>My new funny theme under nice tecnno</description>
-            <screenshot location="/mytheme/screenshot1.png"/>
-        </visual-theme>
-    </visual-themes>
-    <extends location="component://common-theme/widget/Theme.xml"/>
-    <templates>
-        <template name="screen" type="html" content-type="UTF-8" encoding="none" encoder="html" compress="false">
-            <template-file widget="form" location="component://my-theme/template/macro/HtmlFormMacroLibrary.ftl"/>
-        </template>
-    </templates>
-</theme>
-```
-and check the result when you select your theme. The result isn't really interesting but it's to understand how it works.
-
-## create from scratch
-TODO...
-
-# Backware compatibility with OFBiz 16.11 and above
-## How themes worked before
-Before the theme management by model definition, all configurations have been present in the database through entity **VisualTheme** and **VisualThemeRessource**.
-These ressources were loaded in a **layoutProperties** variable and used directly by decorator screens and ftl templates.
-
-## Now with the common-theme
-All this logic is still present in the common-theme template to keep backward compatibility, but the VisualThemeRessource is now useless and properties have been migrated to the Theme definition in the part **theme-properties**
-### Example with BlueLight
-The blue light theme has been these properties in VisualThemeRessource :
-
-```xml
-    <VisualTheme visualThemeId="BLUELIGHT" visualThemeSetId="BACKOFFICE" description="BlueLight Theme: breadcrumbs, drop-down menus and rounded corners"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_NAME" resourceValue="BLUELIGHT" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/images/ofbiz_logo.png" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/bluelight/screenshot.jpg" sequenceId="01"/>
-
-    <!-- CSS references -->
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/bluelight/style.css" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HELPSTYLESHEET" resourceValue="/bluelight/help.css" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_DOCBOOKSTYLESHEET" resourceValue="/bluelight/webapp/bluelight/docbook.css" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/common/js/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.css" sequenceId="02"/>
-
-    <!-- Javascript references -->
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/jquery-1.11.0.min.js" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/jquery-migrate-1.2.1.js" sequenceId="02"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/ui/js/jquery-ui-1.10.3.min.js" sequenceId="03"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/plugins/asmselect/jquery.asmselect-1.0.4a-beta.js" sequenceId="05"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon.min-1.4.3.js" sequenceId="07"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/plugins/fjTimer/jquerytimer-min.js" sequenceId="09"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/plugins/mask/jquery.mask-1.14.13.min.js" sequenceId="10"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/plugins/jeditable/jquery.jeditable-1.7.3.js" sequenceId="11"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/jquery/plugins/validate/jquery.validate.min.js" sequenceId="12"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/plugins/OpenLayers-2.13.1.js" sequenceId="13"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/util/OfbizUtil.js" sequenceId="15"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/util/fieldlookup.js" sequenceId="16"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/plugins/date/date.format-1.2.3-min.js" sequenceId="17"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/plugins/date/date.timezone-min.js" sequenceId="18"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/util/miscAjaxFunctions.js" sequenceId="19"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/util/selectMultipleRelatedValues.js" sequenceId="20"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/util/util.js" sequenceId="21"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/common/js/plugins/date/FromThruDateCheck.js" sequenceId="22"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/bluelight/dropdown.js" sequenceId="30"/>
-
-    <!-- ftl references -->
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://bluelight/template/Header.ftl" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://bluelight/template/Footer.ftl" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_NAV_OPEN_TMPLT" resourceValue="component://bluelight/template/AppBarOpen.ftl" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_NAV_CLOSE_TMPLT" resourceValue="component://bluelight/template/AppBarClose.ftl" sequenceId="01"/>
-    <VisualThemeResource visualThemeId="BLUELIGHT" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://bluelight/template/Messages.ftl" sequenceId="01"/>
-```
-Now it's just
-```xml
-    <VisualTheme visualThemeId="BLUELIGHT" visualThemeSetId="BACKOFFICE"/>
-```
-And on theme definition
-
-```xml
-    <theme-properties>
-        <!--javascript lib-->
-        <property name="VT_HDR_JAVASCRIPT['add']" value="/bluelight/dropdown.js" sequenceId="30"/>
-        <!--Css style-->
-        <property name="VT_STYLESHEET['add']" value="/bluelight/style.css"/>
-        <property name="VT_HELPSTYLESHEET['add']" value="/bluelight/help.css"/>
-        <property name="VT_DOCBOOKSTYLESHEET['add']" value="/bluelight/webapp/bluelight/docbook.css"/>
-        <!--template location-->
-        <property name="VT_HDR_TMPLT_LOC" value="component://bluelight/template/Header.ftl"/>
-        <property name="VT_FTR_TMPLT_LOC" value="component://bluelight/template/Footer.ftl"/>
-        <property name="VT_NAV_OPEN_TMPLT" value="component://bluelight/template/AppBarOpen.ftl"/>
-        <property name="VT_NAV_CLOSE_TMPLT" value="component://bluelight/template/AppBarClose.ftl"/>
-        <property name="VT_MSG_TMPLT_LOC" value="component://bluelight/template/Messages.ftl"/>
-    </theme-properties>
-```
-Values with **/images/...** have been moved to the common-theme that bluelight extends, the theme definition keeps only what the theme adds to the extended theme.
-
->_Note_ property name supports the FlexibleMapAccessor syntax, so you can continue to populate a list (VT_STYLESHEET['add']), reset a list (VT_STYLESHEET[]) or add an element on the top list (VT_STYLESHEET[+0]) because some time the order libraries loading is important
-
-### Migrate you own theme
-Easily, create you Theme.xml and move your VisualThemeResource in **theme-properties** like in the BlueLight example above.
-Maybe you will need to update your template because the modelTheme return ressources not always as list. So :
-`<property name="VT_HDR_TMPLT_LOC" value="component://bluelight/template/Header.ftl"/>` -> return a String with `component://bluelight/template/Header.ftl`
-`<property name="VT_STYLESHEET['add'] value="..."` -> return a List<String>
-


[ofbiz-framework] 05/28: Improved: Apply multi-block attr to each application (OFBIZ-11706)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit c020b56dfee923091f2fb7e3359477ffa5414b8c
Author: James Yong <ja...@apache.org>
AuthorDate: Fri May 22 00:54:20 2020 +0800

    Improved: Apply multi-block attr to each application (OFBIZ-11706)
    
    1. Fix missing Boundary Comment at beginning
    2. Apply multi-block attr
---
 .../widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java  | 2 +-
 themes/common-theme/widget/CommonScreens.xml                            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java
index 9acdbf2..221bd85 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java
@@ -217,7 +217,7 @@ public class HtmlWidget extends ModelScreenWidget {
                 String data = stringWriter.toString();
                 stringWriter.close();
 
-                Document doc = Jsoup.parse(data);
+                Document doc = Jsoup.parseBodyFragment(data);
 
                 // extract scripts
                 Elements scriptElements = doc.select("script");
diff --git a/themes/common-theme/widget/CommonScreens.xml b/themes/common-theme/widget/CommonScreens.xml
index a7655d4..9c9172b 100644
--- a/themes/common-theme/widget/CommonScreens.xml
+++ b/themes/common-theme/widget/CommonScreens.xml
@@ -271,7 +271,7 @@ under the License.
                 <!-- render messages -->
                 <platform-specific>
                     <html>
-                        <html-template location="${messagesTemplateLocation}" />
+                        <html-template multi-block="true" location="${messagesTemplateLocation}" />
                     </html>
                 </platform-specific>
                 <!-- render content area -->


[ofbiz-framework] 25/28: Fixed: organisation tree in humanres doesn't show person names (OFBIZ-11677) (#121)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 4f07148ed0fe5fd566f97259d1f2d9e735dc7b10
Author: Pierre Smits <pi...@orrtiz.com>
AuthorDate: Mon May 25 16:12:16 2020 +0200

    Fixed: organisation tree in humanres doesn't show person names (OFBIZ-11677) (#121)
    
    * Fixed: Tree on main page of the humanres component doesn't show names of persons
    
    (OFBIZ-11677)
    
    When parties are assigned to employee positions their names aren't shown in the tree
    fixed: the function that retrieves the person record of the assigned party was using
    	the wrong variable in the query, resulting in a null being returned. Corrected the variable
    added/improved: retrieval of the middleName value of the person record, added it to the title
    improved: ordering of the names making up the title.
    improved: applying proper case to variable names
    
    * Fixed: Tree on main page of the humanres component doesn't show names of persons
    
    (OFBIZ-11677)
    
    invoking PartyHelper.getPartyName instead of custom code
    code clean-up
    
    Thanks to Pawan Verma for the review and the suggestion
---
 .../org/apache/ofbiz/humanres/HumanResEvents.java  | 114 ++++-----------------
 1 file changed, 20 insertions(+), 94 deletions(-)

diff --git a/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java b/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java
index 610babf..3d58a87 100644
--- a/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java
+++ b/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java
@@ -35,6 +35,7 @@ import org.apache.ofbiz.entity.GenericValue;
 import org.apache.ofbiz.entity.condition.EntityCondition;
 import org.apache.ofbiz.entity.condition.EntityOperator;
 import org.apache.ofbiz.entity.util.EntityQuery;
+import org.apache.ofbiz.party.party.PartyHelper;
 
 public class HumanResEvents {
     public static final String MODULE = HumanResEvents.class.getName();
@@ -48,7 +49,7 @@ public class HumanResEvents {
         String additionParam = request.getParameter("additionParam");
         String hrefString = request.getParameter("hrefString");
         String hrefString2 = request.getParameter("hrefString2");
-
+        List<Map<String,Object>> categoryList = new ArrayList<>();
         Map<String, Object> paramMap = new HashMap<>();
         paramMap.put("delegator", delegator);
         paramMap.put("partyId", partyId);
@@ -57,8 +58,6 @@ public class HumanResEvents {
         paramMap.put("hrefString", hrefString);
         paramMap.put("hrefString2", hrefString2);
 
-        List<Map<String,Object>> categoryList = new ArrayList<>();
-
         //check employee position
         try {
             categoryList.addAll(getCurrentEmployeeDetails(paramMap));
@@ -66,10 +65,9 @@ public class HumanResEvents {
             Debug.logError(e, MODULE);
             return "error";
         }
-
         try {
             GenericValue partyGroup = EntityQuery.use(delegator).from("PartyGroup").where("partyId", partyId).queryOne();
-            if (partyGroup != null) {	
+            if (partyGroup != null) {    
                 paramMap.put("partyGroup", partyGroup);
                 /* get the child departments of company or party */
                 categoryList.addAll(getChildComps(paramMap));
@@ -86,17 +84,15 @@ public class HumanResEvents {
     }
 
     private static List<Map<String, Object>> getCurrentEmployeeDetails(Map<String, Object> params) throws GenericEntityException{
-
         Delegator delegator = (Delegator) params.get("delegator");
+        List<Map<String, Object>> responseList = new ArrayList<>();
+        long emplPosCount;
         String partyId = (String) params.get("partyId");
         String onclickFunction = (String) params.get("onclickFunction");
         String additionParam = (String) params.get("additionParam");
         String hrefString = (String) params.get("hrefString");
         String hrefString2 = (String) params.get("hrefString2");
-
-        List<Map<String, Object>> responseList = new ArrayList<>();
-
-        long emplPosCount;
+        String title = null;
         try {
             emplPosCount = EntityQuery.use(delegator).from("EmplPosition")
                     .where("emplPositionId", partyId).queryCount();
@@ -108,46 +104,23 @@ public class HumanResEvents {
                 if (UtilValidate.isNotEmpty(emlpfillCtxs)) {
                     for (GenericValue emlpfillCtx : emlpfillCtxs ) {
                         String memberId = emlpfillCtx.getString("partyId");
-                        GenericValue memCtx = EntityQuery.use(delegator).from("Person").where("partyId", partyId).queryOne();
-                        String title = null;
-                        if (UtilValidate.isNotEmpty(memCtx)) {
-                            String firstname = memCtx.getString("firstName");
-                            String lastname = memCtx.getString("lastName");
-                            if (UtilValidate.isEmpty(lastname)) {
-                                lastname = "";
-                            }
-                            if (UtilValidate.isEmpty(firstname)) {
-                                firstname = "";
-                            }
-                            title = firstname +" "+ lastname;
-                        }
-                        GenericValue memGroupCtx = EntityQuery.use(delegator).from("PartyGroup").where("partyId", partyId).queryOne();
-                        if (UtilValidate.isNotEmpty(memGroupCtx)) {
-                            title = memGroupCtx.getString("groupName");
-                        }
-
+                        title = PartyHelper.getPartyName(delegator, memberId, false);
                         Map<String,Object> josonMap = new HashMap<>();
                         Map<String,Object> dataMap = new HashMap<>();
                         Map<String,Object> dataAttrMap = new HashMap<>();
                         Map<String,Object> attrMap = new HashMap<>();
-
-                        dataAttrMap.put("onClick", onclickFunction + "('" + memberId + additionParam + "')");
-
                         String hrefStr = hrefString + memberId;
                         if (UtilValidate.isNotEmpty(hrefString2)) {
                             hrefStr = hrefStr + hrefString2;
                         }
-                        dataAttrMap.put("href", hrefStr);
-
                         attrMap.put("rel", "P");
                         attrMap.put("id", memberId);
-
+                        dataAttrMap.put("onClick", onclickFunction + "('" + memberId + additionParam + "')");
+                        dataAttrMap.put("href", hrefStr);
                         dataMap.put("title", title);
                         dataMap.put("attr", dataAttrMap);
-
                         josonMap.put("attr",attrMap);
                         josonMap.put("data", dataMap);
-
                         responseList.add(josonMap) ;
                     }
                 }
@@ -156,49 +129,36 @@ public class HumanResEvents {
             Debug.logError(e, MODULE);
             throw new GenericEntityException(e);
         }
-
         return responseList;
     }
 
     private static List<Map<String, Object>> getChildComps(Map<String, Object> params) throws GenericEntityException{
-
         Delegator delegator = (Delegator) params.get("delegator");
+        Map<String , Object> partyGroup = UtilGenerics.cast(params.get("partyGroup"));
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        List<GenericValue> childOfComs = null;
         String onclickFunction = (String) params.get("onclickFunction");
         String additionParam = (String) params.get("additionParam");
         String hrefString = (String) params.get("hrefString");
         String hrefString2 = (String) params.get("hrefString2");
-
-        Map<String , Object> partyGroup = UtilGenerics.cast(params.get("partyGroup"));
-        List<Map<String, Object>> resultList = new ArrayList<>();
-        List<GenericValue> childOfComs = null;
-
         try {
             childOfComs = EntityQuery.use(delegator).from("PartyRelationship")
                     .where("partyIdFrom", partyGroup.get("partyId"), 
                             "partyRelationshipTypeId", "GROUP_ROLLUP")
                             .filterByDate().queryList();
             if (UtilValidate.isNotEmpty(childOfComs)) {
-
                 for (GenericValue childOfCom : childOfComs ) {
-                    Object catId = null;
+                    String catId = null;
+                    String childPartyId = null;
                     String catNameField = null;
                     String title = null;
-
                     Map<String, Object> josonMap = new HashMap<>();
                     Map<String, Object> dataMap = new HashMap<>();
                     Map<String, Object> dataAttrMap = new HashMap<>();
                     Map<String, Object> attrMap = new HashMap<>();
-
-                    catId = childOfCom.get("partyIdTo");
-
-                    //Department or Sub department
-                    GenericValue childContext = EntityQuery.use(delegator).from("PartyGroup").where("partyId", catId).queryOne();
-                    if (UtilValidate.isNotEmpty(childContext)) {
-                        catNameField = (String) childContext.get("groupName");
-                        title = catNameField;
-                        josonMap.put("title",title);
-
-                    }
+                    catId = childOfCom.getString("partyIdTo");
+                    title = PartyHelper.getPartyName(delegator,catId, false);
+                    josonMap.put("title",title);
                     //Check child existing
                     List<GenericValue> childOfSubComs = EntityQuery.use(delegator).from("PartyRelationship")
                             .where("partyIdFrom", catId, 
@@ -209,39 +169,18 @@ public class HumanResEvents {
                     if (UtilValidate.isNotEmpty(childOfSubComs) || UtilValidate.isNotEmpty(isPosition)) {
                         josonMap.put("state", "closed");
                     }
-
-                    //Employee
-                    GenericValue emContext = EntityQuery.use(delegator).from("Person").where("partyId", catId).queryOne();
-                    if (UtilValidate.isNotEmpty(emContext)) {
-                        String firstname = (String) emContext.get("firstName");
-                        String lastname = (String) emContext.get("lastName");
-                        if (UtilValidate.isEmpty(lastname)) {
-                            lastname = "";
-                        }
-                        if (UtilValidate.isEmpty(firstname)) {
-                            firstname = "";
-                        }
-                        title = firstname +" "+ lastname;
-                    }
-
                     dataAttrMap.put("onClick", onclickFunction + "('" + catId + additionParam + "')");
-
                     String hrefStr = hrefString + catId;
                     if (UtilValidate.isNotEmpty(hrefString2)) {
                         hrefStr = hrefStr + hrefString2;
                     }
+                    attrMap.put("rel", "Y");
+                    attrMap.put("id", catId);
                     dataAttrMap.put("href", hrefStr);
-
                     dataMap.put("attr", dataAttrMap);
                     dataMap.put("title", title);
-
-                    attrMap.put("rel", "Y");
-                    attrMap.put("id", catId);
-
-
                     josonMap.put("attr",attrMap);
                     josonMap.put("data", dataMap);
-
                     resultList.add(josonMap);
                 }  
             }
@@ -249,35 +188,28 @@ public class HumanResEvents {
             Debug.logError(e, MODULE);
             throw new GenericEntityException(e);
         }
-
         return resultList;
-
     }
 
     private static List<Map<String, Object>> getEmployeeInComp(Map<String, Object> params) throws GenericEntityException{
         List<GenericValue> isEmpls = null;
         Delegator delegator = (Delegator) params.get("delegator");
         String partyId = (String) params.get("partyId");
-
         List<Map<String, Object>> resultList = new ArrayList<>();
-
         try {
             isEmpls = EntityQuery.use(delegator).from("EmplPosition")
                     .where(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId),
                             EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "EMPL_POS_INACTIVE"))
                             .filterByDate("actualFromDate", "actualThruDate")
                             .queryList();
-
             if (UtilValidate.isNotEmpty(isEmpls)) {
                 for (GenericValue childOfEmpl : isEmpls ) {
                     Map<String, Object> emplMap = new HashMap<>();
                     Map<String, Object> emplAttrMap = new HashMap<>();
                     Map<String, Object> empldataMap = new HashMap<>();
                     Map<String, Object> emplDataAttrMap = new HashMap<>();
-
                     String emplId = (String) childOfEmpl.get("emplPositionId");
                     String typeId = (String) childOfEmpl.get("emplPositionTypeId");
-
                     //check child
                     List<GenericValue> emlpfCtxs = EntityQuery.use(delegator).from("EmplPositionFulfillment")
                             .where("emplPositionId", emplId)
@@ -285,27 +217,22 @@ public class HumanResEvents {
                     if (UtilValidate.isNotEmpty(emlpfCtxs)) {
                         emplMap.put("state", "closed");
                     }
-
                     GenericValue emplContext = EntityQuery.use(delegator).from("EmplPositionType").where("emplPositionTypeId", typeId).queryOne();
                     String title = null;
                     if (UtilValidate.isNotEmpty(emplContext)) {
                         title = (String) emplContext.get("description") + " " +"["+ emplId +"]";
                     }
-
                     String hrefStr = "emplPositionView?emplPositionId=" + emplId;
                     emplAttrMap.put("href", hrefStr);
+                    emplAttrMap.put("title", title);
                     emplAttrMap.put("onClick", "callEmplDocument" + "('" + emplId + "')");
-
                     empldataMap.put("title", title);
                     empldataMap.put("attr", emplAttrMap);
-
                     emplDataAttrMap.put("id", emplId);
                     emplDataAttrMap.put("rel", "N");
-
                     emplMap.put("data", empldataMap);
                     emplMap.put("attr",emplDataAttrMap);
                     emplMap.put("title",title);
-
                     resultList.add(emplMap);
                 }
             }
@@ -313,7 +240,6 @@ public class HumanResEvents {
             Debug.logError(e, MODULE);
             throw new GenericEntityException(e);
         }
-
         return resultList;
     }
 }


[ofbiz-framework] 18/28: Fixed: Requesthandler exception is showing after clicking cancel/done button on editPerson screen (OFBIZ-10890) Set the value of missing parameter. Thanks Minal Phalak for reporting and providing the patch

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 335b3462c9406cf17584c8010ca808c53196dc4f
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Sat May 23 17:32:16 2020 +0530

    Fixed: Requesthandler exception is showing after clicking cancel/done button on editPerson screen
    (OFBIZ-10890)
    Set the value of missing parameter.
    Thanks Minal Phalak for reporting and providing the patch
---
 applications/party/widget/partymgr/PartyScreens.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/applications/party/widget/partymgr/PartyScreens.xml b/applications/party/widget/partymgr/PartyScreens.xml
index 0e65511..460522f 100644
--- a/applications/party/widget/partymgr/PartyScreens.xml
+++ b/applications/party/widget/partymgr/PartyScreens.xml
@@ -75,6 +75,7 @@ under the License.
                 <set field="tabButtonItem" value="viewprofile"/>
                 <set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
                 <set field="partyId" from-field="parameters.partyId"/>
+                <set field="DONE_PAGE" from-field="parameters.DONE_PAGE" default-value="viewprofile"/>
                 <set field="layoutSettings.javaScripts[]" value="/partymgr/static/PartyProfileContent.js" global="true"/>
                 <script location="component://party/groovyScripts/party/ViewProfile.groovy"/>
             </actions>


[ofbiz-framework] 07/28: Improved: Converted getPaymentRunningTotal service from mini-lang to groovy DSL (OFBIZ-11488) Thanks Nitish Mishra for the patch and Devanshu Vyas for reporting and review.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit fa1c0ebd83e21cb2daa08a49e7637b4e7a7996f0
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat May 23 10:27:50 2020 +0530

    Improved: Converted getPaymentRunningTotal service from mini-lang to groovy DSL
    (OFBIZ-11488)
    Thanks Nitish Mishra for the patch and Devanshu Vyas for reporting and review.
---
 .../groovyScripts/payment/PaymentServices.groovy   | 37 ++++++++++++++++++++++
 .../minilang/payment/PaymentServices.xml           | 21 ------------
 .../accounting/servicedef/services_payment.xml     |  4 +--
 3 files changed, 39 insertions(+), 23 deletions(-)

diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index 56c653b..b71c419 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -18,7 +18,10 @@
  */
 import org.apache.ofbiz.base.util.Debug
 import org.apache.ofbiz.base.util.UtilDateTime
+import org.apache.ofbiz.base.util.UtilFormatOut
 import org.apache.ofbiz.base.util.UtilProperties
+import org.apache.ofbiz.entity.condition.EntityCondition
+import org.apache.ofbiz.entity.condition.EntityOperator
 import org.apache.ofbiz.entity.GenericValue
 
 MODULE = "PaymentServices.groovy"
@@ -57,3 +60,37 @@ def createPayment() {
     result.paymentId = paymentId
     return result
 }
+
+def getPaymentRunningTotal(){
+    paymentIds = parameters.paymentIds;
+    runningTotal = 0;
+    payments = from("Payment").where(EntityCondition.makeCondition("paymentId", EntityOperator.IN, paymentIds)).queryList()
+    if (payments) {
+        for (GenericValue payment : payments) {
+            runningTotal = runningTotal + payment.amount;
+        }
+    }
+
+    if (parameters.organizationPartyId) {
+        serviceCtx = [
+                organizationPartyId: parameters.organizationPartyId,
+                userLogin: userLogin
+        ]
+        serviceResult = dispatcher.runSync('getPartyAccountingPreferences', serviceCtx);
+        partyAcctgPreference = serviceResult.partyAccountingPreference;
+
+        if (partyAcctgPreference.baseCurrencyUomId) {
+            currencyUomId = partyAcctgPreference.baseCurrencyUomId;
+        } else {
+            currencyUomId = UtilProperties.getPropertyValue('general.properties', 'currency.uom.id.default');
+        }
+    } else  {
+        currencyUomId = UtilProperties.getPropertyValue('general.properties', 'currency.uom.id.default');
+    }
+
+    paymentRunningTotal = UtilFormatOut.formatCurrency(runningTotal, currencyUomId, locale);
+
+    result = success()
+    result.paymentRunningTotal = paymentRunningTotal
+    return result
+}
diff --git a/applications/accounting/minilang/payment/PaymentServices.xml b/applications/accounting/minilang/payment/PaymentServices.xml
index 3d6f961..3811bf7 100644
--- a/applications/accounting/minilang/payment/PaymentServices.xml
+++ b/applications/accounting/minilang/payment/PaymentServices.xml
@@ -512,27 +512,6 @@ under the License.
         </iterate>
     </simple-method>
 
-    <simple-method method-name="getPaymentRunningTotal" short-description="calculate running total for payments">
-        <set field="paymentIds" from-field="parameters.paymentIds"/>
-        <set field="runningTotal" type="BigDecimal" value="0"/>
-        <entity-condition entity-name="Payment" list="payments">
-            <condition-expr field-name="paymentId" operator="in" from-field="paymentIds"/>
-        </entity-condition>
-        <iterate list="payments" entry="payment">
-            <set field="runningTotal" value="${runningTotal + payment.amount}" type="BigDecimal"/>
-        </iterate>
-        <set-service-fields service-name="getPartyAccountingPreferences" map="parameters" to-map="getPartyAccountingPreferencesMap"/>
-        <call-service service-name="getPartyAccountingPreferences" in-map-name="getPartyAccountingPreferencesMap">
-            <result-to-field result-name="partyAccountingPreference"/>
-        </call-service>
-        <set field="currencyUomId" from-field="partyAccountingPreference.baseCurrencyUomId"/>
-        <if-empty field="currencyUomId">
-            <property-to-field resource="general" property="currency.uom.id.default" field="currencyUomId"/>
-        </if-empty>
-        <set field="paymentRunningTotal" value="${groovy:org.apache.ofbiz.base.util.UtilFormatOut.formatCurrency(runningTotal, currencyUomId, parameters.locale)}"/>
-        <field-to-result field="paymentRunningTotal"/>
-    </simple-method>
-
     <simple-method method-name="cancelPaymentBatch" short-description="cancel payment batch">
         <entity-and entity-name="PmtGrpMembrPaymentAndFinAcctTrans" list="paymentGroupMemberAndTransList">
             <field-map field-name="paymentGroupId" from-field="parameters.paymentGroupId"/>
diff --git a/applications/accounting/servicedef/services_payment.xml b/applications/accounting/servicedef/services_payment.xml
index ba0cacd..a7d9554 100644
--- a/applications/accounting/servicedef/services_payment.xml
+++ b/applications/accounting/servicedef/services_payment.xml
@@ -151,8 +151,8 @@ under the License.
         <attribute name="finAccountTransId" type="String" mode="OUT" optional="true"/>
         <attribute name="statusId" type="String" mode="OUT" optional="true"/>
     </service>
-    <service name="getPaymentRunningTotal" engine="simple"
-            location="component://accounting/minilang/payment/PaymentServices.xml" invoke="getPaymentRunningTotal" auth="true">
+    <service name="getPaymentRunningTotal" engine="groovy"
+            location="component://accounting/groovyScripts/payment/PaymentServices.groovy" invoke="getPaymentRunningTotal" auth="true">
         <description>calculate running total for payments</description>
         <attribute name="paymentIds" type="List" mode="IN" optional="false"/>
         <attribute name="organizationPartyId" type="String" mode="IN" optional="true"/>


[ofbiz-framework] 28/28: Improved: removes useless "@deprecated No replacement" comments in Java code

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 2ff819043d5c0c21532aad4bef8324f766e8f96b
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Wed May 27 09:26:43 2020 +0200

    Improved: removes useless "@deprecated No replacement" comments in Java code
    
    This follows a discussion on dev ML 5 days ago.
    Those comments are useless because they are all related to Minilang and Minilang
    is deprecated as a whole.
---
 .../org/apache/ofbiz/minilang/method/MethodOperation.java    |  4 +---
 .../src/main/java/org/apache/ofbiz/security/Security.java    | 12 ------------
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MethodOperation.java b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MethodOperation.java
index d92ddea..8c27a38 100644
--- a/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MethodOperation.java
+++ b/framework/minilang/src/main/java/org/apache/ofbiz/minilang/method/MethodOperation.java
@@ -47,9 +47,7 @@ public abstract class MethodOperation extends MiniLangElement {
      * @throws MiniLangException */
     public abstract boolean exec(MethodContext methodContext) throws MiniLangException;
 
-    /** Create a string representation of the operation, using the current context.
-     * @deprecated No replacement.
-     */
+    /** Create a string representation of the operation, using the current context.*/
     @Deprecated
     public String expandedString(MethodContext methodContext) {
         return FlexibleStringExpander.expandString(toString(), methodContext.getEnvMap());
diff --git a/framework/security/src/main/java/org/apache/ofbiz/security/Security.java b/framework/security/src/main/java/org/apache/ofbiz/security/Security.java
index f005729..507be35 100644
--- a/framework/security/src/main/java/org/apache/ofbiz/security/Security.java
+++ b/framework/security/src/main/java/org/apache/ofbiz/security/Security.java
@@ -36,17 +36,9 @@ import org.apache.ofbiz.entity.GenericValue;
  */
 public interface Security {
 
-    /**
-     *
-     * @deprecated No replacement.
-     */
     @Deprecated
     public Delegator getDelegator();
 
-    /**
-    *
-    * @deprecated No replacement.
-    */
     @Deprecated
     public void setDelegator(Delegator delegator);
 
@@ -56,8 +48,6 @@ public interface Security {
      * @param userLoginId The userLoginId to find security groups by
      * @return An iterator made from the Collection either cached or retrieved from the database through the
      *            UserLoginSecurityGroup Delegator.
-     *
-     * @deprecated No replacement.
      */
     @Deprecated
     public Iterator<GenericValue> findUserLoginSecurityGroupByUserLoginId(String userLoginId);
@@ -70,8 +60,6 @@ public interface Security {
      * @param groupId The ID of the group
      * @param permission The name of the permission
      * @return boolean specifying whether or not a SecurityGroupPermission row exists
-     *
-     * @deprecated No replacement.
      */
     @Deprecated
     public boolean securityGroupPermissionExists(String groupId, String permission);


[ofbiz-framework] 09/28: Improved: Apply multi-block attr to each application (OFBIZ-11706)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 05640f79f544b96be7f1ef73dd4c1d1e9ff39b9d
Author: James Yong <ja...@apache.org>
AuthorDate: Sat May 23 14:08:35 2020 +0800

    Improved: Apply multi-block attr to each application (OFBIZ-11706)
    
    1. Bug Fix
    2. Disable multi-block until function is stabilized.
---
 .../src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java
index 221bd85..36d4742 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/HtmlWidget.java
@@ -208,7 +208,7 @@ public class HtmlWidget extends ModelScreenWidget {
         @Override
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws IOException {
 
-            if (isMultiBlock()) {
+            if (false && isMultiBlock()) {
 
                 StringWriter stringWriter = new StringWriter();
                 context.put("MultiBlockWriter", stringWriter);
@@ -250,7 +250,7 @@ public class HtmlWidget extends ModelScreenWidget {
                 }
 
                 // check for external script
-                String externalScripts = doc.head().select("script").toString();
+                String externalScripts = doc.body().select("script").toString();
                 writer.append(externalScripts);
 
                 // the 'template' block


[ofbiz-framework] 04/28: Fixed: showjGrowl called twice (OFBIZ-11720)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 2621fd4ef48f2255a337f3e2dc858e7f4521f755
Author: James Yong <ja...@apache.org>
AuthorDate: Thu May 21 21:38:08 2020 +0800

    Fixed: showjGrowl called twice (OFBIZ-11720)
    
    showjGrowl function is called twice,
    even when there is no message to show.
---
 themes/common-theme/template/includes/Messages.ftl | 42 +++++++++-------------
 1 file changed, 16 insertions(+), 26 deletions(-)

diff --git a/themes/common-theme/template/includes/Messages.ftl b/themes/common-theme/template/includes/Messages.ftl
index 78f82ab..78996db 100644
--- a/themes/common-theme/template/includes/Messages.ftl
+++ b/themes/common-theme/template/includes/Messages.ftl
@@ -57,17 +57,10 @@ under the License.
       </#if>
     </div>
   </#if>
-  <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
-  <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
-  <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
-  <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
 
-  <script>showjGrowl(
-          "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
-          "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
   <#-- display the event messages -->
   <#if (eventMessage?has_content || eventMessageList?has_content)>
-  <div id="content-messages" class="content-messages eventMessage"
+    <div id="content-messages" class="content-messages eventMessage"
       onclick="document.getElementById('content-messages').parentNode.removeChild(this)">
     <#noescape><p>${uiLabelMap.CommonFollowingOccurred}:</p></#noescape>
     <#if eventMessage?has_content>
@@ -78,24 +71,17 @@ under the License.
         <p>${StringUtil.wrapString(eventMsg)}</p>
       </#list>
     </#if>
-  </div>
-  <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
-  <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
-  <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
-  <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
-  <script>showjGrowl(
-          "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
-          "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
+    </div>
   </#if>
 
-   <#-- display the warning messages -->
+  <#-- display the warning messages -->
   <#if (warningMessage?has_content || warningMessageList?has_content)>
     <div id="content-messages" class="content-messages errorMessage"
         onclick="document.getElementById('content-messages').parentNode.removeChild(this)">
-      <#noescape><p>${uiLabelMap.CommonFollowingErrorsOccurred}:</p></#noescape>
-      <#if warningMessage?has_content>
-        <p>${StringUtil.wrapString(warningMessage)}</p>
-      </#if>
+    <#noescape><p>${uiLabelMap.CommonFollowingErrorsOccurred}:</p></#noescape>
+    <#if warningMessage?has_content>
+      <p>${StringUtil.wrapString(warningMessage)}</p>
+    </#if>
       <#if warningMessageList?has_content>
         <#list warningMessageList as warningMsg>
           <p>${StringUtil.wrapString(warningMsg)}</p>
@@ -103,12 +89,16 @@ under the License.
       </#if>
     </div>
   </#if>
-  <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
-  <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
-  <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
-  <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
 
-  <script>showjGrowl(
+  <#if (errorMessage?has_content || errorMessageList?has_content
+     || eventMessage?has_content || eventMessageList?has_content
+     || warningMessage?has_content || warningMessageList?has_content)>
+    <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
+    <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
+    <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
+    <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
+    <script>showjGrowl(
           "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
           "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
+  </#if>
 </#escape>


[ofbiz-framework] 15/28: Fixed: paginateOrderList does not find orders on next page specific to FindOrders.ftl (OFBIZ-11356) Adding the missing showAll flag in the paginateOrder form because of which the orders were not shown while submitting the next button. Thanks Michael Brohl for reporting the issue and Ankit Joshi for providing the patch

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 71b4abe7a6dd28f9b0029f9f08c14438b1c5d216
Author: Aditya Sharma <ad...@apache.org>
AuthorDate: Sat May 23 16:18:28 2020 +0530

    Fixed: paginateOrderList does not find orders on next page specific to FindOrders.ftl
    (OFBIZ-11356)
    Adding the missing showAll flag in the paginateOrder form because of which the orders were not shown while submitting the next button.
    Thanks Michael Brohl for reporting the issue and Ankit Joshi for providing the patch
---
 applications/order/template/order/FindOrders.ftl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/applications/order/template/order/FindOrders.ftl b/applications/order/template/order/FindOrders.ftl
index 6eaff5b..d50e07c 100644
--- a/applications/order/template/order/FindOrders.ftl
+++ b/applications/order/template/order/FindOrders.ftl
@@ -507,6 +507,7 @@ document.lookuporder.orderId.focus();
       <input type="hidden" name="viewSize"/>
       <input type="hidden" name="viewIndex"/>
       <input type="hidden" name="hideFields"/>
+      <input type="hidden" name="showAll" value="Y"/>
       <#if paramIdList?? && paramIdList?has_content>
         <#list paramIdList as paramIds>
           <#assign paramId = paramIds.split("=")/>


[ofbiz-framework] 17/28: Improved: Converted updatePayment service from mini-lang to groovy. (OFBIZ-11480) Thanks Devanshu Vyas for reporting and Priya Sharma for the patch.

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch ecomify-OFBIZ-11468_Convert_ShipmentReceiptServices-squashed
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 835de7089a4a23925f5346bf58eaf9450e1173ef
Author: Suraj Khurana <su...@apache.org>
AuthorDate: Sat May 23 17:48:54 2020 +0530

    Improved: Converted updatePayment service from mini-lang to groovy.
    (OFBIZ-11480)
    Thanks Devanshu Vyas for reporting and Priya Sharma for the patch.
---
 .../groovyScripts/payment/PaymentServices.groovy   | 50 ++++++++++++++++
 .../minilang/payment/PaymentServices.xml           | 68 ----------------------
 .../accounting/servicedef/services_payment.xml     |  4 +-
 3 files changed, 52 insertions(+), 70 deletions(-)

diff --git a/applications/accounting/groovyScripts/payment/PaymentServices.groovy b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
index 5e2749b..4032017 100644
--- a/applications/accounting/groovyScripts/payment/PaymentServices.groovy
+++ b/applications/accounting/groovyScripts/payment/PaymentServices.groovy
@@ -63,6 +63,55 @@ def createPayment() {
     result.paymentId = paymentId
     return result
 }
+def updatePayment() {
+    Map lookupPayment = delegator.makeValue("Payment")
+    lookupPayment.setPKFields(parameters)
+    GenericValue payment = from("Payment").where("paymentId", lookupPayment.paymentId).queryOne()
+    if (!security.hasEntityPermission("ACCOUNTING", "_UPDATE", parameters.userLogin) &&
+        (!security.hasEntityPermission("PAY_INFO", "_UPDATE", parameters.userLogin) &&
+        userLogin.partyId != payment.partyIdFrom && userLogin.partyId != payment.partyIdTo)) {
+        return error(UtilProperties.getResourceBundleMap("AccountingUiLabels", locale)?.AccountingUpdatePaymentPermissionError)
+    }
+    if ("PMNT_NOT_PAID" != payment.statusId) {
+        // check if only status change
+        GenericValue newPayment = delegator.makeValue("Payment")
+        GenericValue oldPayment = delegator.makeValue("Payment")
+        newPayment.setNonPKFields(payment)
+        oldPayment.setNonPKFields(payment)
+        newPayment.setNonPKFields(parameters)
+
+        // fields :- comments, paymentRefNum, finAccountTransId, statusIhStatus does not allow an update of the information are editable for Payment
+        oldPayment.statusId = newPayment.statusId
+        oldPayment.comments = newPayment.comments
+        oldPayment.paymentRefNum = newPayment.paymentRefNum ?: null
+        oldPayment.finAccountTransId = newPayment.finAccountTransId ?: null
+        if (!oldPayment.equals(newPayment)) {
+            return error(UtilProperties.getResourceBundleMap("AccountingUiLabels", locale)?.AccountingPSUpdateNotAllowedBecauseOfStatus)
+        }
+    }
+    statusIdSave = payment.statusId  // do not allow status change here
+    payment.setNonPKFields(parameters)
+    payment.statusId = statusIdSave  // do not allow status change here
+    payment.effectiveDate = payment.effectiveDate ?: UtilDateTime.nowTimestamp()
+    if (payment.paymentMethodId) {
+        paymentMethod = from("PaymentMethod").where("paymentMethodId", payment.paymentMethodId).queryOne()
+        if (payment.paymentMethodTypeId != paymentMethod.paymentMethodTypeId) {
+            Debug.logInfo("Replacing passed payment method type [" + parameters.paymentMethodTypeId + "] with payment method type [" +
+                paymentMethod.paymentMethodTypeId + "] for payment method [" + parameters.paymentMethodId +"]", MODULE)
+        }
+        payment.paymentMethodTypeId = paymentMethod.paymentMethodTypeId
+    }
+    payment.store()
+    if (parameters.statusId) {
+        if (parameters.statusId != statusIdSave) {
+            Map param = dispatcher.getDispatchContext().makeValidContext('setPaymentStatus', ModelService.IN_PARAM, parameters)
+            param.paymentId = payment.paymentId
+            serviceResult = run service: 'setPaymentStatus', with: param
+            if (!ServiceUtil.isSuccess(serviceResult)) return error(serviceResult)
+        }
+    }
+    return success()
+}
 def createPaymentAndApplicationForParty() {
     paymentAmount = 0
     List invoiceIds = []
@@ -206,3 +255,4 @@ def massChangePaymentStatus() {
     return serviceResult
 }
 
+
diff --git a/applications/accounting/minilang/payment/PaymentServices.xml b/applications/accounting/minilang/payment/PaymentServices.xml
index 9ce7e3b..3d8b2cc 100644
--- a/applications/accounting/minilang/payment/PaymentServices.xml
+++ b/applications/accounting/minilang/payment/PaymentServices.xml
@@ -20,74 +20,6 @@ under the License.
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">
 
-    <simple-method method-name="updatePayment" short-description="Update a Payment">
-        <make-value entity-name="Payment" value-field="lookupPayment"/>
-        <set-pk-fields value-field="lookupPayment" map="parameters"/>
-
-        <find-by-primary-key entity-name="Payment" map="lookupPayment" value-field="payment"/>
-        <if>
-            <condition>
-                <and>
-                    <not><if-has-permission permission="ACCOUNTING" action="_UPDATE"/></not>
-                    <not><if-has-permission permission="PAY_INFO" action="_UPDATE"/></not>
-                    <not><if-compare-field field="userLogin.partyId" to-field="payment.partyIdFrom" operator="equals"/></not>
-                    <not><if-compare-field field="userLogin.partyId" to-field="payment.partyIdTo" operator="equals"/></not>
-                </and>
-            </condition>
-            <then>
-                <add-error>
-                    <fail-property resource="AccountingUiLabels" property="AccountingUpdatePaymentPermissionError"/>
-                </add-error>
-            </then>
-        </if>
-        <check-errors/>
-
-        <if-compare field="payment.statusId" value="PMNT_NOT_PAID" operator="not-equals">
-            <!-- check if only status change -->
-            <make-value entity-name="Payment" value-field="newPayment"/>
-            <make-value entity-name="Payment" value-field="oldPayment"/>
-            <set-nonpk-fields map="payment" value-field="newPayment"/>
-            <set-nonpk-fields map="payment" value-field="oldPayment"/>
-            <set-nonpk-fields map="parameters" value-field="newPayment"/>
-            <!-- fields :- comments, paymentRefNum, finAccountTransId, statusId can editable for Payment -->
-            <set field="oldPayment.statusId" from-field="newPayment.statusId"/>
-            <set field="oldPayment.comments" from-field="newPayment.comments"/>
-            <set field="oldPayment.paymentRefNum" from-field="newPayment.paymentRefNum" set-if-null="true"/>
-            <set field="oldPayment.finAccountTransId" from-field="newPayment.finAccountTransId" set-if-null="true"/>
-            <if-compare-field field="oldPayment" to-field="newPayment" operator="not-equals">
-                <add-error>
-                    <fail-property resource="AccountingUiLabels" property="AccountingPSUpdateNotAllowedBecauseOfStatus"/>
-                </add-error>
-            </if-compare-field>
-        </if-compare>
-        <check-errors/>
-
-        <set field="statusIdSave" from-field="payment.statusId"/><!-- do not allow status change here -->
-        <set-nonpk-fields map="parameters" value-field="payment"/>
-        <set field="payment.statusId" from-field="statusIdSave"/><!-- do not allow status change here -->
-
-        <if-empty field="payment.effectiveDate">
-            <now-timestamp field="payment.effectiveDate"/>
-        </if-empty>
-        <if-not-empty field="payment.paymentMethodId">
-            <entity-one entity-name="PaymentMethod" value-field="paymentMethod">
-                <field-map field-name="paymentMethodId" from-field="payment.paymentMethodId"/>
-            </entity-one>
-            <if-compare-field field="payment.paymentMethodTypeId" to-field="paymentMethod.paymentMethodTypeId" operator="not-equals">
-                <log level="info" message="Replacing passed payment method type [${payment.paymentMethodTypeId}] with payment method type [${paymentMethod.paymentMethodTypeId}] for payment method [${payment.paymentMethodId}]"/>
-            </if-compare-field>
-            <set field="payment.paymentMethodTypeId" from-field="paymentMethod.paymentMethodTypeId"/>
-        </if-not-empty>
-        <store-value value-field="payment"/>
-
-        <if-not-empty field="parameters.statusId">
-            <if-compare-field field="parameters.statusId" to-field="statusIdSave" operator="not-equals">
-                <set-service-fields service-name="setPaymentStatus" map="parameters" to-map="param"/>
-                <call-service service-name="setPaymentStatus" in-map-name="param"/>
-                <check-errors/>
-            </if-compare-field>
-        </if-not-empty>
-    </simple-method>
     <simple-method method-name="createPaymentApplication" short-description="Create a Payment Application">
         <if-empty field="parameters.invoiceId">
             <if-empty field="parameters.billingAccountId">
diff --git a/applications/accounting/servicedef/services_payment.xml b/applications/accounting/servicedef/services_payment.xml
index 00099dd..0207643 100644
--- a/applications/accounting/servicedef/services_payment.xml
+++ b/applications/accounting/servicedef/services_payment.xml
@@ -37,8 +37,8 @@ under the License.
         <override name="amount" optional="false"/>
     </service>
 
-    <service name="updatePayment" engine="simple" default-entity-name="Payment"
-        location="component://accounting/minilang/payment/PaymentServices.xml" invoke="updatePayment" auth="true">
+    <service name="updatePayment" engine="groovy" default-entity-name="Payment"
+        location="component://accounting/groovyScripts/payment/PaymentServices.groovy" invoke="updatePayment" auth="true">
         <description>Update a Payment</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>