Friday, December 27, 2024
12 changes · saas-17.2
Miscellaneous changes
Google recently updated the Firebase API and deprecated support for the version we are currently using (v6.3.4). As a result, Odoo push notifications are no longer functional. This PR updates the dependencies and API calls to align with the latest Firebase API, ensuring that push notifications can once again be sent from Odoo. see: https://firebase.google.com/docs/cloud-messaging/migrate-v1 task-4247811 Forward-Port-Of: odoo/enterprise#76145 Forward-Port-Of: odoo/enterprise#73390
Original PR description
Google recently updated the Firebase API and deprecated support for the version we are currently using (v6.3.4). As a result, Odoo push notifications are no longer functional. This PR updates the dependencies and API calls to align with the latest Firebase API, ensuring that push notifications can once again be sent from Odoo. see: https://firebase.google.com/docs/cloud-messaging/migrate-v1 task-4247811 Forward-Port-Of: odoo/enterprise#76145 Forward-Port-Of: odoo/enterprise#73390
Currently, while we send the carrier and the tracking number, we don't send the shipping method. While this doesn't block anything, this lead to Amazon sending warning about incomplete shipping information. Now, we will send: - Carrier name : the delivery_type if any relevant, else the carrier name as fallback. eg: "DHL" - The shipping method: the carrier name. eg: "DHL Express" or "Parcel" opw-4393663 Forward-Port-Of: odoo/enterprise#76156
Original PR description
Currently, while we send the carrier and the tracking number, we don't send the shipping method. While this doesn't block anything, this lead to Amazon sending warning about incomplete shipping information. Now, we will send: - Carrier name : the delivery_type if any relevant, else the carrier name as fallback. eg: "DHL" - The shipping method: the carrier name. eg: "DHL Express" or "Parcel" opw-4393663 Forward-Port-Of: odoo/enterprise#76156
### 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 link
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 Forward-Port-Of: odoo/enterprise#75031
Users creating a debit note from an invoice will need to pay attention to the document type that, with the EDI module installed, is set by taking into account only the partner 'Taxpayer Type' and not the move type (i.e. debit note) - Have an invoice with document type "(33) Factura Electrónica" accepted by SII - Create the debit note from the invoice Issue: default document type will be 33, while it should be 56 opw-4292111 Forward-Port-Of: odoo/enterprise#76011
Original PR description
Users creating a debit note from an invoice will need to pay attention to the document type that, with the EDI module installed, is set by taking into account only the partner 'Taxpayer Type' and not the move type (i.e. debit note) - Have an invoice with document type "(33) Factura Electrónica" accepted by SII - Create the debit note from the invoice Issue: default document type will be 33, while it should be 56 opw-4292111 Forward-Port-Of: odoo/enterprise#76011
In a POS restaurant order, when reducing the product quantity of an order line, the reduced display line in the preparation display was always the first one created, regardless of which order line was changed. Steps to reproduce: 1. In the POS restaurant, add a product with a quantity of 2 and an internal note. Confirm the order. 2. Add another order with the same product and internal note but with a quantity of 5. 3. In the kitchen display, change the stage of the first display line
Original PR description
In a POS restaurant order, when reducing the product quantity of an order line, the reduced display line in the preparation display was always the first one created, regardless of which order line…
In a POS restaurant order, when reducing the product quantity of an order line, the reduced display line in the preparation display was always the first one created, regardless of which order line was changed. Steps to reproduce: 1. In the POS restaurant, add a product with a quantity of 2 and an internal note. Confirm the order. 2. Add another order with the same product and internal note but with a quantity of 5. 3. In the kitchen display, change the stage of the first display line (quantity 2) from "To Cook" to "Ready." 4. In the POS, reduce the quantity of the second order line (quantity 5) to 4. Issue: The system reduces the quantity of the first display line (the one in the "Ready" stage). Cause: In `_process_preparation_changes` of `pos_order.py` in the `pos_preparation_display` module, display lines are filtered and sorted based on their creation order. However, since there is no 1-to-1 relation between display lines and order lines, it is impossible to directly target specific display lines. Fix: After this commit, display lines are now sorted based on their stage. Priority for quantity reduction is given to the line in the earliest stage. opw-4354093 Forward-Port-Of: odoo/enterprise#75565
In this commit: - Updated the error message for retrieving the Bearer Token during Viva Wallet payment requests. - The new message clearly states: `Unable to retrieve Viva Wallet Bearer Token: Please verify that the Client ID and Client Secret are correct` - This improvement provides more explicit guidance to users, making it easier to identify and resolve configuration issues. task- 4383616 Forward-Port-Of: odoo/odoo#191765
Original PR description
In this commit: - Updated the error message for retrieving the Bearer Token during Viva Wallet payment requests. - The new message clearly states: `Unable to retrieve Viva Wallet Bearer Token: Please verify that the Client ID and Client Secret are correct` - This improvement provides more explicit guidance to users, making it easier to identify and resolve configuration issues. task- 4383616 Forward-Port-Of: odoo/odoo#191765
This commit adds the parameter `sanitize_overridable=True` to the `description` field of `website_slides` slides. It means that the description can now be properly edited as an user with enough rights. The issue is that the `slide.description` field is sanitized after saving a `slide/*` page, which removes `<button>` elements. This is not easily testable in version 16.0 because no blocks contain `<button>` elements. However, starting from version 18.0, new blocks like the `accordion` block in
Original PR description
This commit adds the parameter `sanitize_overridable=True` to the `description` field of `website_slides` slides. It means that the description can now be properly edited as an user with enough rights. The issue is that the `slide.description` field is sanitized after saving a `slide/*` page, which removes `<button>` elements. This is not easily testable in version 16.0 because no blocks contain `<button>` elements. However, starting from version 18.0, new blocks like the `accordion` block include buttons, and these are removed after saving a `slide/*` page when they are dropped into it. opw-4273436 Forward-Port-Of: odoo/odoo#190620
Before this commit, even if no foldable link items were present in the navbar of a website header, the function to check if items needed to be hidden was still executed. After this commit, if no foldable items are present in the navbar, the function is not executed. Running the function when no items are present can, in rare cases, cause errors (e.g., starting from version 17.0, if the "sales 1" header template contains no links and the page is zoomed). This is why we addressed this issue
Original PR description
Before this commit, even if no foldable link items were present in the navbar of a website header, the function to check if items needed to be hidden was still executed. After this commit, if no foldable items are present in the navbar, the function is not executed. Running the function when no items are present can, in rare cases, cause errors (e.g., starting from version 17.0, if the "sales 1" header template contains no links and the page is zoomed). This is why we addressed this issue in this commit. opw-4390661 Forward-Port-Of: odoo/odoo#191708 Forward-Port-Of: odoo/odoo#191233
Chilean users cannot succesfully create the credit note (with document type 61) of a Vendori bill (type 46) because of a conflict on the document number input method - Open Vendor Bills journal and enable 'Use Documents?' - Create a Bill with document type '(46) Factura de Compra Electrónica' - Create the credit note - In the Wizard: select 'Full Refund', Document Type 61, Confirm Issue: The system blocks the action because the new move is missing the document number opw-4268371 For
Original PR description
Chilean users cannot succesfully create the credit note (with document type 61) of a Vendori bill (type 46) because of a conflict on the document number input method - Open Vendor Bills journal and enable 'Use Documents?' - Create a Bill with document type '(46) Factura de Compra Electrónica' - Create the credit note - In the Wizard: select 'Full Refund', Document Type 61, Confirm Issue: The system blocks the action because the new move is missing the document number opw-4268371 Forward-Port-Of: odoo/odoo#188481
**Current behavior before PR:** When transforming an image, if we click on transform button again, it resets the transformation of that image but transform button remain active. **Desired behavior after PR is merged:** Now, If transformation container is open and user clicks on transform button then image gets reset and button gets inactive as there is no transformation. task-4251662 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr For
Original PR description
**Current behavior before PR:** When transforming an image, if we click on transform button again, it resets the transformation of that image but transform button remain active. **Desired behavior after PR is merged:** Now, If transformation container is open and user clicks on transform button then image gets reset and button gets inactive as there is no transformation. task-4251662 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190556 Forward-Port-Of: odoo/odoo#189588
A new account template got the id pcg_468. The issue is that it is the same as a previous group. When you reload the CoA, it will try to access the data behind each xmlid of account template. It will then access a group template thinking it's an account, resulting in a bad field access and a traceback. Appeared due to a bad fw-port of https://github.com/odoo/odoo/commit/0ebf80b613d229ef5fb07ea97d406496f9df6254 (also fixed the typo in the code) --- I confirm I have signed the CL
Original PR description
A new account template got the id pcg_468. The issue is that it is the same as a previous group. When you reload the CoA, it will try to access the data behind each xmlid of account template. It will then access a group template thinking it's an account, resulting in a bad field access and a traceback. Appeared due to a bad fw-port of https://github.com/odoo/odoo/commit/0ebf80b613d229ef5fb07ea97d406496f9df6254 (also fixed the typo in the code) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191827
Issue 1 --- Trying to validate a receipt related to a landed cost account line for a product using a uom from a different uom category will raise a userError that do not allow you to validate the receipt. ### Steps to reproduce: - Create a product: - real time property valuation - average cost method - on ordered quantities control policy - UOM from an other category han "Unit" e.g. kg - Create and confirm a PO for 100 k units at 1.35 each - Create an invoice for
Original PR description
Issue 1 --- Trying to validate a receipt related to a landed cost account line for a product using a uom from a different uom category will raise a userError that do not allow you to validate the…
Issue 1
---
Trying to validate a receipt related to a landed cost account line for
a product using a uom from a different uom category will raise a
userError that do not allow you to validate the receipt.
### Steps to reproduce:
- Create a product:
- real time property valuation
- average cost method
- on ordered quantities control policy
- UOM from an other category han "Unit" e.g. kg
- Create and confirm a PO for 100 k units at 1.35 each
- Create an invoice for 23 k, receive 23k units and backorder
- Create a landed cost on the invoice for 23k units in the company currency units
- Post the invoice
- Create a second invoice for 27k units and post it
- Try to validate the receipt of the 27k units more units
> UserError: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure kg > defined on the product.
### Cause of the issue:
Since Commit 32543ce9356f228d087d17a0ead1e0a80449e5de The landed_cost account lines related to a given stock move are also considered in the `_get_price_unit` call of stock moves:
https://github.com/odoo/odoo/blob/1b999e4b358eabe80cb3d636cd7bc348c5b85a1b/addons/purchase_stock/models/stock_move.py#L60
https://github.com/odoo/odoo/blob/1b999e4b358eabe80cb3d636cd7bc348c5b85a1b/addons/stock_landed_costs/models/purchase.py#L11-L16
However, the uom related to the landed cost account line might not match the uom category of the product related to the move. As such, this line will raise a UserError:
https://github.com/odoo/odoo/blob/da1f44c2296486c0267a7bdbbe3a314ada3aa679/addons/purchase_stock/models/stock_move.py#L70
https://github.com/odoo/odoo/blob/da1f44c2296486c0267a7bdbbe3a314ada3aa679/addons/uom/models/uom_uom.py#L223-L227
Issue 2
---
### Steps to reproduce
- Create a product invoiced on ordered quantities
- Create a PO and a bill for it, post the bill
- Receipt half the quantity
- Add a landed cost product on the PO, create a second bill for this landed cost product. Create and validate the landed cost.
- Receipt the second half quantity.
### Issue:
The valuation of the second transfer is too low
### Cause of the Issue 2:
To get the price unit for "on ordered qty" policy, We compute the ratio of already receipt value on already invoiced value:
https://github.com/odoo/odoo/blob/4f6353ec8a7306fbf63e95e8e02248d72f413aa3/addons/purchase_stock/models/stock_move.py#L84
The issue is the receipt value is increase by the landed costs value because the receipt valuation layer is linked to the landed cost valuation layer. But the product invoice line is not linked to the landed costs invoice line. Resulting in a invoice value under valuated.
This commit will ingnore the receipt values coming from landed costs so that the landed costs value will be added to the total invoiced value and not removed from the value here:
https://github.com/odoo/odoo/blob/cfb7a3593c5a4b313bdfd8628fe1b0dfe7e73823/addons/purchase_stock/models/stock_move.py#L72
*if* the landed cost has it's own invoice line.
Revert Commit 32543ce9356f228d087d17a0ead1e0a80449e5de
Authored-by: Whenrow <whe@odoo.com>
Issue 1: opw-4389366
Issue 2: opw-4354498
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#191892
Forward-Port-Of: odoo/odoo#191225