Compare commits

..

48 Commits

Author SHA1 Message Date
administrator 49e7b97e09 Initial commit 2025-06-03 17:19:19 +05:30
administrator d22519d53c Initial commit 2025-06-03 17:19:19 +05:30
administrator 7667090b96 Initial commit 2025-06-03 17:19:19 +05:30
administrator 14bb2bc740 Initial commit 2025-06-03 17:19:19 +05:30
administrator 9954df1063 Initial commit 2025-06-03 17:19:19 +05:30
administrator 229947f7e7 Initial commit 2025-06-03 17:19:19 +05:30
administrator e61817542b Initial commit 2025-06-03 17:19:19 +05:30
administrator a1e38df43f Initial commit 2025-06-03 17:19:19 +05:30
administrator fafe56f11e Initial commit 2025-06-03 17:19:19 +05:30
administrator e99290e923 Initial commit 2025-06-03 17:19:19 +05:30
administrator 0b094d5d91 Initial commit 2025-06-03 17:19:19 +05:30
administrator bebdf67b85 Initial commit 2025-06-03 17:19:19 +05:30
administrator b31e1ca05d Initial commit 2025-06-03 17:19:19 +05:30
administrator f4c7dbca2f Initial commit 2025-06-03 17:19:19 +05:30
administrator 40cf14cfed Initial commit 2025-06-03 17:19:19 +05:30
administrator d3cb63931f Initial commit 2025-06-03 17:19:19 +05:30
administrator b5c0db13b3 Initial commit 2025-06-03 17:19:19 +05:30
administrator 5665434c06 Initial commit 2025-06-03 17:19:19 +05:30
administrator 9d2ccd7bf6 Initial commit 2025-06-03 17:19:19 +05:30
administrator 69ff3fc472 Initial commit 2025-06-03 17:19:18 +05:30
administrator cc099dcf65 Initial commit 2025-06-03 17:19:18 +05:30
administrator 12906c27b7 pull commit 2025-06-03 17:19:18 +05:30
administrator 18587884d3 Initial commit 2025-06-03 17:19:18 +05:30
Pranay 215efe83b0 TimeOff Fix 2025-06-03 17:19:18 +05:30
Pranay 7975c10a8d time-off FIX 2025-06-03 17:19:18 +05:30
Pranay 4cbb45bb35 Recruitment Changes 2025-06-03 17:19:18 +05:30
Pranay 5f1279027f fix whatsapp 2025-06-03 17:19:18 +05:30
Pranay a2fa677510 update whatsapp code 2025-06-03 17:19:18 +05:30
administrator 72b993938f Initial commit 2025-06-03 17:19:18 +05:30
administrator 5ab7206139 Initial commit 2025-06-03 17:19:18 +05:30
administrator a1dd936e92 Initial commit 2025-06-03 17:19:18 +05:30
administrator dc5884b49b Initial commit 2025-06-03 17:19:18 +05:30
administrator 1c34616fe2 Initial commit 2025-06-03 17:19:18 +05:30
administrator 52c2084ca5 Initial commit 2025-06-03 17:19:18 +05:30
administrator f8ec754f23 Initial commit 2025-06-03 17:19:18 +05:30
administrator e123ee062a Initial commit 2025-06-03 17:19:18 +05:30
administrator c138aa19bd Initial commit 2025-06-03 17:19:18 +05:30
administrator 811d7b01e1 Initial commit 2025-06-03 17:19:18 +05:30
administrator 7c8779c01f Initial commit 2025-06-03 17:19:18 +05:30
administrator 3730ea8e2f Initial commit 2025-06-03 17:19:18 +05:30
administrator ee9434a224 Initial commit 2025-06-03 17:19:18 +05:30
administrator 20a006b714 Initial commit 2025-06-03 17:19:17 +05:30
administrator cf45af32e9 Initial commit 2025-06-03 17:19:17 +05:30
administrator a58d0fa863 Initial commit 2025-06-03 17:19:17 +05:30
administrator 1933ea8195 Initial commit 2025-06-03 17:19:17 +05:30
administrator 25d9b0b464 Initial commit 2025-06-03 17:19:17 +05:30
administrator 69b502124f Initial commit 2025-06-03 17:19:17 +05:30
administrator a6c3bbc3bc Initial commit 2025-06-03 17:19:17 +05:30
3 changed files with 3 additions and 29 deletions

View File

@ -309,7 +309,7 @@ attendanceLines.forEach(line => {
const dateStr = createDate.toLocaleDateString('en-IN', { timeZone: 'Asia/Kolkata' });
const workedHours = parseFloat(line.worked_hours);
const working_hours = ''
const checkIn = new Date(line.check_in + 'Z');
const checkOut = new Date(line.check_out + 'Z');
@ -320,7 +320,6 @@ attendanceLines.forEach(line => {
groupedLines[dateStr] = {
create_date: dateStr,
worked_hours: workedHours,
working_hours: `${Math.floor(workedHours)}h ${Math.round((workedHours - Math.floor(workedHours)) * 60)}m`,
check_in: checkInStr,
check_out: checkOutStr,
earliestCheckIn: checkIn,
@ -347,7 +346,6 @@ attendanceLines.forEach(line => {
const groupedAttendance = Object.values(groupedLines).map(line => ({
create_date: line.create_date,
worked_hours: line.worked_hours.toFixed(2),
working_hours :line.working_hours,
check_in: line.check_in,
check_out: line.check_out
}));

View File

@ -219,7 +219,7 @@
</td>
<td t-esc="line['check_out']">
</td>
<td t-esc="line['working_hours']">
<td t-esc="line['worked_hours']">
</td>
</tr>
</tbody>

View File

@ -7,10 +7,9 @@ import pytz
from collections import defaultdict, Counter
from datetime import date, datetime, time
from datetime import timedelta
from dateutil.relativedelta import relativedelta
from functools import reduce
from odoo import api, Command, fields, models, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools import float_round, date_utils, convert_file, format_amount
@ -1379,29 +1378,6 @@ class HrPayslip(models.Model):
for file_to_update in files_to_update:
convert_file(self.env, module_name, file_to_update, idref)
def days_count(self):
joining_date = self.contract_id.date_start
date_from = min(joining_date, self.date_from)
if joining_date > date_from:
# Define weekend days (Saturday and Sunday)
weekend_days = [5, 6] # 5 = Saturday, 6 = Sunday
# Count weekends between date_from and date_to
weekend_count = 0
current_date = date_from
while current_date <= joining_date:
if current_date.weekday() in weekend_days:
weekend_count += 1
current_date += timedelta(days=1)
# Output: number of weekly offs since joining
weekend_days_count = weekend_count
else:
weekend_days_count = 0
return weekend_days_count
def action_edit_payslip_lines(self):
self.ensure_one()
if not self.env.user.has_group('hr_payroll.group_hr_payroll_manager'):