Daily updates from Odoo
Wednesday, February 7, 2024
2 changes
Resolved issues and error corrections
This fix resolves an issue where creating salary rules in one company would cause salary rules from other companies to disappear from payroll reports, resulting in database errors. The system now properly preserves all company salary rules when generating payroll reports, ensuring multi-company setups work correctly.
Original PR description
### Steps to reproduce - Install **Payroll** app - Create two companies each belonging to different countries, for example: - Company A in US - Company B in AE - In **Company A**, create a salary…
### Steps to reproduce - Install **Payroll** app - Create two companies each belonging to different countries, for example: - Company A in US - Company B in AE - In **Company A**, create a salary structure with a salary rule that belong to Company A -US- - Using **Company A**, In the payroll app, Go to > **Reporting** > **Payroll** and click on the **MEASURES** dropdown button, U can see the newly created salary rule. Try clicking on it. Everything works fine. - Now switch to **Company B**, create a salary structure with a salary rule that belong to **Company B** -AE- - Using **Company B**, In the payroll app, Go to > **Reporting** > **Payroll** and click on the MEASURES dropdown button, U can see the newly created salary rule. Try clicking on it. a DB error occurs. ### Investigation - When we create a new salary rule, we `_generate_payroll_report_fields()` https://github.com/odoo/enterprise/blob/b9adb690d7fd38c66a787377967a856b9678ffd1/hr_payroll/models/hr_salary_rule.py#L195 - Which `init()` the payroll report, creating a new DB view. However only the current company rules are fetched removing the other companies rules from the view as the old one is dropped https://github.com/odoo/enterprise/blob/b9adb690d7fd38c66a787377967a856b9678ffd1/hr_payroll/report/hr_payroll_report.py#L145 ### Discuss I think a better approach would be to construct a new view each time you open the payroll report, meaning to `init()` the report each time we go into https://github.com/odoo/enterprise/blob/b9adb690d7fd38c66a787377967a856b9678ffd1/hr_payroll/report/hr_payroll_report.py#L157-L165 but I think it's not a good idea to drop a view and create another each time also! opw-3675598 Forward-Port-Of: odoo/enterprise#55759 Forward-Port-Of: odoo/enterprise#55606
This fix corrects how digital signatures are generated for Spanish FacturaE invoices to comply with the FACe platform requirements. The signature digest algorithm has been changed from SHA256 to SHA1 for the Signature Policy Identifier field, which resolves validation failures when submitting invoices to the Spanish government's FACe platform.
Original PR description
The generated facturae files do not pass the FACe platform checks. The platform itself didn't give us any useful information. A feedback from the Spanish government said though: > We detected inconsistencies with the field `<ds:DigestValue>` from the tag `<xades: SignaturePolicyIdentifier>` Although not explicitly mentioned, we should apparently use SHA1 for the digest value of the Signature Policy instead of SHA256. opw-3673349 opw-3716276 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152309