svn commit: r600357 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/invoice/ script/org/ofbiz/accounting/permissions/ servicedef/ widget/

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

svn commit: r600357 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/invoice/ script/org/ofbiz/accounting/permissions/ servicedef/ widget/

adrianc
Author: adrianc
Date: Sun Dec  2 11:09:17 2007
New Revision: 600357

URL: http://svn.apache.org/viewvc?rev=600357&view=rev
Log:
Accounting Invoice permissions and UI work.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
    ofbiz/trunk/applications/accounting/servicedef/services_payment.xml
    ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
    ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
    ofbiz/trunk/applications/accounting/widget/Menus.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Sun Dec  2 11:09:17 2007
@@ -124,12 +124,6 @@
 
 
     <simple-method method-name="createInvoice" short-description="Create a new Invoice">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createInvoice you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>
-        <check-errors/>
-
         <now-timestamp-to-env env-name="nowTimestamp"/>
 
         <make-value value-name="newEntity" entity-name="Invoice"/>
@@ -166,11 +160,6 @@
     </simple-method>
 
     <simple-method method-name="copyInvoice" short-description="Create a new Invoice from an existing invoice">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_CREATE"/>
-            <fail-message message="Security Error: to run createInvoice you must have the ACCOUNTING_CREATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>
-        <check-errors/>
         <set field="invoiceLookup.invoiceId" from-field="parameters.invoiceIdToCopyFrom"/>
         <call-service service-name="getInvoice" in-map-name="invoiceLookup">
             <result-to-field result-name="invoice" field-name="invoice"/>
@@ -195,11 +184,6 @@
     </simple-method>
 
     <simple-method method-name="getInvoice" short-description="Retrieve an invoice and the items">
-        <check-permission permission="ACCOUNTING" action="_VIEW">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_VIEW"/>
-            <fail-message message="Security Error: to run getInvoice you must have the ACCOUNTING_VIEW or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_CREATE permission"/>
-        </check-permission>
-        <check-errors/>
         <!-- find the invoice record -->
         <make-value value-name="lookupPKMap" entity-name="Invoice"/>
         <set-pk-fields map-name="parameters" value-name="lookupPKMap"/>
@@ -334,13 +318,7 @@
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
 
-    <simple-method method-name="removePaymentApplication"
-        short-description="Remove an existing payment application">
-        <!-- check access to the accounting function -->
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: To update an Invoice you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>
+    <simple-method method-name="removePaymentApplication" short-description="Remove an existing payment application">
         <entity-one entity-name="PaymentApplication" value-name="paymentApplication">
             <field-map field-name="paymentApplicationId" value="${parameters.paymentApplicationId}"/>
         </entity-one>
@@ -436,11 +414,6 @@
     </simple-method>
 
     <simple-method method-name="setInvoiceStatus" short-description="Set The Invoice Status">
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: To update an Invoice you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>
-
         <entity-one entity-name="Invoice" value-name="invoice"/>
         <field-to-result field-name="invoice.statusId" result-name="oldStatusId"/>
         <if-compare-field field-name="invoice.statusId" operator="not-equals" to-field-name="parameters.statusId">
@@ -513,11 +486,6 @@
 
     <!-- ===============subroutine services =================-->
     <simple-method method-name="InvoiceStatusInProgress" short-description="Check if the invoiceStatus is in progress">
-        <!-- check access to the accounting function -->
-        <check-permission permission="ACCOUNTING" action="_UPDATE">
-            <alt-permission permission="ACCOUNTING_ROLE" action="_UPDATE"/>
-            <fail-message message="Security Error: To update an Invoice you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission, or the limited ACCOUNTING_ROLE_UPDATE permission"/>
-        </check-permission>
         <!-- find the current header record -->
         <entity-one entity-name="Invoice" value-name="headerValue"/>
         <if-empty field-name="headerValue">
@@ -533,11 +501,6 @@
         <check-errors/>
     </simple-method>
     <simple-method method-name="createInvoiceContactMech" short-description="Create a ContactMech for an invoice">
