This commit is contained in:
Suraj Khurana
2020-04-26 19:50:08 +05:30
6 changed files with 17 additions and 19 deletions
@@ -20105,6 +20105,9 @@
<value xml:lang="zh">输入、操作符和数值</value>
<value xml:lang="zh-TW">輸入、運算子作和數值</value>
</property>
<property key="ProductInventoryATPNotAvailable">
<value xml:lang="en">Requested quantity [${xferQty}] could not be transferred because [${unavailableQuantity}] units of inventory is unavailable.</value>
</property>
<property key="ProductOperator">
<value xml:lang="de">Operator</value>
<value xml:lang="en">Operator</value>
@@ -1115,13 +1115,7 @@ under the License.
<set field="inputMap.xferQty" from-field="quantityNotTransferred"/>
</else>
</if-compare-field>
<add-error>
<fail-message message="inputMap = ${inputMap}"/>
</add-error>
<call-service service-name="createInventoryTransfer" in-map-name="inputMap"/>
<add-error>
<fail-message message="quantityNotTransferred = ${quantityNotTransferred}"/>
</add-error>
<calculate field="quantityNotTransferred">
<calcop operator="subtract" field="quantityNotTransferred">
<calcop operator="get" field="inputMap.xferQty"/>
@@ -1142,10 +1136,7 @@ under the License.
<field-to-result field="quantityNotTransferred"/>
<if-compare operator="greater" value="0" field="quantityNotTransferred">
<add-error>
<fail-property resource="ProductUiLabels" property="FormFieldTitle_quantityNotAvailable"/>
</add-error>
<add-error>
<fail-message message="${quantityNotTransferred}"/>
<fail-message message="${groovy: import org.apache.ofbiz.base.util.UtilProperties; return (UtilProperties.getMessage('ProductUiLabels', 'ProductInventoryATPNotAvailable', ['unavailableQuantity' : quantityNotTransferred, 'xferQty': parameters.quantity], locale))}"/>
</add-error>
<check-errors/>
</if-compare>
+6 -6
View File
@@ -113,18 +113,18 @@ mail.debug.on=N
# to any recipients valid or not
mail.smtp.sendpartial=true
# -- spam header name and value to block incoming spam detected by external spam checker, configured for spam assin
mail.spam.name=X-Spam-Flag
mail.spam.value=YES
# -- HTTP upload settings
# -- directory used to temporarily store files that are larger than the configured size threshold (10K)
http.upload.max.sizethreshold=10240
# -- Size threshold (almost 1MB)
http.upload.max.sizethreshold=1024000
# -- directory used to temporarily store files that are larger than the configured size threshold
http.upload.tmprepository=runtime/tmp
# -- max size in bytes (-1 for unlimited)
http.upload.max.size=-1
# -- spam header name and value to block incoming spam detected by external spam checker, configured for spam assin
mail.spam.name=X-Spam-Flag
mail.spam.value=YES
# -- HTTP JSON settings
http.json.xssi.prefix=//
@@ -199,7 +199,9 @@ public final class CsrfUtil {
requestMap = findRequestMap(requestMapMap, pathOrRequestUri);
}
if (requestMap == null) {
Debug.logError("Cannot find the corresponding request map for path: " + pathOrRequestUri, MODULE);
if (!"org.apache.ofbiz.security.NoCsrfDefenseStrategy".equals(getStrategy().toString())) {
Debug.logWarning("Cannot find the corresponding request map for path: " + pathOrRequestUri, MODULE);
}
}
String tokenValue = "";
if (requestMap != null && requestMap.securityCsrfToken) {
@@ -77,7 +77,8 @@ public class GroovyEventHandler implements EventHandler {
public String invoke(Event event, RequestMap requestMap, HttpServletRequest request, HttpServletResponse response) throws EventHandlerException {
boolean beganTransaction = false;
try {
beganTransaction = TransactionUtil.begin();
int timeout = Integer.max(event.transactionTimeout, 0);
beganTransaction = TransactionUtil.begin(timeout);
Map<String, Object> context = new HashMap<>();
context.put("request", request);
@@ -66,7 +66,8 @@ public class SimpleEventHandler implements EventHandler {
if (Debug.verboseOn()) Debug.logVerbose("[Processing]: SIMPLE Event", MODULE);
try {
beganTransaction = TransactionUtil.begin();
int timeout = Integer.max(event.transactionTimeout, 0);
beganTransaction = TransactionUtil.begin(timeout);
String eventReturn = SimpleMethod.runSimpleEvent(xmlResource, eventName, request, response);
if (Debug.verboseOn()) Debug.logVerbose("[Event Return]: " + eventReturn, MODULE);
return eventReturn;