Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][IMP] payroll: salary rule code: payslip.line_sum_where() #117

Merged
merged 2 commits into from Feb 10, 2023
Merged

[14.0][IMP] payroll: salary rule code: payslip.line_sum_where() #117

merged 2 commits into from Feb 10, 2023

Conversation

norlinhenrik
Copy link
Contributor

payslip.line_sum_where() may be used in salary rule code.
It will sum the total of the previously computed rules where the given field has the given value.
total_seq_10 = payslip.line_sum_where("sequence", 10, rules, result_rules)

I have also improved the salary rule help text a little bit.

@OCA-git-bot
Copy link
Contributor

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

@nimarosa
Copy link
Contributor

@norlinhenrik I deleted my previous comment since i misunderstood the functionality. To be clear, this sum only the rules in the "current" payslip, not previously computed rules from another payslips. I'm right?

@norlinhenrik
Copy link
Contributor Author

Yes, it sums only computed rules for the "current" payslip.

@nimarosa
Copy link
Contributor

nimarosa commented Jan 24, 2023

@norlinhenrik
Okay great for me. We add it.

If you can make some test of the new method so we maintain compatibility in future versiones will be great.

After that, we merge.

@nimarosa nimarosa added this to the 14.0 milestone Jan 24, 2023
@norlinhenrik
Copy link
Contributor Author

@nimarosa
I have made a test now for payslip.line_sum_where().
I also changed so that localhost will get values by rule.id if rule.code does not exist. The tests are passing. :)

@nimarosa
Copy link
Contributor

/ocabot rebase

@OCA-git-bot
Copy link
Contributor

Congratulations, PR rebased to 14.0.

@nimarosa
Copy link
Contributor

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 14.0-ocabot-merge-pr-117-by-nimarosa-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 46dad54 into OCA:14.0 Feb 10, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 7e478e7. Thanks a lot for contributing to OCA. ❤️

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.

3 participants