mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[ADD] hr_payroll_batch_error_skip: for Odoo 13.0
This commit is contained in:
1
hr_payroll_batch_error_skip/__init__.py
Executable file
1
hr_payroll_batch_error_skip/__init__.py
Executable file
@@ -0,0 +1 @@
|
|||||||
|
from . import wizard
|
||||||
17
hr_payroll_batch_error_skip/__manifest__.py
Executable file
17
hr_payroll_batch_error_skip/__manifest__.py
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
'name': 'Payroll Batch Work Entry Errork SKIP',
|
||||||
|
'description': 'This module bypasses a blocking error on payroll batch runs. '
|
||||||
|
'If your business does not depend on the stock functionality '
|
||||||
|
'(e.g. you use Timesheet and salary but not the stock work schedule '
|
||||||
|
'calculations), this will alleviate your blocking issues.',
|
||||||
|
'version': '13.0.1.0.0',
|
||||||
|
'website': 'https://hibou.io/',
|
||||||
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'category': 'Human Resources',
|
||||||
|
'data': [
|
||||||
|
],
|
||||||
|
'depends': [
|
||||||
|
'hr_payroll',
|
||||||
|
],
|
||||||
|
}
|
||||||
1
hr_payroll_batch_error_skip/wizard/__init__.py
Normal file
1
hr_payroll_batch_error_skip/wizard/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import hr_payroll_payslips_by_employees
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import logging
|
||||||
|
from odoo import models
|
||||||
|
from odoo.exceptions import UserError
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class HrPayslipEmployees(models.TransientModel):
|
||||||
|
_inherit = 'hr.payslip.employees'
|
||||||
|
|
||||||
|
def _check_undefined_slots(self, work_entries, payslip_run):
|
||||||
|
try:
|
||||||
|
super()._check_undefined_slots(work_entries, payslip_run)
|
||||||
|
except UserError as e:
|
||||||
|
_logger.info('Caught user error when checking for undefined slots: ' + str(e))
|
||||||
|
|
||||||
Reference in New Issue
Block a user