Update attendances module

Add services files directory configuration to application.properties
This commit is contained in:
Kheireddine Mehdi
2024-11-18 15:55:30 +01:00
parent 8d8a94b65f
commit bfd7091360
30 changed files with 1445 additions and 208 deletions

View File

@@ -8,12 +8,14 @@
<entity name="Absence">
<many-to-one name="employee" ref="com.axelor.apps.hr.db.Employee"/>
<string name="absenceType" title="Type Absence" selection="hr.type.absence.selection"/>
<integer name="absenceType" title="Type Absence" selection="hr.type.absence.selection"/>
<datetime name="startDate" title="Date Début"/>
<datetime name="endDate" title="Date Fin"/>
<decimal name="totalAbsenceHours" precision="20" scale="2"/>
<one-to-many name="dailyReport" ref="com.axelor.apps.hr.db.DailyReport"/>
<many-to-many name="dailyReportSet" ref="com.axelor.apps.hr.db.DailyReport"/>
<string name="fullName" namecolumn="true">
<![CDATA[
@@ -23,21 +25,68 @@
}
if (absenceType != null) {
fullName += " - " + absenceType;
}
}
if (startDate != null && endDate != null) {
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
fullName += " (from " + startDate.format(formatter) + " to " + endDate.format(formatter) + ")";
}
return fullName;
]]>
</string>
</string>
<extra-code><![CDATA[
// PERIOD ABSENCE TYPE
public static final int PERIOD_ABSENCE_TYPE_PARTIAL_DAY = 0;
public static final int PERIOD_ABSENCE_TYPE_FULL_DAY = 1;
public static final int PERIOD_ABSENCE_TYPE_MULTIPLE_DAYS = 2;
]]></extra-code>
<track>
<field name="employee"/>
<field name="absenceType"/>
<field name="startDate"/>
<field name="endDate"/>
</track>
<!--<string name="fullName" namecolumn="true">
<![CDATA[
String fullName = "";
if (employee != null && employee.getContactPartner() != null && employee.getContactPartner().getFullName() != null) {
fullName += employee.getContactPartner().getFullName();
}
if (absenceType != null) {
fullName += " - " + absenceType;
}
if (periodAbsenceType != null){
if(periodAbsenceType == 0){
if (startDate != null && endDate != null){
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("HH:mm");
fullName += " (from " + startDate.format(formatter) + " to " + endDate.format(formatter) + ")";
}
} else if(periodAbsenceType == 1){
if(startDate != null){
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("dd/MM/yyyy");
fullName += " - " + startDate.format(formatter);
}
}else{
if (startDate != null && endDate != null){
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("dd/MM/yyyy");
fullName += " (from " + startDate.format(formatter) + " to " + endDate.format(formatter) + ")";
}
}
}
else{
if (startDate != null && endDate != null) {
java.time.format.DateTimeFormatter formatter = java.time.format.DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
fullName += " (from " + startDate.format(formatter) + " to " + endDate.format(formatter) + ")";
}
}
return fullName;
]]>
</string> -->
</entity>
<track>
<field name="employee"/>
<field name="absenceType"/>
<field name="startDate"/>
<field name="endDate"/>
</track>
</domain-models>

View File

@@ -38,6 +38,11 @@
<decimal name="lateArrival" title ="Late arrival" precision="20" scale="2" />
<decimal name="earlyDeparture" title ="Early departure" precision="20" scale="2" />
<boolean name="isAuthorizedAbsence" default="False"/>
<boolean name="isAuthorizedLateArrival" default="False"/>
<boolean name="isAuthorizedEarlyDeparture" default="False"/>
<decimal name="itp" precision="20" scale="2" />
<decimal name="nuissance" precision="20" scale="2" />
<integer name="allowance" precision="20" scale="2" /> <!-- Panier -->
@@ -45,7 +50,6 @@
<boolean name="isFerieDay" default="False"/>
<boolean name="isValidSupHours" default="False"/>
<boolean name="isAuthorizedAbsence" default="False"/>
<boolean name="isCalculated" default="False"/>
<boolean name="isTransfaire" title="Transfaire"/>
<boolean name="hasItp" title="Transfaire"/>
@@ -54,6 +58,8 @@
<boolean name="isWeekend" default="False"/>
<boolean name="isChanged" default="False"/>
<boolean name="isClosed" default="False"/>
<boolean name="breakNotInTheAllowedRange" default="False"/>
<!-- -->
<boolean name="deduceSupHours50" default="False"/>
@@ -74,6 +80,8 @@
<many-to-one name="absence" title="Absence" ref="com.axelor.apps.hr.db.Absence" mappedBy="dailyReport"/>
<many-to-one name="monthlyReport" title="Monthly Report" ref="com.axelor.apps.hr.db.MonthlyReport" mappedBy="dailyReports"/>
<many-to-many name="absenceSet" title="Absences" ref="com.axelor.apps.hr.db.Absence"/>
<unique-constraint columns="employee,reportDate"/>
<track>
<field name="enter1"/>
@@ -88,6 +96,7 @@
<field name="quit4"/>
<field name="quit5"/>
<field name="quit6"/>
<field name="shift"/>
<field name="isValidSupHours"/>
<field name="isAuthorizedAbsence"/>
<field name="deduceSupHours50"/>

View File

