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

@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

@Yusuke1998 Yusuke1998 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stferraro
stferraro force-pushed the 19.0-mig-payroll_account branch 3 times, most recently from 5775721 to 777b281 Compare August 14, 2026 21:44
@nimarosa

Copy link
Copy Markdown
Contributor

/ocabot rebase

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@nimarosa The rebase process failed, because command git push --force Jenrax-git tmp-pr-269:19.0-mig-payroll_account failed with output:

remote: Permission to Jenrax-git/payroll.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/Jenrax-git/payroll/': The requested URL returned error: 403

@nimarosa

Copy link
Copy Markdown
Contributor

@stferraro please rebase to see if it has no conflicts since it's a old PR. I can't do it automatically because you disabled access to your branch.

If everything pass again i merge it.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Saran440 and others added 14 commits August 17, 2026 02:19
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/
weblate and others added 26 commits August 17, 2026 02:19
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 force-pushed the 19.0-mig-payroll_account branch from 777b281 to 73fc9d3 Compare August 17, 2026 06:26
@stferraro

Copy link
Copy Markdown
Author

@nimarosa the rebase went through clean (no conflicts) and all checks are green now — pre-commit, tests on Odoo and OCB, codecov, and runboat all passed. Ready for you to merge whenever you get a chance. Thanks!

@Karla-Villegas Karla-Villegas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@stferraro

Copy link
Copy Markdown
Author

Hi @nimarosa , please merge this module to merge !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.