Skip to content

[19.0] [MIG] payroll_account: Migration to 19.0#269

Open
stferraro wants to merge 69 commits into
OCA:19.0from
Jenrax-git:19.0-mig-payroll_account
Open

[19.0] [MIG] payroll_account: Migration to 19.0#269
stferraro wants to merge 69 commits into
OCA:19.0from
Jenrax-git:19.0-mig-payroll_account

Conversation

@stferraro

Copy link
Copy Markdown

Saran440 and others added 30 commits May 19, 2026 11:41
Currently translated at 100.0% (24 of 24 strings)

Translation: payroll-14.0/payroll-14.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-14-0/payroll-14-0-payroll_account/ca/
Currently translated at 16.6% (4 of 24 strings)

Translation: payroll-14.0/payroll-14.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-14-0/payroll-14-0-payroll_account/es_AR/
Currently translated at 100.0% (24 of 24 strings)

Translation: payroll-14.0/payroll-14.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-14-0/payroll-14-0-payroll_account/es_AR/
Currently translated at 100.0% (24 of 24 strings)

Translation: payroll-14.0/payroll-14.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-14-0/payroll-14-0-payroll_account/es/
…or the payslip

Until now this module tried to confirm an empty account move. This caused
the account module to throw an exception. This causes problems in
other modules that may not know about payroll_account. For example
in other modules' tests.
Currently translated at 100.0% (24 of 24 strings)

Translation: payroll-14.0/payroll-14.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-14-0/payroll-14-0-payroll_account/es_AR/
Currently translated at 100.0% (24 of 24 strings)

Translation: payroll-14.0/payroll-14.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-14-0/payroll-14-0-payroll_account/es/
…cumentation

[14.0] [IMP] payroll: improve salary rules views and documentation

[14.0] [IMP] payroll: improve salary rules  and categories views

[14.0] [IMP] payroll: improve salary rules views and documentation

[14.0] [IMP] payroll: improve salary rules views and documentation

[IMP] payroll: fix repeated words

[14.0] [IMP] payroll: fix typos
[14.0] [IMP] payroll: change manifest category

[14.0] [IMP] payroll: add migration for new payslip and payslips objects

[14.0] [IMP] payroll: add migration for new payslip and payslips objects

[14.0] [IMP] payroll: add migration for new payslip and payslips objects
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/
Currently translated at 100.0% (21 of 21 strings)

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/fa/
Currently translated at 80.9% (17 of 21 strings)

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/it/
weblate and others added 25 commits May 19, 2026 11:41
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/
Currently translated at 100.0% (22 of 22 strings)

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/pt_BR/
Currently translated at 100.0% (22 of 22 strings)

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/it/
Currently translated at 100.0% (22 of 22 strings)

Translation: payroll-16.0/payroll-16.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-payroll_account/pt/
Currently translated at 100.0% (22 of 22 strings)

Translation: payroll-18.0/payroll-18.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-18-0/payroll-18-0-payroll_account/es_VE/
Currently translated at 100.0% (22 of 22 strings)

Translation: payroll-18.0/payroll-18.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-18-0/payroll-18-0-payroll_account/es/
Currently translated at 100.0% (22 of 22 strings)

Translation: payroll-18.0/payroll-18.0-payroll_account
Translate-URL: https://translation.odoo-community.org/projects/payroll-18-0/payroll-18-0-payroll_account/tr/
In Odoo 17.0+, the address_home_id field was removed from hr.employee
and replaced with work_contact_id. This caused journal entries to be
created without proper partner information when no register partner
was configured.

This fix implements proper partner resolution logic:
- For asset_receivable and liability_current accounts: Use employee
  partner (work_contact_id with fallback to bank_account_id.partner_id)
- For liability_payable accounts: Use register partner
- For other account types: No partner assigned

Also includes proper null checks to prevent AttributeError when
accessing .id on empty Many2one fields.

Added minimal test coverage for the new partner logic to verify
correct partner assignment for different account types.

Fixes OCA#221
@stferraro stferraro mentioned this pull request May 19, 2026
2 tasks
@stferraro stferraro force-pushed the 19.0-mig-payroll_account branch from 4394c4f to a1d3d98 Compare May 19, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.