Friday, December 20, 2024
5 changes · 17.0
Enhancements to existing features
This update enhances the speed of quality checks within the MRP system. By adding an index to a key database field, the system now responds more quickly when processing stock movements, leading to faster operations and improved efficiency.
Original PR description
Add missing index on move_line_id to speedup checking the check_ids of a stock_move_line. See community PR for more info https://github.com/odoo/odoo/pull/190479
Resolved issues and error corrections
This update resolves an issue where the "Request Cancel" button on payments for Mexican companies (l10n_mx) was not working correctly. The fix ensures the correct cancellation process is initiated, allowing users to properly request the cancellation of CFDI payments as required by Mexican regulations. This improves compliance and reduces potential errors.
Original PR description
### Steps to reproduce:
- Install "l10n_mx" and switch to a Mexican company
- Create an invoice with a Mexican partner and confirm
- Create a Payment
- In the invoice form view, go to the "CFDI" page
- Click "Update CFDI"
- The payment appears, click on "Show"
- The button "Request Cancel" does nothing
### Cause:
the method `button_request_cancel` on move is called from the payment model but does not return anything:
```
def button_request_cancel(self):
self.move_id.button_request_cancel()
```
But the `button_request_cancel` from `l10n_mx_edi` is returning a wizard that is never caught.
### Solution:
When clicking the "Request cancel" button, the method `action_request_cancel` is called instead of `action_cancel` which will dispatch the request depending on the type of move being cancelled.
opw-4332483This update resolves an issue preventing non-administrator users from accessing attachments linked to Global Invoices in the Mexican CFDI localization. The fix ensures the correct link between the Global Invoice document and its attachment, allowing authorized users to view the necessary invoice information. This improves usability for users generating and managing Mexican CFDI invoices.
Original PR description
### Steps to reproduce the issue: 1. Activate Mexican Localization and use Mexican Company 2. Create an Invoice and set CFDI to public to True 3. In list view, select Invoice 4. In Actions, Create…
### Steps to reproduce the issue: 1. Activate Mexican Localization and use Mexican Company 2. Create an Invoice and set CFDI to public to True 3. In list view, select Invoice 4. In Actions, Create Global Invoice and Confirm 5. Log as User without Admin Rights 6. Select Invoice 7. Receive access error: > Sorry, [user] doesn't have 'read' access to: > - Attachment (ir.attachment) ### Explanation: When creating a Global Invoice, `ir.attachment` is created as well and linked to the Global Invoice `l10n_mx_edi.document`, but if the link from document to attachment is complete, the opposite is not the case. `ir.attachment.res_id` has a value of 0, and, when checking access rights for `ir.attachment`, we will use the `_search` method in which one of three conditions, two of them having a `res_id` check, must be fulfilled for `ir.attachment` to be considered available to the user. https://github.com/odoo/odoo/blob/afdfbc4041f167ba6d6ff6c17b8432eb531df6b1/odoo/addons/base/models/ir_attachment.py#L561-L570 A user that did not Create Global Invoice and without `base.group_system` in their `groups_id` fulfills none of those conditions. ### Fix reasoning: The issue lies more within `res_id` not being `l10n_mx_edi.document.id` rather than a flaw in `_search`. This change should only apply when creating a Global Invoice. When sending an Invoice to the CFDI through the regular `action_send_and_print` process, `ir.attachment` is linked to `account.move` instead. opw-4365535
This update resolves a bug where the OdooEditor was incorrectly removing spans without attributes, disrupting translation matching. By preventing this removal, the system now correctly uses span keys for accurate translations, ensuring consistent localization across the platform. This improves the quality and reliability of reports for international users.
Original PR description
Before this commit, spans with no attribute and no special style were unwrapped by the OdooEditor, meaning the span itself disappeared, leaving its content in the parent element. This behavior breaks translations, as the whole span is used as a key to match translations After this commit, those spans are not removed. opw-3746922 opw-4318712 [++]
This update resolves an issue where product prices in the l10n_ke_edi_oscu module were not including the correct decimal precision, leading to potential errors in VAT reporting for Kenyan businesses. The fix ensures accurate price calculations, improving the reliability of financial data within Odoo Enterprise. This impacts the accuracy of sales and inventory reporting related to products subject to Kenyan VAT.