mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[MIG] l10n_us_hr_payroll_account: to Odoo Enterprise 14.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
'name': 'United States of America - Payroll with Accounting',
|
'name': 'United States of America - Payroll with Accounting',
|
||||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
'version': '13.0.2019.0.0',
|
'version': '14.0.2020.0.0',
|
||||||
'category': 'Human Resources',
|
'category': 'Human Resources',
|
||||||
'depends': [
|
'depends': [
|
||||||
'l10n_us_hr_payroll',
|
'l10n_us_hr_payroll',
|
||||||
|
|||||||
@@ -69,10 +69,8 @@ class AccountChartTemplate(models.Model):
|
|||||||
('company_id', '=', company.id),
|
('company_id', '=', company.id),
|
||||||
])
|
])
|
||||||
if journal:
|
if journal:
|
||||||
if not journal.default_credit_account_id:
|
if not journal.default_account_id:
|
||||||
journal.default_credit_account_id = accounts[SALARY_EXPENSES].id
|
journal.default_account_id = accounts[SALARY_EXPENSES].id
|
||||||
if not journal.default_debit_account_id:
|
|
||||||
journal.default_debit_account_id = accounts[SALARY_EXPENSES].id
|
|
||||||
if hasattr(journal, 'payroll_entry_type'):
|
if hasattr(journal, 'payroll_entry_type'):
|
||||||
journal.payroll_entry_type = 'grouped'
|
journal.payroll_entry_type = 'grouped'
|
||||||
else:
|
else:
|
||||||
@@ -81,19 +79,16 @@ class AccountChartTemplate(models.Model):
|
|||||||
'code': 'PAYR',
|
'code': 'PAYR',
|
||||||
'type': 'general',
|
'type': 'general',
|
||||||
'company_id': company.id,
|
'company_id': company.id,
|
||||||
'default_credit_account_id': accounts[SALARY_EXPENSES].id,
|
'default_account_id': accounts[SALARY_EXPENSES].id,
|
||||||
'default_debit_account_id': accounts[SALARY_EXPENSES].id,
|
|
||||||
})
|
})
|
||||||
if hasattr(journal, 'payroll_entry_type'):
|
if hasattr(journal, 'payroll_entry_type'):
|
||||||
journal.payroll_entry_type = 'grouped'
|
journal.payroll_entry_type = 'grouped'
|
||||||
|
|
||||||
self.env['ir.property'].create([{
|
self.env['ir.property']._set_multi(
|
||||||
'name': 'structure_journal_id',
|
"journal_id",
|
||||||
'company_id': company.id,
|
"hr.payroll.structure",
|
||||||
'fields_id': journal_field_id.id,
|
{structure.id: journal for structure in us_structures},
|
||||||
'value_reference': 'account.journal,%s' % journal.id,
|
)
|
||||||
'res_id': 'hr.payroll.structure,%s' % structure.id,
|
|
||||||
} for structure in us_structures])
|
|
||||||
|
|
||||||
# Find rules and set accounts on them.
|
# Find rules and set accounts on them.
|
||||||
# Find all rules that are ...
|
# Find all rules that are ...
|
||||||
|
|||||||
Reference in New Issue
Block a user