Daily updates from Odoo
Wednesday, November 14, 2018
2 changes · master
Resolved issues and error corrections
This update corrects web module tests that no longer matched recent product behavior, ensuring they continue to check meaningful scenarios. It also removes outdated test setup code that is no longer needed, helping keep future quality checks cleaner and more reliable.
Original PR description
This commit fixes two tests that became meaningless after tweaks in production code: - form_tests: use two char fields, as integer fields can't be unset since rev. c62a4edcb - pivot_tests: the button is disabled since rev. 4f4f111, but simulating a click with jQuery bypasses the disabled attribute This commit also removes unecessary overrides of mockRPC. Those overrides existed because the attachments part of the sidebar used to make a search_read RPC, but this has been removed at rev. 1dbb555. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Payroll calculations now support multiple workday or input lines with the same code, such as several holidays of the same type in one payslip period. This prevents payroll from silently counting only one entry and helps businesses produce more accurate payslips when payroll rules are updated accordingly.
Original PR description
Before this commit, inputs (workdays or inputs) could conform two lines having the same code (Example: two holidays of the same type in the payslip period) This commit returns recordsets, where…
Before this commit, inputs (workdays or inputs) could conform two lines having
the same code (Example: two holidays of the same type in the payslip period)
This commit returns recordsets, where previously singletons were returned.
This requires migration of python code hr rules as they need to implement
`mapped` where previously accessing values directly:
Eg.: sum(RecordSet.mapped('amount'))
However, this migration is only necesary for rules that would have required this
fix anyhow.
**Description of the issue/feature this PR addresses:**
- Calculation errors when dealing with multiple inputs sharing the same code
- This case occurs for example: If holidays of same type are taken multiple occasions during the payslip period.
**Current behavior before PR:**
- Only the first such line is taken into account
Desired behavior after PR is merged:
- A python rule, using `mapped` can be construed to fetch the sum of all lines
- This calculation error can be solved thereby.
**Note:** Please do not close, even if not immediately accepted (`wishlist` tag). This PR is meant to be carried along and actively maintained, until this semantic will be completed this way or another.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@xoe-labs