Skip to content

[19.0][IMP] payroll: prepare retained refund evidence before confirmation - #332

Open
votrelec wants to merge 1 commit into
OCA:19.0from
votrelec:fix/19-native-refund-copy
Open

votrelec wants to merge 1 commit into
OCA:19.0from
votrelec:fix/19-native-refund-copy

Conversation

@votrelec

Copy link
Copy Markdown

An installed localization can keep statutory calculation evidence in copy=False fields. The native full-refund workflow copies the salary lines and immediately confirms the copy without recomputing it. There is currently no narrow extension point to attach the original retained evidence before confirmation validates that copy.

Extract the existing copy operation into _copy_refund_payslip(). Localizations can extend it cooperatively to attach their retained evidence reference. The default copy values, numbering, confirmation and original-to-refund link keep their existing behavior. This does not add a country-specific policy to the payroll engine.

Validation: all 28 native payroll tests pass, including a new workflow regression that extends the hook, checks that preparation occurs before confirmation, changes the current contract wage and verifies that the confirmed refund retains the original salary amounts. Ruff check and format pass for the changed Python files.

…mation

Expose the copy step as an extension hook so localizations can reference original copy=False calculation evidence before native without-compute confirmation. The default refund copy, salary amounts and confirmation workflow remain the same.

Assisted-by: OpenAI Codex
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

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.

2 participants