svn commit: r552115 - in /ofbiz/trunk/applications/product: webapp/catalog/product/EditProductGlAccounts.ftl webapp/catalog/product/ProductForms.xml widget/catalog/ProductScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r552115 - in /ofbiz/trunk/applications/product: webapp/catalog/product/EditProductGlAccounts.ftl webapp/catalog/product/ProductForms.xml widget/catalog/ProductScreens.xml

jacopoc
Author: jacopoc
Date: Sat Jun 30 00:43:11 2007
New Revision: 552115

URL: http://svn.apache.org/viewvc?view=rev&rev=552115
Log:
Product->account screen migrated to widgets by Ashish Vijaywargiya (part of OFBIZ-1046).

Removed:
    ofbiz/trunk/applications/product/webapp/catalog/product/EditProductGlAccounts.ftl
Modified:
    ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
    ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml?view=diff&rev=552115&r1=552114&r2=552115
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ProductForms.xml Sat Jun 30 00:43:11 2007
@@ -1421,4 +1421,52 @@
                 description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
         </field>
     </form>
+    <!-- GlAccount-->
+    <form name="ListProductGlAccounts" type="list" target="updateProductGlAccount" title="">
+        <actions>
+            <entity-condition entity-name="ProductGlAccount" list-name="productGlAccounts">
+                <condition-expr field-name="productId" env-name="productId"/>
+                <order-by field-name="productId" />
+            </entity-condition>
+        </actions>      
+        <field name="productId"><hidden/></field>
+        <field name="glAccountTypeId" title="${uiLabelMap.ProductAccountType}">
+            <display-entity entity-name="GlAccountType" key-field-name="glAccountTypeId" description="${description}" />
+        </field>
+        <field name="organizationPartyId" title="${uiLabelMap.ProductOrganization}">
+            <display description="${bsh: org.ofbiz.party.party.PartyHelper.getPartyName(delegator, organizationPartyId, true);} [${organizationPartyId}]"/>
+        </field>
+        <field name="glAccountId" title="${uiLabelMap.ProductGlAccount}">
+            <drop-down allow-empty="false">                
+                <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/>    
+            </drop-down>
+        </field>    
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
+        <field name="deleteLink" title="" widget-style="buttontext">
+            <hyperlink target="deleteProductGlAccount?productId=${productId}&amp;organizationPartyId=${organizationPartyId}&amp;glAccountTypeId=${glAccountTypeId}" description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
+        </field>
+    </form>  
+    <form name="AddProductGlAccount" type="single" target="createProductGlAccount" title="">      
+        <field name="productId"><hidden/></field>
+        <field name="glAccountTypeId" title="${uiLabelMap.ProductAccountType}">
+            <drop-down allow-empty="false">                
+                <list-options key-name="glAccountTypeId" list-name="productGlAccountTypes" description="${description}"/>
+            </drop-down>
+        </field>
+        <field name="glAccountId" title="${uiLabelMap.ProductGlAccount}">
+            <drop-down allow-empty="false">                
+                <list-options key-name="accountCode" list-name="glAccounts" description="${accountCode} ${accountName}"/>    
+            </drop-down>
+        </field>
+        <field name="organizationPartyId" title="${uiLabelMap.ProductOrganization}">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="PartyRoleAndPartyDetail" key-field-name="partyId" description="${groupName} [${partyId}]">
+                    <entity-constraint name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO" />
+                    <entity-order-by field-name="partyId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
+    </form>  
  </forms>
+
\ No newline at end of file

Modified: ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml?view=diff&rev=552115&r1=552114&r2=552115
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductScreens.xml Sat Jun 30 00:43:11 2007
@@ -539,16 +539,25 @@
                 <entity-condition entity-name="GlAccount" list-name="glAccounts" use-cache="true">
                     <order-by field-name="accountCode"/>
                 </entity-condition>
-                <entity-condition entity-name="PartyRole" list-name="organizations" use-cache="true">
-                    <condition-expr field-name="roleTypeId" operator="equals" value="INTERNAL_ORGANIZATIO"/>
-                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="CommonProductDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/catalog/product/EditProductGlAccounts.ftl"/></html>
-                        </platform-specific>
+                         <section>
+                             <condition>
+                                 <and>
+                                     <not><if-empty field-name="productId"/></not>
+                                     <not><if-empty field-name="product"/></not>
+                                 </and>
+                             </condition>
+                             <widgets>                              
+                                 <include-form name="ListProductGlAccounts" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                                 <container>
+                                     <label style="head2">${uiLabelMap.ProductAddGlAccount}</label>
+                                 </container>
+                                 <include-form name="AddProductGlAccount" location="component://product/webapp/catalog/product/ProductForms.xml"/>
+                             </widgets>
+                         </section>
                     </decorator-section>
                 </decorator-screen>
             </widgets>