FIX l10n_us_hr_payroll_account Cannot create journal with optional field from hr_payroll_payment

This commit is contained in:
Jared Kipe
2020-02-05 14:07:18 -08:00
parent 87a8104add
commit b3375621bd

View File

@@ -68,8 +68,9 @@ class AccountChartTemplate(models.Model):
'company_id': company.id,
'default_credit_account_id': accounts[SALARY_EXPENSES].id,
'default_debit_account_id': accounts[SALARY_EXPENSES].id,
'payroll_entry_type': 'grouped',
})
if hasattr(journal, 'payroll_entry_type'):
journal.payroll_entry_type = 'grouped'
self.env['ir.property'].create([{
'name': 'structure_journal_id',