-        <check-permission permission="ACCOUNTING" action="_CREATE">
-            <fail-message message="Security Error: To create an InvoiceContactMech you must have the ACCOUNTING_UPDATE or ACCOUNTING_ADMIN permission"/>
-        </check-permission>
-        <check-errors/>
-
         <make-value value-name="invoiceContactMech" entity-name="InvoiceContactMech"/>
         <set-pk-fields map-name="parameters" value-name="invoiceContactMech"/>
         <create-value value-name="invoiceContactMech"/>

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml Sun Dec  2 11:09:17 2007
@@ -90,4 +90,13 @@
         <call-simple-method method-name="basePermissionCheck"/>
     </simple-method>
 
+    <!-- Returns hasPermission=true if user has one of the base ACCOUNTING CRUD+ADMIN permissions
+        OR if user has one of the base ACCOUNTING_ROLE CRUD+ADMIN permissions -->
+    <!-- TODO: Make this more user-role-specific. Users working with suppliers should only access
+        purchase invoices, users working with customers should only access sales-related
+        invoices, etc. -->
+    <simple-method method-name="acctgInvoicePermissionCheck" short-description="Accounting invoice permission logic">
+        <call-simple-method method-name="basePlusRolePermissionCheck"/>
+    </simple-method>
+
 </simple-methods>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml Sun Dec  2 11:09:17 2007
@@ -36,6 +36,7 @@
     <service name="createInvoice" engine="simple" default-entity-name="Invoice"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoice">
         <description>Create Invoice Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="CREATE"/>
         <auto-attributes mode="INOUT" include="pk" optional="true"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <override name="invoiceTypeId" mode="IN" optional="false"/>
@@ -46,12 +47,14 @@
     <service name="copyInvoice" engine="simple" default-entity-name="Invoice"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="copyInvoice">
         <description>Create Invoice Record/items from an existing invoice</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="CREATE"/>
         <auto-attributes mode="INOUT" include="pk" optional="true"/>
         <attribute name="invoiceIdToCopyFrom" type="String" mode="IN" optional="false"/>
     </service>
     <service name="getInvoice" engine="simple" default-entity-name="Invoice"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="getInvoice">
         <description>Retrieve an existing Invoice/Items</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="VIEW"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <attribute name="invoice" type="GenericValue" mode="OUT"/>
         <attribute name="invoiceItems" type="List" mode="OUT"/><!-- list of invoiceItem GenericValues -->
@@ -59,12 +62,14 @@
     <service name="updateInvoice" engine="simple" default-entity-name="Invoice"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="updateInvoice">
         <description>Update an existing Invoice Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
     <service name="setInvoiceStatus" engine="simple"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="setInvoiceStatus">
         <description>Set the Invoice  Status</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <attribute name="invoiceId" type="String" mode="IN" optional="false"/>
         <attribute name="statusId" type="String" mode="IN" optional="false"/>
         <attribute name="statusDate" type="Timestamp" mode="IN" optional="true"/>
@@ -83,6 +88,7 @@
     <service name="createInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceItem">
         <description>Create a new Invoice Item Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
         <override name="invoiceItemSeqId" mode="INOUT" optional="true"/><!-- will optionally assign by the system -->
@@ -90,29 +96,34 @@
     <service name="updateInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="updateInvoiceItem">
         <description>Update existing Invoice Item Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
     <service name="removeInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="removeInvoiceItem">
         <description>Remove an existing Invoice Item Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
     
     <service name="createInvoiceRole" engine="simple" default-entity-name="InvoiceRole"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceRole">
         <description>Create a new Invoice Role Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
     <service name="removeInvoiceRole" engine="simple" default-entity-name="InvoiceRole"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="removeInvoiceRole">
         <description>Remove an existing Invoice Role Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
     </service>
     <service name="createInvoiceTerm" engine="simple" default-entity-name="InvoiceTerm"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceTerm">
         <description>Create Invoice (Item) Term Record</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="OUT" include="pk" optional="false"/>
         <auto-attributes mode="IN" include="nonpk" optional="true"/>
     </service>
