Files
enterprise-addons/l10n_us_hr_payroll_account/models/hr_payslip_run.py
T

20 lines
578 B
Python

from odoo import fields, models
class HrPayslipRun(models.Model):
_inherit = 'hr.payslip.run'
nacha_effective_date = fields.Date('The payment date of the NACHA file generated for this batch')
def action_payment_report(self, export_format='nacha'):
action = super().action_payment_report()
if self.company_id.country_code != 'US':
return action
action.update({
'context': {
**action['context'],
'default_export_format': export_format,
},
})
return action