* Improved: VIEW permissions Commission Run (OFBIZ-12433) Currently, when using a userId with only VIEW permission, the Commission Run trigger (menuItem) presents a screen to search and find invoices applicable for the underlying service of creating commission invoices. On the result shown, the user has access to triggers (functionalities) reserved for users with CREATE/UPDATE permissions. See (test with): https://demo-trunk.ofbiz.apache.org/accounting/control/CommissionRun and from date= 12/1/1999 12:00:00 AM Modified: InvoiceScreens.xml (in AP) - screen CommissionRun - restructured the screen to show result based on permissions - added reference to template for users with VIEW permissions Added: CommissionRunSearchResult.ftl template for users with VIEW permissions * Improved: VIEW permissions Commission Run (OFBIZ-12433) Currently, when using a userId with only VIEW permission, the Commission Run trigger (menuItem) presents a screen to search and find invoices applicable for the underlying service of creating commission invoices. On the result shown, the user has access to triggers (functionalities) reserved for users with CREATE/UPDATE permissions. See (test with): https://demo-trunk.ofbiz.apache.org/accounting/control/CommissionRun and from date= 12/1/1999 12:00:00 AM Modified: InvoiceScreens.xml (in AP) - screen CommissionRun - restructured the screen to show result based on permissions - added reference to template for users with VIEW permissions Added: CommissionRunSearchResult.ftl template for users with VIEW permissions
261 lines
16 KiB
XML
261 lines
16 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
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.
|
|
-->
|
|
|
|
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
|
|
|
|
<screen name="ListReports">
|
|
<section>
|
|
<actions>
|
|
<set field="titleProperty" value="AccountingArPageTitleListReports"/>
|
|
<set field="tabButtonItem" value="viewReports"/>
|
|
<set field="invoiceTypeId" value="PURCHASE_INVOICE"/>
|
|
<set field="organizationPartyId" from-field="userPreferences.ORGANIZATION_PARTY" default-value="${defaultOrganizationPartyId}"/>
|
|
<script location="component://accounting/groovyScripts/invoice/InvoiceReport.groovy"/>
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="CommonApReportDecorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<screenlet title="${uiLabelMap.AccountingPastDueInvoices}: (${PastDueInvoicestotalAmount})" navigation-form-name="ListReports">
|
|
<section>
|
|
<actions>
|
|
<set field="invoices" from-field="PastDueInvoices"/>
|
|
</actions>
|
|
<widgets>
|
|
<include-form name="ListReports" location="component://accounting/widget/ap/forms/InvoiceForms.xml"/>
|
|
</widgets>
|
|
</section>
|
|
</screenlet>
|
|
<screenlet title="${uiLabelMap.AccountingInvoicesDueSoon}: (${InvoicesDueSoonTotalAmount})" navigation-form-name="ListReports">
|
|
<section>
|
|
<actions>
|
|
<set field="invoices" from-field="InvoicesDueSoon"/>
|
|
</actions>
|
|
<widgets>
|
|
<include-form name="ListReports" location="component://accounting/widget/ap/forms/InvoiceForms.xml"/>
|
|
</widgets>
|
|
</section>
|
|
</screenlet>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="FindApInvoices">
|
|
<section>
|
|
<actions>
|
|
<set field="titleProperty" value="AccountingFindApInvoices"/>
|
|
<set field="tabButtonItem" value="viewInvoices"/>
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<section>
|
|
<widgets>
|
|
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
|
<decorator-section name="menu-bar">
|
|
<container style="button-bar">
|
|
<link target="NewPurchaseInvoice" text="${uiLabelMap.CommonCreate}" style="buttontext"/>
|
|
</container>
|
|
</decorator-section>
|
|
<decorator-section name="search-options">
|
|
<include-form name="FindApInvoices" location="component://accounting/widget/ap/forms/InvoiceForms.xml"/>
|
|
</decorator-section>
|
|
<decorator-section name="search-results">
|
|
<include-form name="ListInvoices" location="component://accounting/widget/InvoiceForms.xml"/>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="FindPurchaseInvoices">
|
|
<section>
|
|
<actions>
|
|
<set field="titleProperty" value="AccountingFindPurchaseInvoices"/>
|
|
<set field="tabButtonItem" value="purchaseInvoices"/>
|
|
<set field="statusIds" from-field="parameters.statusId" type="List"/>
|
|
<entity-condition entity-name="Invoice" list="invoices">
|
|
<condition-list combine="and">
|
|
<condition-expr field-name="invoiceTypeId" operator="equals" from-field="parameters.invoiceTypeId" ignore-if-empty="false"/>
|
|
<condition-expr field-name="partyIdFrom" operator="equals" from-field="parameters.partyIdFrom" ignore-if-empty="true"/>
|
|
<condition-expr field-name="invoiceDate" operator="greater-equals" from-field="parameters.fromInvoiceDate" ignore-if-empty="true"/>
|
|
<condition-expr field-name="invoiceDate" operator="less-equals" from-field="parameters.thruInvoiceDate" ignore-if-empty="true"/>
|
|
<condition-expr field-name="dueDate" operator="greater-equals" from-field="parameters.fromDueDate" ignore-if-empty="true"/>
|
|
<condition-expr field-name="dueDate" operator="less-equals" from-field="parameters.thruDueDate" ignore-if-empty="true"/>
|
|
<condition-expr field-name="statusId" operator="in" from-field="statusIds" ignore-if-empty="true"/>
|
|
</condition-list>
|
|
<order-by field-name="partyIdFrom"/>
|
|
</entity-condition>
|
|
<set field="paymentPartyId" from-field="parameters.partyIdFrom" default-value="${parameters.organizationPartyId}"/>
|
|
<entity-and entity-name="PaymentMethod" list="paymentMethods">
|
|
<field-map field-name="partyId" from-field="paymentPartyId"/>
|
|
<field-map field-name="paymentMethodTypeId" value="COMPANY_CHECK"/>
|
|
</entity-and>
|
|
<set field="organizationPartyId" from-field="parameters.organizationPartyId"/>
|
|
<set field="asm_multipleSelectForm" value="FindPurchaseInvoices"/>
|
|
<set field="statusId.asm_multipleSelect" value="FindPurchaseInvoices_statusId"/>
|
|
<set field="statusId.asm_sortable" value="true"/>
|
|
<set field="statusId.asm_title" value=" "/>
|
|
<set field="asm_listField[]" from-field="statusId"/>
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<section>
|
|
<widgets>
|
|
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
|
<decorator-section name="search-options">
|
|
<platform-specific>
|
|
<html><html-template multi-block="true" location="component://common-theme/template/includes/SetMultipleSelectJsList.ftl"/></html>
|
|
</platform-specific>
|
|
<include-form name="FindPurchaseInvoices" location="component://accounting/widget/ap/forms/InvoiceForms.xml"/>
|
|
</decorator-section>
|
|
<decorator-section name="search-results">
|
|
<platform-specific>
|
|
<html><html-template multi-block="true" location="component://accounting/template/ap/invoices/PurchaseInvoices.ftl"/></html>
|
|
</platform-specific>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="NewPurchaseInvoice">
|
|
<section>
|
|
<actions>
|
|
<set field="titleProperty" value="AccountingCreateNewPurchaseInvoice"/>
|
|
<set field="headerItem" value="invoices"/>
|
|
<entity-one entity-name="Invoice" value-field="invoice"/>
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<section>
|
|
<widgets>
|
|
<screenlet title="${uiLabelMap.AccountingCreateNewPurchaseInvoice}">
|
|
<include-form name="NewPurchaseInvoice" location="component://accounting/widget/InvoiceForms.xml"/>
|
|
</screenlet>
|
|
</widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="CommissionRun">
|
|
<section>
|
|
<actions>
|
|
<set field="titleProperty" value="AccountingFindSalesInvoicesForCommissionRun"/>
|
|
<set field="tabButtonItem" value="commissionRun"/>
|
|
<set field="salesRepPartyList" type="List" from-field="parameters.partyIds"/>
|
|
<script location="component://accounting/groovyScripts/ap/invoices/CommissionRun.groovy"/>
|
|
|
|
<!-- asmselect parameters, must be prefixed by asm_ for SetMultipleSelectJs.ftl -->
|
|
<set field="asm_multipleSelectForm" value="CommissionRun"/>
|
|
<set field="asm_multipleSelect" value="CommissionRun_partyId"/>
|
|
<set field="asm_formSize" value="700"/>
|
|
<set field="asm_listItemPercentOfForm" value="95"/>
|
|
<set field="asm_sortable" value="false"/>
|
|
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
|
|
<set field="asm_title" from-field="uiLabelMap.AccountingSelectPartiesForCommissionInvoice"/>
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<platform-specific><html><html-template multi-block="true" location="component://common-theme/template/includes/SetMultipleSelectJs.ftl"/></html></platform-specific>
|
|
<section>
|
|
<widgets>
|
|
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
|
<decorator-section name="search-options">
|
|
<include-form name="CommissionRun" location="component://accounting/widget/ap/forms/InvoiceForms.xml"/>
|
|
</decorator-section>
|
|
<decorator-section name="search-results">
|
|
<section>
|
|
<condition>
|
|
<and>
|
|
<or>
|
|
<if-has-permission permission="ACCOUNTING" action="_CREATE"/>
|
|
<if-has-permission permission="ACCOUNTING" action="_UPDATE"/>
|
|
</or>
|
|
</and>
|
|
</condition>
|
|
<widgets>
|
|
<platform-specific>
|
|
<html><html-template multi-block="true" location="component://accounting/template/ap/invoices/CommissionRun.ftl"/></html>
|
|
</platform-specific>
|
|
</widgets>
|
|
<fail-widgets>
|
|
<platform-specific>
|
|
<html><html-template multi-block="true" location="component://accounting/template/invoice/CommissionRunSearchResult.ftl"/></html>
|
|
</platform-specific>
|
|
</fail-widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
|
|
<screen name="CommissionReport">
|
|
<section>
|
|
<actions>
|
|
<set field="titleProperty" value="AccountingCommissionReport"/>
|
|
<set field="tabButtonItem" value="commissionReport"/>
|
|
<script location="component://accounting/groovyScripts/ap/invoices/CommissionReport.groovy"/>
|
|
</actions>
|
|
<widgets>
|
|
<decorator-screen name="CommonApReportDecorator" location="${parameters.mainDecoratorLocation}">
|
|
<decorator-section name="body">
|
|
<section>
|
|
<widgets>
|
|
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
|
<decorator-section name="search-options">
|
|
<include-form name="CommissionReport" location="component://accounting/widget/ap/forms/InvoiceForms.xml"/>
|
|
</decorator-section>
|
|
<decorator-section name="search-results">
|
|
<platform-specific>
|
|
<html><html-template location="component://accounting/template/ap/invoices/CommissionReport.ftl"/></html>
|
|
</platform-specific>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</decorator-section>
|
|
</decorator-screen>
|
|
</widgets>
|
|
</section>
|
|
</screen>
|
|
</screens>
|