@@ -239,6 +250,7 @@
     <service name="createInvoiceContactMech" engine="simple"
             location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="createInvoiceContactMech">
         <description>Create a ContactMech for an invoice</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="CREATE"/>
         <auto-attributes entity-name="InvoiceContactMech" include="pk" mode="IN" optional="false"/>
         <attribute name="contactMechId" type="String" mode="OUT" optional="true"/>
     </service>
@@ -247,5 +259,12 @@
         <description>Calculate the previously invoiced amount for an OrderAdjustment</description>
         <attribute name="orderAdjustment" type="GenericValue" mode="IN" optional="false"/>
         <attribute name="invoicedTotal" type="BigDecimal" mode="OUT" optional="false"/>
+    </service>
+
+    <!-- Permission services -->
+    <service name="acctgInvoicePermissionCheck" engine="simple"
+            location="component://accounting/script/org/ofbiz/accounting/permissions/PermissionServices.xml" invoke="acctgInvoicePermissionCheck">
+        <description>Accounting Invoice Permission Checking Logic</description>
+        <implements service="permissionInterface"/>
     </service>
 </services>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_payment.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_payment.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_payment.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_payment.xml Sun Dec  2 11:09:17 2007
@@ -103,6 +103,7 @@
     <service name="removePaymentApplication" default-entity-name="PaymentApplication" engine="simple"
         location="org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="removePaymentApplication">
         <description>Delete a paymentApplication record.</description>
+        <permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
         <auto-attributes mode="IN" include="pk" optional="false"/>
         <auto-attributes mode="OUT" include="nonpk" optional="true"/>
     </service>

Modified: ofbiz/trunk/applications/accounting/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/CommonScreens.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/CommonScreens.xml Sun Dec  2 11:09:17 2007
@@ -43,40 +43,6 @@
         </section>
     </screen>
 
-    <screen name="CommonInvoiceDecorator">
-        <section>
-            <actions>
-                <set field="headerItem" value="invoices"/>
-            </actions>
-            <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
-                        <section>
-                            <!-- do check for ACCOUNTING, _VIEW permission -->
-                            <condition>
-                                <if-has-permission permission="ACCOUNTING" action="_VIEW"/>
-                            </condition>
-                            <widgets>
-                                <include-menu name="InvoiceTabBar" location="component://accounting/widget/Menus.xml"/>
-                                <include-menu name="InvoiceSubTabBar" location="component://accounting/widget/Menus.xml"/>
-                                <section>
-                                    <condition><not><if-empty field-name="parameters.invoiceId"/></not></condition>
-                                    <widgets>
-                                        <label style="head1" text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${invoice.description} [${invoiceId}]  ${${extraFunctionName}}"/>
-                                    </widgets>
-                                </section>
-                                <decorator-section-include name="body"/>
-                            </widgets>
-                            <fail-widgets>
-                                <label style="head3">${uiLabelMap.AcccountingViewPermissionError}</label>
-                            </fail-widgets>
-                        </section>                    
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>
-
     <screen name="CommonPaymentDecorator">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceScreens.xml Sun Dec  2 11:09:17 2007
@@ -21,6 +21,41 @@
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
     
+    <!-- Custom apps can use their own invoice decorator by specifying its
+         location in parameters.invoiceDecoratorLocation -->
+    <screen name="CommonInvoiceDecorator">
+        <section>
+            <actions>
+                <set field="headerItem" value="invoices"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-service-permission service-name="acctgInvoicePermissionCheck" main-action="VIEW"/>
+                            </condition>
+                            <widgets>
+                                <section>
+                                    <condition><not><if-empty field-name="parameters.invoiceId"/></not></condition>
+                                    <widgets>
+                                        <include-menu name="InvoiceTabBar" location="component://accounting/widget/Menus.xml"/>
+                                        <include-menu name="InvoiceSubTabBar" location="component://accounting/widget/Menus.xml"/>
+                                        <label style="head1" text="${uiLabelMap.${labelTitleProperty}} ${uiLabelMap.CommonFor}: ${invoice.description} [${invoiceId}]  ${${extraFunctionName}}"/>
+                                    </widgets>
+                                </section>
+                                <decorator-section-include name="body"/>
+                            </widgets>
+                            <fail-widgets>
+                                <label style="head3">${uiLabelMap.AcccountingViewPermissionError}</label>
+                            </fail-widgets>
+                        </section>                    
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="FindInvoices">
         <section>
             <actions>