@@ -89,10 +89,14 @@
<boolean name="isEnrolled" title="Enrolled" readonly="true"/>
<date name="quitDate" title="Quit date"/>
<string name="registrationNumber" title="Registration Number"/>
<string name="jobTitleStr"/>
<many-to-one name="managerEmployee" ref="com.axelor.apps.hr.db.Employee" title="Manager" massUpdate="true"/>
<many-to-one name="initialShift" ref="com.axelor.apps.hr.db.Shift" title="Shift Initial" mappedBy="employee"/>
<one-to-many name="dailyReport" title="Daily Report" ref="com.axelor.apps.hr.db.DailyReport" mappedBy="employee"/>
<one-to-many name="offDaysWork" ref="com.axelor.apps.hr.db.OffDayWork" mappedBy="employee"/>
<many-to-one name="companyDepartment" ref="com.axelor.apps.base.db.CompanyDepartment" title="Company department" />
<many-to-one name="companySubDepartment" ref="com.axelor.apps.base.db.CompanyDepartment" title="Company Sup department" />
</entity>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://axelor.com/xml/ns/domain-models
https://axelor.com/xml/ns/domain-models/domain-models_6.0.xsd">
<module name="human-resource" package="com.axelor.apps.hr.db"/>
<entity name="EmployeeFingerPrint">
<many-to-many name="employee" ref="com.axelor.apps.hr.db.Employee"/>
<integer name="fingerId" min="0" max="9"/>
<string name="fingerPrint" title="Finger Print"/>
</entity>
</domain-models>

View File

@@ -55,6 +55,7 @@
public static final Integer STATUS_CANCELED = 5;
]]>
</extra-code>
<unique-constraint columns="ticketId"/>
</entity>

View File

@@ -12,14 +12,20 @@
<time name="endHour" title="End Hour"/>
<time name="enterMin" title="Minimum Entry Time"/>
<time name="enterMax" title="Maximum Entry Time"/>
<time name="maxTimeLateArrival" title="Max Time for Late Arrival"/>
<time name="maxTimeEarlyDeparture" title="Max Time for Early Departure"/>
<time name="startPause" title="Start Time for Break"/>
<time name="endPause" title="End Time for Break"/>
<one-to-many name="rapportJournalierList" ref="com.axelor.apps.hr.db.DailyReport " title="Rapports Journalier" mappedBy="shift"/>
<one-to-many name="dailyReportList" ref="com.axelor.apps.hr.db.DailyReport " title="Rapports Journalier" mappedBy="shift"/>
<one-to-many name="employee" ref="com.axelor.apps.hr.db.Employee" title="Employees" mappedBy="initialShift"/>
<track>
<field name="startHour"/>
<field name="endHour"/>
<field name="enterMin"/>
<field name="enterMax"/>
<field name="maxTimeLateArrival"/>
<field name="maxTimeEarlyDeparture"/>
</track>
</entity>
</domain-models>

View File

@@ -949,3 +949,4 @@
"value:Leave Management","Gestion des congés",,
"value:Timesheet Management","Feuilles de temps",,
"{{ ""HR manager"" }}",,,
"Absences","Absences",,
1 key message comment context
949 value:Leave Management Gestion des congés
950 value:Timesheet Management Feuilles de temps
951 {{ "HR manager" }}
952 Absences Absences

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<object-views xsi:schemaLocation="http://axelor.com/xml/ns/object-views http://axelor.com/xml/ns/object-views/object-views_5.2.xsd" xmlns="http://axelor.com/xml/ns/object-views" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<grid name="employee-finger-print-grid" title="Employee finger prints" model="com.axelor.apps.hr.db.EmployeeFingerPrint" edit-icon="true">
<field name="fingerId"/>
<field name="fingerPrint"/>
<field name="attrs"/>
<field name="importId"/>
<field name="importOrigin"/>
<field name="archived"/>
</grid>
<form name="employee-finger-print-form" title="Employee finger print" model="com.axelor.apps.hr.db.EmployeeFingerPrint">
<panel title="Overview">
<field name="fingerId"/>
<field name="fingerPrint"/>
<field name="attrs"/>
<field name="importId"/>
<field name="importOrigin"/>
<field name="archived"/>
</panel>
<panel-related field="employee" target="com.axelor.apps.hr.db.Employee">
<field name="name"/>
</panel-related>
</form>
</object-views>

View File

@@ -197,4 +197,50 @@
<option value="2">Only missing</option>
</selection>
<selection name="hr.type.absence.selection">
<option value="0">Absence autorisé payée</option>
<option value="1">Absence congé récupération</option>
<option value="2">Absence allaitement</option>
<option value="3">Absence formation</option>
<option value="4">Absence mission</option>
<option value="5">Absence hospitalisation</option>
<option value="6">Absence maladie</option>
<option value="7">Accident de travail</option>
<option value="8">Maternité</option>
<option value="9">Absence autorisée non payée</option>
<option value="10">Absence conge annuel</option>
<option value="11">Absence conge sans solde</option>
<option value="12">Absence conge statutaire</option>
<option value="13">Absence démission</option>
<option value="14">Absence fin de contrat</option>
<option value="15">Absence justifieé</option>
<option value="16">Absence recrutement</option>
<option value="17">Suspension</option>
<option value="18">Absence Service militaire</option>
<option value="19">Absence irrégulière</option>
<option value="20">Retard irrégulier</option>
<option value="21">Départ irrégulier</option>
</selection>
<selection name="hr.period.absence.selection">
<option value="0">Partial Day</option>
<option value="1">Full Day</option>
<option value="2">Multiple Days</option>
</selection>
<selection name="hr.type.absence.authorization.selection">
<option value="0">Exit Authorization</option>
<option value="1">Entry Authorization</option>
<option value="2">Absence Authorization</option>
<option value="3">Salary Absence Authorization</option>
</selection>
<selection name="hr.type.shift.selection">
<option value="0">Shift 0</option>
<option value="1">Shift 1</option>
<option value="2">Shift 2</option>
<option value="3">Shift 3</option>
</selection>
</object-views>