mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] hr_payroll_attendance: for Odoo Enterprise 13.0
Move some concerns to other modules, refactor new API to make it possible to use timesheets and attendances together. Now possible to add attendances by hand or import via smart button and 'recompute' attendances.
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
# Part of Hibou Suite Professional. See LICENSE_PROFESSIONAL file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields
|
||||
from odoo import api, models, fields
|
||||
|
||||
|
||||
class HrContract(models.Model):
|
||||
_inherit = 'hr.contract'
|
||||
|
||||
paid_hourly_attendance = fields.Boolean(string="Paid Hourly Attendance")
|
||||
|
||||
@api.onchange('paid_hourly_attendance')
|
||||
def _onchange_paid_hourly_attendance(self):
|
||||
for contract in self:
|
||||
if contract.paid_hourly_attendance:
|
||||
# only allow switch, not automatic switch 'back'
|
||||
self.wage_type = 'hourly'
|
||||
|
||||
Reference in New Issue
Block a user