@@ -31,10 +66,10 @@
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="30"/>
             </actions>
             <widgets>
-                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-menu name="InvoiceSubTabBar" location="component://accounting/widget/Menus.xml"/>
                         <container><label style="head1" text="${uiLabelMap.AccountingFindInvoices}"/></container>
+                        <include-menu name="InvoiceSubTabBar" location="component://accounting/widget/Menus.xml"/>
                         <include-form name="FindInvoices" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>
                         <include-form name="ListInvoices"  location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>
                     </decorator-section>
@@ -42,6 +77,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="NewInvoice">
         <section>
             <actions>
@@ -50,7 +86,7 @@
                 <entity-one entity-name="Invoice" value-name="invoice"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <widgets>
@@ -65,6 +101,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="EditInvoice">
         <section>
             <actions>
@@ -79,7 +116,7 @@
                 </entity-one>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <widgets>
@@ -124,7 +161,7 @@
                 
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <container><label style="head1" text="${uiLabelMap.AccountingInvoiceHeader}"/></container>
                         <section>
@@ -191,7 +228,7 @@
                 </entity-and>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <label style="head1" text="${uiLabelMap.AccountingInvoiceStatusHistory}"/>
                         <include-form name="ListInvoiceStatus" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>
@@ -200,6 +237,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="EditInvoiceApplications">
         <section>
             <actions>
@@ -215,7 +253,7 @@
                 <set field="appliedAmount" value="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceAppliedBd(invoice)}"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <condition>
@@ -262,6 +300,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="EditInvoiceItems">
         <section>
             <actions>
@@ -280,7 +319,7 @@
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.bsh"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <label style="head1" text="${uiLabelMap.AccountingInvoiceItems}"/>
                         <include-form name="EditInvoiceItems" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>
@@ -306,7 +345,7 @@
                 </entity-and>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <label style="head1" text="${uiLabelMap.AccountingInvoiceTimeEntries}"/>
                         <include-form name="EditTimeEntries" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>
@@ -330,7 +369,7 @@
                 </entity-and>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <label style="head1" text="${uiLabelMap.AccountingPartyRoleList}"/>
                         <include-form name="ListInvoiceRoles" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>
@@ -341,6 +380,7 @@
             </widgets>
         </section>
     </screen>
+
     <screen name="SendPerEmail">
         <section>
             <actions>
@@ -350,7 +390,7 @@
                 <set field="tabButtonItem" value="sendPerEmail"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonInvoiceDecorator" location="${parameters.invoiceDecoratorLocation}">
                     <decorator-section name="body">
                         <label style="head1" text="${uiLabelMap.CommonSendPerEmail}"/>
                         <include-form name="SendPerEmail" location="component://accounting/webapp/accounting/invoice/InvoiceForms.xml"/>

Modified: ofbiz/trunk/applications/accounting/widget/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/Menus.xml?rev=600357&r1=600356&r2=600357&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/Menus.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/Menus.xml Sun Dec  2 11:09:17 2007
@@ -21,7 +21,7 @@
 <menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
     
-    <menu name="InvoiceTabBar" menu-container-style="button-bar button-style-1" default-selected-style="selected">
+    <menu name="InvoiceTabBar" menu-container-style="button-bar tab-bar" default-selected-style="selected">
         <menu-item name="invoiceOverview" title="${uiLabelMap.AccountingInvoiceOverview}">
             <condition>
                 <not><if-empty field-name="invoice.invoiceId"/></not>