Files
ofbiz-framework/applications/humanres/widget/EmploymentScreens.xml
T
Jacques Le Roux cf377c0dc5 "Applied fix from trunk for revision: 1859571"
------------------------------------------------------------------------
r1859571 | jleroux | 2019-05-20 19:14:43 +0200 (lun. 20 mai 2019) | 22 lignes

Fixed: field emplFromDate is forgot in PayHistory entity
(OFBIZ-11028)

Arpit Mor: steps to regenerate:
    Login to the URL: https://demo-trunk.ofbiz.apache.org/humanres/control/main
    Click on Employments
    Click on New Employments
    Click on Create
Actual: Error message is displayed.

Olivier Heintz: employment is associated with PayHistory, and there is a problem 
in PayHistory entity definition in OFBiz,
In PayHistory, the field fromDate from Employment is confused with fromDate 
about the current record.
A Employment can have multiple PayHistories and should have multiple
because PayHistory should show history of Pay  for a employment  !
It's necessary to have a field emplFromDate (to have the complete employment 
primaryKey).
When modifying a PayRecord the current should be expire and a new one should 
be created.

Thanks: Arpit Mor for report at OFBIZ-10969 and Olivier Heintz for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859572 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 17:16:16 +00:00

263 lines
15 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="FindEmployments">
<section>
<actions>
<set field="titleProperty" value="HumanResFindEmployment"/>
<set field="headerItem" value="Employment"/>
<set field="roleTypeIdFrom" from-field="parameters.roleTypeIdFrom"/>
<set field="roleTypeIdTo" from-field="parameters.roleTypeIdTo"/>
<set field="partyIdFrom" from-field="parameters.partyIdFrom"/>
<set field="partyIdTo" from-field="parameters.partyIdTo"/>
<set field="fromDate" from-field="parameters.fromDate"/>
<set field="employmentCtx" from-field="parameters"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
<decorator-section name="menu-bar">
<section>
<widgets>
<container style="button-bar">
<link target="EditEmployment" text="${uiLabelMap.HumanResNewEmployment}" style="buttontext create"/>
</container>
</widgets>
</section>
</decorator-section>
<decorator-section name="search-options">
<include-form name="FindEmployments" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<include-form name="ListEmploymentsPerson" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
</decorator-screen>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditEmployment">
<section>
<actions>
<set field="titleProperty" value="HumanResEditEmployment"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditEmployment"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
<entity-one entity-name="Employment" value-field="employment"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.HumanResEditEmployment}">
<include-form name="EditEmployment" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ListEmployments">
<section>
<actions>
<set field="titleProperty" value="HumanResListEmployments"/>
<set field="tabButtonItem" value="ListEmployment"/>
<set field="employmentCtx.partyIdTo" from-field="parameters.partyId"/>
</actions>
<widgets>
<decorator-screen name="EmployeeDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.HumanResEmployment}" navigation-form-name="ListEmploymentsPerson">
<include-form name="ListEmploymentsPerson" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ListPayHistories">
<section>
<actions>
<set field="titleProperty" value="HumanResListPayHistories"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditPayHistory"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.HumanResListPayHistories}">
<include-form name="ListPayHistories" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditPayHistory">
<section>
<actions>
<set field="titleProperty" value="HumanResListPayHistories"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditPayHistory"/>
<entity-one value-field="payHistory" entity-name="PayHistory"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.HumanResListPayHistories}">
<include-form name="ListPayHistories" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.HumanResListPayHistories}">
<include-form name="EditPayHistory" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditPartyBenefits">
<section>
<actions>
<set field="titleProperty" value="HumanResListPartyBenefits"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditPartyBenefit"/>
<set field="roleTypeIdFrom" from-field="parameters.roleTypeIdFrom"/>
<set field="roleTypeIdTo" from-field="parameters.roleTypeIdTo"/>
<set field="partyIdTo" from-field="parameters.partyIdTo"/>
<set field="partyIdFrom" from-field="parameters.partyIdFrom"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="AddPartyBenefitPanel" title="${uiLabelMap.HumanResAddPartyBenefit}" collapsible="true">
<include-form name="AddPartyBenefit" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
<include-form name="ListPartyBenefits" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditPayrollPreferences">
<section>
<actions>
<set field="titleProperty" value="HumanResListPayrollPreferences"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditPayrollPreference"/>
<set field="roleTypeIdFrom" from-field="parameters.roleTypeIdFrom"/>
<set field="roleTypeIdTo" from-field="parameters.roleTypeIdTo"/>
<set field="partyIdTo" from-field="parameters.partyIdTo"/>
<set field="partyIdFrom" from-field="parameters.partyIdFrom"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
<set field="payrollPreferenceSeqId" from-field="parameters.payrollPreferenceSeqId"/>
<set field="partyId" from-field="parameters.partyIdTo"/>
<set field="roleTypeId" from-field="parameters.roleTypeIdTo"/>
<entity-one entity-name="PayrollPreference" value-field="payrollPreference"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="AddPayrollPreferencePanel" title="${uiLabelMap.HumanResAddPayrollPreference}" collapsible="true">
<include-form name="AddPayrollPreference" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
<include-form name="ListPayrollPreferences" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditUnemploymentClaims">
<section>
<actions>
<set field="titleProperty" value="HumanResAddUnemploymentClaim"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditUnemploymentClaims"/>
<set field="unemploymentClaimId" from-field="parameters.unemploymentClaimId"/>
<set field="roleTypeIdFrom" from-field="parameters.roleTypeIdFrom"/>
<set field="roleTypeIdTo" from-field="parameters.roleTypeIdTo"/>
<set field="partyIdTo" from-field="parameters.partyIdTo"/>
<set field="partyIdFrom" from-field="parameters.partyIdFrom"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
<entity-one entity-name="UnemploymentClaim" value-field="unemploymentClaim"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="AddUnemploymentClaimPanel" title="${uiLabelMap.HumanResAddUnemploymentClaim}" collapsible="true">
<include-form name="AddUnemploymentClaim" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
<include-form name="ListUnemploymentClaims" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditPerformanceNotes">
<section>
<actions>
<set field="titleProperty" value="HumanResPerfNote"/>
<set field="headerItem" value="Employee"/>
<set field="tabButtonItem" value="EditPerformanceNotes"/>
<set field="partyId" from-field="parameters.partyId"/>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="AddPerformanceNotePanel" title="${uiLabelMap.HumanResAddPerfNote}" collapsible="true">
<include-form name="AddPerformanceNote" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
<include-form name="ListPerformanceNotes" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="EditAgreementEmploymentAppls">
<section>
<actions>
<set field="titleProperty" value="HumanResEditAgreementEmploymentAppl"/>
<set field="headerItem" value="Employment"/>
<set field="tabButtonItem" value="EditAgreementEmploymentAppls"/>
<set field="agreementId" from-field="parameters.agreementId"/>
<set field="agreementItemSeqId" from-field="parameters.agreementItemSeqId"/>
<set field="roleTypeIdFrom" from-field="parameters.roleTypeIdFrom"/>
<set field="roleTypeIdTo" from-field="parameters.roleTypeIdTo"/>
<set field="partyIdTo" from-field="parameters.partyIdTo"/>
<set field="partyIdFrom" from-field="parameters.partyIdFrom"/>
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
</actions>
<widgets>
<decorator-screen name="CommonEmploymentDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<screenlet id="AddAgreementEmploymentApplPanel" title="${uiLabelMap.CommonAdd} ${uiLabelMap.HumanResAgreementEmploymentAppl}" collapsible="true">
<include-form name="AddAgreementEmploymentAppl" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</screenlet>
<include-form name="ListAgreementEmploymentAppls" location="component://humanres/widget/forms/EmploymentForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>