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

danwatford pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new de8fb7f  Impoved: Moved new customer request item action to customer 
request menu (OFBIZ-12508)
de8fb7f is described below

commit de8fb7fda9d7a7286117b5299fff1e9bac0f2b1d
Author: Pierre Smits <pierre.sm...@orrtiz.com>
AuthorDate: Fri Jan 21 17:31:46 2022 +0100

    Impoved: Moved new customer request item action to customer request menu 
(OFBIZ-12508)
---
 applications/order/widget/ordermgr/CustRequestScreens.xml | 10 +---------
 applications/order/widget/ordermgr/OrderMenus.xml         | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/applications/order/widget/ordermgr/CustRequestScreens.xml 
b/applications/order/widget/ordermgr/CustRequestScreens.xml
index 48ac533..f3d38dd 100644
--- a/applications/order/widget/ordermgr/CustRequestScreens.xml
+++ b/applications/order/widget/ordermgr/CustRequestScreens.xml
@@ -286,10 +286,7 @@ under the License.
             <widgets>
                 <decorator-screen name="CommonRequestDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.PageTitleRequestItems}">
-                            <link target="requestitem" 
text="${uiLabelMap.OrderNewRequestItem}" style="buttontext">
-                                <parameter param-name="custRequestId"/>
-                            </link>
+                        <screenlet title="${uiLabelMap.CommonItems}">
                             <include-form name="ListRequestItems" 
location="component://order/widget/ordermgr/CustRequestForms.xml"/>
                         </screenlet>
                     </decorator-section>
@@ -315,11 +312,6 @@ under the License.
                 <decorator-screen name="CommonRequestDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet 
title="${uiLabelMap.CommonId}:${custRequestItem.custRequestItemSeqId} 
${custRequestItem.description}">
-                            <container>
-                                <link target="requestitem" 
text="${uiLabelMap.OrderNewRequestItem}" style="buttontext">
-                                    <parameter param-name="custRequestId"/>
-                                </link>
-                            </container>
                             <include-form name="EditCustRequestItem" 
location="component://order/widget/ordermgr/CustRequestForms.xml"/>
                             <platform-specific>
                                 <html><html-template 
location="component://order/template/request/CopyRequestItem.ftl"/></html>
diff --git a/applications/order/widget/ordermgr/OrderMenus.xml 
b/applications/order/widget/ordermgr/OrderMenus.xml
index 3c6030c..1faa39f 100644
--- a/applications/order/widget/ordermgr/OrderMenus.xml
+++ b/applications/order/widget/ordermgr/OrderMenus.xml
@@ -542,6 +542,21 @@ under the License.
                 <parameter param-name="custRequestId" 
from-field="custRequest.custRequestId"/>
             </link>
         </menu-item>
+        <menu-item name="NewRequestItem" title="${uiLabelMap.ProductNewItem}">
+            <condition>
+                <and>
+                    <or>
+                        <if-has-permission permission="ORDERMGR" 
action="_CREATE"/>
+                    </or>
+                    <not><if-empty field="custRequest"/></not>
+                    <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_CANCELLED"/>
+                    <if-compare field="custRequest.statusId" 
operator="not-equals" value="CRQ_COMPLETED"/>
+                </and>
+            </condition>
+            <link target="requestitem">
+                <parameter param-name="custRequestId"/>
+            </link>
+        </menu-item>
         <menu-item name="createQuoteFromRequest" 
title="${uiLabelMap.OrderCreateQuoteFromRequest}">
             <condition>
                 <and>

Reply via email to