Compare commits
50 Commits
49e7b97e09
...
552518cfe1
| Author | SHA1 | Date |
|---|---|---|
|
|
552518cfe1 | |
|
|
6dbb39ae69 | |
|
|
d2c91f20dd | |
|
|
bc3fe02f96 | |
|
|
c3bfc9f84d | |
|
|
c4c921f3a3 | |
|
|
206e9d6c3b | |
|
|
16fcd6efb1 | |
|
|
b419913fe1 | |
|
|
fbc29e4ef1 | |
|
|
912ffc4afc | |
|
|
5c061a1bf1 | |
|
|
bfd79d42b8 | |
|
|
6fb1047ea8 | |
|
|
42a55eba7d | |
|
|
41e1d5c76b | |
|
|
0811863d41 | |
|
|
ce42a4c1e3 | |
|
|
627b4fa799 | |
|
|
0ee3943892 | |
|
|
9be4174309 | |
|
|
9b565b6746 | |
|
|
011d75baf1 | |
|
|
1c6cd50ea9 | |
|
|
6cedda73ca | |
|
|
653af0702d | |
|
|
a8c161d969 | |
|
|
6ac7199b55 | |
|
|
7e5e49af9f | |
|
|
db49307dad | |
|
|
51f19eea91 | |
|
|
177f4c4161 | |
|
|
4ec6c1a33b | |
|
|
aacf24880f | |
|
|
88848197ee | |
|
|
6dd301e365 | |
|
|
f98af9f9ee | |
|
|
b669ac988b | |
|
|
bb31c591fb | |
|
|
5c37d6895e | |
|
|
689d999c37 | |
|
|
3a80c6cd8c | |
|
|
2600cc713d | |
|
|
fce43c3721 | |
|
|
d3049e1368 | |
|
|
dce09293c5 | |
|
|
5eb39bf12b | |
|
|
2bd85ae939 | |
|
|
c1b7d5f07f | |
|
|
e28c02a469 |
|
|
@ -309,7 +309,7 @@ attendanceLines.forEach(line => {
|
||||||
const dateStr = createDate.toLocaleDateString('en-IN', { timeZone: 'Asia/Kolkata' });
|
const dateStr = createDate.toLocaleDateString('en-IN', { timeZone: 'Asia/Kolkata' });
|
||||||
|
|
||||||
const workedHours = parseFloat(line.worked_hours);
|
const workedHours = parseFloat(line.worked_hours);
|
||||||
|
const working_hours = ''
|
||||||
const checkIn = new Date(line.check_in + 'Z');
|
const checkIn = new Date(line.check_in + 'Z');
|
||||||
const checkOut = new Date(line.check_out + 'Z');
|
const checkOut = new Date(line.check_out + 'Z');
|
||||||
|
|
||||||
|
|
@ -320,6 +320,7 @@ attendanceLines.forEach(line => {
|
||||||
groupedLines[dateStr] = {
|
groupedLines[dateStr] = {
|
||||||
create_date: dateStr,
|
create_date: dateStr,
|
||||||
worked_hours: workedHours,
|
worked_hours: workedHours,
|
||||||
|
working_hours: `${Math.floor(workedHours)}h ${Math.round((workedHours - Math.floor(workedHours)) * 60)}m`,
|
||||||
check_in: checkInStr,
|
check_in: checkInStr,
|
||||||
check_out: checkOutStr,
|
check_out: checkOutStr,
|
||||||
earliestCheckIn: checkIn,
|
earliestCheckIn: checkIn,
|
||||||
|
|
@ -346,6 +347,7 @@ attendanceLines.forEach(line => {
|
||||||
const groupedAttendance = Object.values(groupedLines).map(line => ({
|
const groupedAttendance = Object.values(groupedLines).map(line => ({
|
||||||
create_date: line.create_date,
|
create_date: line.create_date,
|
||||||
worked_hours: line.worked_hours.toFixed(2),
|
worked_hours: line.worked_hours.toFixed(2),
|
||||||
|
working_hours :line.working_hours,
|
||||||
check_in: line.check_in,
|
check_in: line.check_in,
|
||||||
check_out: line.check_out
|
check_out: line.check_out
|
||||||
}));
|
}));
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td t-esc="line['check_out']">
|
<td t-esc="line['check_out']">
|
||||||
</td>
|
</td>
|
||||||
<td t-esc="line['worked_hours']">
|
<td t-esc="line['working_hours']">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,12 @@
|
||||||
'version': '0.1',
|
'version': '0.1',
|
||||||
|
|
||||||
# any module necessary for this one to work correctly
|
# any module necessary for this one to work correctly
|
||||||
|
|
||||||
'depends': ['base','hr','account','mail','hr_skills', 'hr_contract'],
|
'depends': ['base','hr','account','mail','hr_skills', 'hr_contract'],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# always loaded
|
# always loaded
|
||||||
'data': [
|
'data': [
|
||||||
'security/security.xml',
|
'security/security.xml',
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,10 @@ import pytz
|
||||||
|
|
||||||
from collections import defaultdict, Counter
|
from collections import defaultdict, Counter
|
||||||
from datetime import date, datetime, time
|
from datetime import date, datetime, time
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
from odoo import api, Command, fields, models, _
|
from odoo import api, Command, fields, models, _
|
||||||
from odoo.exceptions import UserError, ValidationError
|
from odoo.exceptions import UserError, ValidationError
|
||||||
from odoo.tools import float_round, date_utils, convert_file, format_amount
|
from odoo.tools import float_round, date_utils, convert_file, format_amount
|
||||||
|
|
@ -1378,6 +1379,29 @@ class HrPayslip(models.Model):
|
||||||
for file_to_update in files_to_update:
|
for file_to_update in files_to_update:
|
||||||
convert_file(self.env, module_name, file_to_update, idref)
|
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):
|
def action_edit_payslip_lines(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
if not self.env.user.has_group('hr_payroll.group_hr_payroll_manager'):
|
if not self.env.user.has_group('hr_payroll.group_hr_payroll_manager'):
|
||||||
|
|
|
||||||
|
|
@ -256,6 +256,8 @@ class HRJobRecruitment(models.Model):
|
||||||
rec.submission_status = 'zero'
|
rec.submission_status = 'zero'
|
||||||
|
|
||||||
|
|
||||||
|
experience = fields.Many2one('candidate.experience', string="Experience")
|
||||||
|
|
||||||
@api.depends('application_ids.submitted_to_client')
|
@api.depends('application_ids.submitted_to_client')
|
||||||
def _compute_no_of_submissions(self):
|
def _compute_no_of_submissions(self):
|
||||||
counts = dict(self.env['hr.applicant']._read_group(
|
counts = dict(self.env['hr.applicant']._read_group(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue