Skip to content

[19.0][FIX] payroll: test_get_contracts_multiple fails on the last day of the month - #321

Open
parabol123654 wants to merge 1 commit into
OCA:19.0from
parabol123654:19.0-fix-payroll-month-end-test
Open

parabol123654 wants to merge 1 commit into
OCA:19.0from
parabol123654:19.0-fix-payroll-month-end-test

Conversation

@parabol123654

@parabol123654 parabol123654 commented Oct 31, 2026 •

Copy link
Copy Markdown

TestPayslipFlow.test_get_contracts_multiple fails when the tests run on the last day of a month (e.g. today, 2026-10-31):

AssertionError: 2 != 3 : There are 3 open contracts in the payslips

The test ends Sally's first contract today and starts her second contract tomorrow, expecting both in the payslips of the current month. On the last day of a month, tomorrow is in the next month, so the second contract is out of the payslip period.

The change keeps the same scenario (two sequential contracts within the current month) with fixed days: first contract from the 1st to the 15th, second from the 16th. Test only.

Locally (with demo data): payroll 1 failure out of 27 today without the change, 27/27 with it.

Assisted-by: Claude Opus 5.5

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @appstogrow, @nimarosa,
some modules you are maintaining are being modified, check this out!

The second contract started tomorrow, which is in the next month on the
last day of a month, so only 2 contracts were found for the payslips of
the current month. Put both contracts in the middle of the month.

Assisted-by: Claude Opus 5.5
@parabol123654
parabol123654 force-pushed the 19.0-fix-payroll-month-end-test branch from 1bb427e to 4029efd Compare November 14, 2026 18:04
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.

3 participants