applications/workeffort/widget/TimesheetForms.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="ListMyTimesheets" target="" title="" type="list" list-name="timesheets" paginate-target="MyTimesheets" paginate="true"
odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
<actions>
<entity-and entity-name="Timesheet" list="timesheets">
<field-map field-name="partyId" from-field="userLogin.partyId"/>
<order-by field-name="-fromDate"/>
</entity-and>
</actions>
<auto-fields-entity entity-name="Timesheet" default-field-type="display"/><!-- SCIPIO: switched to display type, this form has no update service -->
<field name="timesheetId" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}" widget-style="${styles.link_nav_info_id}">
<hyperlink description="${timesheetId}" target="EditTimesheet" also-hidden="false">
<parameter param-name="timesheetId"/>
</hyperlink>
</field>
<field name="statusId" title="${uiLabelMap.CommonStatus}"><!-- SCIPIO: added (missing in stock) -->
<display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}" />
</field>
<field name="partyId"><hidden/></field>
<field name="clientPartyId"><display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName} [${partyId}]"/></field>
</form>
<form name="ListMyRates" target="" title="" type="list" list-name="partyRates" paginate="false"
odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
<actions>
<entity-and entity-name="PartyRate" list="partyRates">
<field-map field-name="partyId" from-field="userLogin.partyId"/>
<order-by field-name="-fromDate"/>
</entity-and>
</actions>
<auto-fields-entity entity-name="PartyRate" default-field-type="display"/>
<field name="rateTypeId" title="${uiLabelMap.WorkEffortTimesheetRateType}"><display-entity entity-name="RateType"/></field>
<field name="partyId"><hidden/></field>
</form>
<form name="QuickCreateTimeEntry" target="createQuickTimeEntry" title="" type="single"
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<field name="timesheetId" map-name="currentTimesheet"><hidden/></field>
<field name="partyId" map-name="userLogin"><hidden/></field>
<field name="rateTypeId" title="${uiLabelMap.WorkEffortTimesheetRateType}">
<drop-down no-current-selected-key="STANDARD" >
<entity-options entity-name="RateType" description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="workEffortId"><lookup target-form-name="LookupWorkEffort"/></field>
<field name="hours"><text size="5"/></field>
<field name="comments"><text size="40"/></field>
<field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
</form>
<form name="FindTimesheet" default-map-name="timesheet" target="FindTimesheet" title="" type="single"
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<auto-fields-entity entity-name="Timesheet" default-field-type="find"/>
<field name="partyId" title="${uiLabelMap.PartyParty}"><lookup target-form-name="LookupPartyName"/></field>
<field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
<field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
</form>
<form name="ListFindTimesheet" target="" title="" type="list" list-name="listIt" paginate-target="FindTimesheet" paginate="true"
odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
<actions>
<service result-map-list="listIt" result-map="result" service-name="performFind">
<field-map field-name="inputFields" from-field="parameters"/>
<field-map field-name="entityName" value="Timesheet"/>
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
</actions>
<auto-fields-entity entity-name="Timesheet" default-field-type="display"/>
<field name="timesheetId" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}" widget-style="${styles.link_nav_info_id}">
<hyperlink description="${timesheetId}" target="EditTimesheet" also-hidden="false">
<parameter param-name="timesheetId"/>
</hyperlink>
</field>
<field name="statusId" title="${uiLabelMap.CommonStatus}"><!-- SCIPIO: added (missing in stock) -->
<display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}" />
</field>
<field name="partyId" title="${uiLabelMap.PartyParty}">
<display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}">
<sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${partyId}" link-style="${styles.link_nav_info_id}"><!-- SCIPIO: added missing link -->
<parameter param-name="partyId" from-field="partyId"/>
</sub-hyperlink>
</display-entity>
</field>
</form>
<form name="EditTimesheet" default-map-name="timesheet" target="updateTimesheet" title="" type="single"
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<alt-target target="createTimesheet" use-when="timesheet==null"/>
<auto-fields-service service-name="updateTimesheet"/>
<field name="timesheetId" use-when="timesheet!=null" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
<field name="timesheetId" use-when="timesheet==null&&timesheetId==null" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}"><ignored/></field>
<field name="timesheetId" use-when="timesheet==null&&timesheetId!=null" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}" tooltip="${uiLabelMap.CommonCannotBeFound}: [${timesheetId}]"><display also-hidden="false"/></field>
<field name="partyId" title="${uiLabelMap.PartyParty}*"><lookup target-form-name="LookupPartyName"/></field>
<field name="clientPartyId"><lookup target-form-name="LookupPartyName"/></field>
<field name="statusId" title="${uiLabelMap.CommonStatus}*" position="1">
<drop-down no-current-selected-key="TIMESHEET_IN_PROCESS">
<entity-options entity-name="StatusItem" key-field-name="statusId" description="${description}">
<entity-constraint name="statusTypeId" value="TIMESHEET_STATUS"/>
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="submitAction" title="${uiLabelMap.CommonSave}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
</form>
<form name="DisplayTimesheetEntries" type="list" list-name="timesheetEntries"
odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
<actions>
<entity-condition entity-name="TimeEntry">
<condition-expr field-name="timesheetId" from-field="timesheetId"/>
<order-by field-name="partyId"/>
<order-by field-name="rateTypeId"/>
<order-by field-name="-fromDate"/>
</entity-condition>
</actions>
<auto-fields-entity entity-name="TimeEntry" default-field-type="display"/>
<field name="timeEntryId"><hidden/></field>
<field name="timesheetId"><hidden/></field>
<field name="partyId" title="${uiLabelMap.PartyParty}"/>
<field name="rateTypeId" title="${uiLabelMap.WorkEffortTimesheetRateType}"><display-entity entity-name="RateType"/></field>
<field name="workEffortId">
<display-entity entity-name="WorkEffort" description="${workEffortName}">
<sub-hyperlink target="WorkEffortSummary" description="${workEffortId}" link-style="${styles.link_nav_info_id}">
<parameter param-name="workEffortId"/>
</sub-hyperlink>
</display-entity>
</field>
<field name="invoiceId" widget-style="${styles.link_nav_info_id}">
<hyperlink target="/accounting/control/invoiceOverview" target-type="inter-app" description="${invoiceId}">
<parameter param-name="invoiceId"/>
</hyperlink>
</field>
</form>
<form name="AddTimesheetToInvoice" target="addTimesheetToInvoice" title="" type="single"
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<field name="timesheetId"><hidden/></field>
<field name="invoiceId"><lookup target-form-name="LookupInvoice"/></field>
<field name="submitAction" title="${uiLabelMap.PageTitleAddWorkEffortTimeToInvoice}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
</form>
<form name="AddTimesheetToNewInvoice" target="addTimesheetToNewInvoice" title="" type="single"
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<field name="timesheetId"><hidden/></field>
<field name="partyIdFrom" title="${uiLabelMap.WorkEffortTimeBillFromParty}"><lookup target-form-name="LookupPartyName"/></field>
<field name="partyId" title="${uiLabelMap.WorkEffortTimeBillToParty}"><lookup target-form-name="LookupPartyName" default-value="${timesheet.clientPartyId}"/></field>
<field name="submitAction" title="${uiLabelMap.PageTitleAddWorkEffortTimeToNewInvoice}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
</form>
<!-- TimesheetRole -->
<form name="ListTimesheetRoles" type="list" list-name="timesheetRoles" target=""
odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
<actions>
<entity-condition entity-name="TimesheetRole">
<condition-expr field-name="timesheetId" from-field="timesheetId"/>
<order-by field-name="roleTypeId"/>
</entity-condition>
</actions>
<field name="timesheetId"><hidden/></field>
<field name="roleTypeId" title="${uiLabelMap.PartyRole}"><display-entity entity-name="RoleType"/></field>
<field name="partyId" title="${uiLabelMap.PartyParty}"><display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName} [${partyId}]"/></field>
<field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
<hyperlink target="deleteTimesheetRole" description="${uiLabelMap.CommonDelete}" also-hidden="false">
<parameter param-name="timesheetId"/>
<parameter param-name="partyId"/>
<parameter param-name="roleTypeId"/>
</hyperlink>
</field>
</form>
<form name="AddTimesheetRole" type="single" target="createTimesheetRole" title=""
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<auto-fields-service service-name="createTimesheetRole"/>
<field name="timesheetId"><hidden/></field>
<field name="partyId" title="${uiLabelMap.PartyParty}"><lookup target-form-name="LookupPartyName"/></field>
<field name="roleTypeId" title="${uiLabelMap.PartyRole}">
<drop-down>
<entity-options entity-name="RoleType" description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
</form>
<!-- TimesheetEntry -->
<form name="ListTimesheetEntries" type="list" list-name="timesheetEntries" target="updateTimesheetEntry"
odd-row-style="alternate-row"> <!-- orig: default-table-style=-style="basic-table hover-bar" -->
<actions>
<entity-condition entity-name="TimeEntry">
<condition-expr field-name="timesheetId" from-field="timesheetId"/>
<order-by field-name="partyId"/>
<order-by field-name="rateTypeId"/>
<order-by field-name="-fromDate"/>
</entity-condition>
</actions>
<auto-fields-service service-name="updateTimeEntry"/>
<field name="timeEntryId"><hidden/></field>
<field name="timesheetId"><hidden/></field>
<field name="partyId" title="${uiLabelMap.PartyParty}"><lookup size="12" target-form-name="LookupPartyName" default-value="${timesheet.partyId}"/></field>
<field name="rateTypeId" title="${uiLabelMap.WorkEffortTimesheetRateType}">
<drop-down>
<entity-options entity-name="RateType" description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="workEffortId">
<lookup size="10" target-form-name="LookupWorkEffort">
<sub-hyperlink target="EditWorkEffort" link-style="${styles.link_nav_info_id_long}" description="${uiLabelMap.WorkEffortWorkEffort}:${workEffortId}">
<parameter param-name="workEffortId"/>
</sub-hyperlink>
</lookup>
</field>
<field name="invoiceId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
<field name="invoiceItemSeqId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
<field name="comments"><text size="60"/></field>
<field name="submitAction" title="${uiLabelMap.CommonUpdate}" widget-style="${styles.link_run_sys} ${styles.action_update}"><submit button-type="button"/></field>
<field name="deleteAction" title=" " widget-style="${styles.link_run_sys} ${styles.action_remove}">
<hyperlink target="deleteTimesheetEntry" description="${uiLabelMap.CommonDelete}" also-hidden="false">
<parameter param-name="timesheetId"/>
<parameter param-name="timeEntryId"/>
</hyperlink>
</field>
</form>
<form name="AddTimesheetEntry" type="single" target="createTimesheetEntry" title=""
header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
<auto-fields-service service-name="createTimeEntry"/>
<field name="timeEntryId"><ignored/><!-- don't pass, will be sequenced --></field>
<field name="timesheetId"><hidden/></field>
<field name="partyId" title="${uiLabelMap.PartyParty}"><lookup target-form-name="LookupPartyName" default-value="${timesheet.partyId}"/></field>
<field name="rateTypeId" title="${uiLabelMap.WorkEffortTimesheetRateType}">
<drop-down no-current-selected-key="STANDARD">
<entity-options entity-name="RateType" description="${description}">
<entity-order-by field-name="description"/>
</entity-options>
</drop-down>
</field>
<field name="workEffortId"><lookup target-form-name="LookupWorkEffort"/></field>
<field name="invoiceId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
<field name="invoiceItemSeqId"><ignored/><!-- don't pass, will be populated when this is added to an invoice later --></field>
<field name="submitAction" title="${uiLabelMap.CommonAdd}" widget-style="${styles.link_run_sys} ${styles.action_add}"><submit button-type="button"/></field>
</form>
</forms>