Daily updates from Odoo
Saturday, May 4, 2024
7 changes · master
Code cleanup and technical improvements
This update reorganizes internal code used by Odoo's financial reporting screens, making it simpler and easier to maintain. There is no expected change for end users, but it should help future development be safer and more efficient.
Original PR description
2 commits trying their best to make the code a little bit more sexy (but sexy is subjective :( )
Miscellaneous changes
Versions -------- - 15.0+ Issue ----- `precision_rounding` values were being passed incorrectly as `precision_digits` parameters. Solution -------- Pass them as named `precision_rounding` parameters instead. Community branch: https://github.com/odoo/odoo/pull/162977 Forward-Port-Of: odoo/enterprise#62003 Forward-Port-Of: odoo/enterprise#61311
Original PR description
Versions -------- - 15.0+ Issue ----- `precision_rounding` values were being passed incorrectly as `precision_digits` parameters. Solution -------- Pass them as named `precision_rounding` parameters instead. Community branch: https://github.com/odoo/odoo/pull/162977 Forward-Port-Of: odoo/enterprise#62003 Forward-Port-Of: odoo/enterprise#61311
Remove unwanted matches of POS orders that have already been invoiced Also, speed improves if max of orders is invoiced. taskid: 3906396 Forward-Port-Of: odoo/enterprise#61865
Original PR description
Remove unwanted matches of POS orders that have already been invoiced Also, speed improves if max of orders is invoiced. taskid: 3906396 Forward-Port-Of: odoo/enterprise#61865
Changed service product UOM code from `UNT` to `NA` in the HSN JSON file for GSTR-1 reporting. Task ID: 3907971 Forward-Port-Of: odoo/enterprise#61914
Original PR description
Changed service product UOM code from `UNT` to `NA` in the HSN JSON file for GSTR-1 reporting. Task ID: 3907971 Forward-Port-Of: odoo/enterprise#61914
**Current behavior:** On a payslip, creating multiple lines with the same rule code will result in a misreport with duplicate pay records. **Expected behavior:** Payroll reporting should accurately reflect reality. **Steps to reproduce:** 1. Create a new salary rule (e.g., Commission) and set its 'code' field to 'COMMISSION' and tick the option `View on Payroll Reporting` 2. Set its 'Condition Based on' to 'Python Expression' and enter `result = (inputs.get("COMMIS
Original PR description
**Current behavior:** On a payslip, creating multiple lines with the same rule code will result in a misreport with duplicate pay records. **Expected behavior:** Payroll reporting should accurately…
**Current behavior:**
On a payslip, creating multiple lines with the same rule code
will result in a misreport with duplicate pay records.
**Expected behavior:**
Payroll reporting should accurately reflect reality.
**Steps to reproduce:**
1. Create a new salary rule (e.g., Commission) and set its
'code' field to 'COMMISSION' and tick the option
`View on Payroll Reporting`
2. Set its 'Condition Based on' to 'Python Expression' and enter
`result = (inputs.get("COMMISSION") or 0)`
3. Set its 'Computation' to 'Python code' and enter
`result = (inputs.get("COMMISSION") or 0).amount`
`result_name = (inputs.get("COMMISSION") or 0).name`
4. Create a `hr.payslip.input.type` (other input type) record
to permit the newly created salary rule to appear on a
payslip (e.g., Country of current company and 'Regular Pay'
for 'Availability in Structure' and 'code' = 'COMMISSION'
5. Create a payslip record (To Pay) for some employee, selecting
the structure that permits the newly created rule to be
applied (e.g., 'Regular Pay') (Note the pay period)
6. In the 'Other Inputs' table add two lines both set to the
'COMMISSION' code -> Compute Sheet -> Create Draft Entry
7. Go to the Reporting -> Payroll -> Pivot View, collapse the
y-axis; Expand y-axis -> Employee -> Employee from payslip
-> Add Custom Group -> End Date; Observe multiple entries
pay period defined when creating the payslip
**Cause of the issue:**
In `hr.payroll.report` these rules will be grouped by their
'total' fields. When we have a repeated rule code with some
'total' amount, we will create two reports for the same
payslip.
**Fix:**
Use a SUM to aggregate these additional_rules in the SELECT and
remove them from the GROUP BY. We need another DISTINCT clause
to ensure we aren't summing redundant row values.
opw-3614679
Forward-Port-Of: odoo/enterprise#60814Previously, HSN code warning in the GSTR-1 report was based solely on product detail type. This PR improves the validation process by refactoring it to consider product type. This enhancement ensures consistent warnings across all product types, including event tickets. Forward-Port-Of: odoo/enterprise#61768 Forward-Port-Of: odoo/enterprise#61739
Original PR description
Previously, HSN code warning in the GSTR-1 report was based solely on product detail type. This PR improves the validation process by refactoring it to consider product type. This enhancement ensures consistent warnings across all product types, including event tickets. Forward-Port-Of: odoo/enterprise#61768 Forward-Port-Of: odoo/enterprise#61739
Steps to reproduce: - Make a service product, with invoicing policy based on timesheet and project & task set for create on order. - Make an SO for that product - The SO will create the task and the project - Register timesheet linked with the task with 15 min - Start a timer - Create the invoice Issues: The timer is still running, with the only choice possible being to discard it. Solution: The behaviour wanted by the po is to stop all the timer and count them in the invoice. o
Original PR description
Steps to reproduce: - Make a service product, with invoicing policy based on timesheet and project & task set for create on order. - Make an SO for that product - The SO will create the task and the project - Register timesheet linked with the task with 15 min - Start a timer - Create the invoice Issues: The timer is still running, with the only choice possible being to discard it. Solution: The behaviour wanted by the po is to stop all the timer and count them in the invoice. opw-3715694 Forward-Port-Of: odoo/enterprise#61688 Forward-Port-Of: odoo/enterprise#61475