Daily updates from Odoo
Tuesday, February 6, 2024
4 changes
Resolved issues and error corrections
This fix resolves an issue where Amazon was incorrectly treating FBA (Fulfillment by Amazon) orders as FBM (Fulfillment by Merchant) orders. The problem occurred because stock inventory was being sent to Amazon's default fulfillment channel for FBA products, causing Amazon to sometimes use the wrong stock level. The fix ensures that FBA products no longer update the default channel inventory, preventing order fulfillment confusion.
Original PR description
Following commit 1b2977811516cce4830ceaf1a7585c8f7061243a we now send the stock inventory for all the products linked to an Amazon offer. At the time, it was decided to send FBA and FBM updates at…
Following commit 1b2977811516cce4830ceaf1a7585c8f7061243a we now send the stock inventory for all the products linked to an Amazon offer. At the time, it was decided to send FBA and FBM updates at the same time because: - The Amazon documentation didn't say anything about it - It avoided the problem of a strange configuration of the customer where a product in FBM could be placed in the Amazon location, as nothing ensure that everything placed there is, indeed, a FBA product, even if this is the recommended setting. - After testing the synchronization of the FBM stock, we couldn't see any changes in the Amazon backend, which lead us to think that we couldn't, in fact, update the stock of a FBA product as Amazon would ensure the stock used would be the one in their warehouse. Recently, we got some problem with FBA order that Amazon considered being FBM. After investigation, it was found that the stock send for FBA would be set as having a "DEFAULT" fulfilment channel, but this wasn't shown anywhere on Amazon backend, only in their DB. So from time to time, instead of using the set fulfilment channel of a product, Amazon would use that default one, with a separate, virtual, stock. With this fix, we ensure that this "default" channel is now filled with a quantity of 0 instead, for FBA product. We assume the set-up of the Amazon account on Odoo is correctly made and all products in the Amazon location are FBA. task-3693853 Forward-Port-Of: odoo/enterprise#54737
This update significantly improves the speed of searching for journal entries in the accounting module. By adding a database index and simplifying the search logic, query times have been reduced from over 2 minutes to less than 1 second on large databases. Users will experience much faster and more responsive searches when looking up journal entries.
Original PR description
On a big database, the search for journal entries is basically not usable.
This is because there is a missing index on the reference, as well as a complex OR generated by the clause `('move_id.partner_id', 'ilike', self)`.
This commit will of course add the index, but will also remove the clause because it is almost always possible to find the journal entry via the partner by using the right filter instead, and since it is not really an easy to discover "feature" it is most likely not even used.
On the test database, queries went from over 2 minutes to less than 1 second.This fix corrects a confusing issue where customers see "Thank you for your order" on the confirmation page even when their payment failed or was canceled. The page now only displays this success message when payment is actually completed, preventing customer confusion and ensuring accurate transaction status communication.
Original PR description
**Issue Description**: Users encounter a misleading confirmation page when a payment is canceled or fails in version 17.0 and higher of our website. Specifically, upon a payment error, users are…
**Issue Description**: Users encounter a misleading confirmation page when a payment is canceled or fails in version 17.0 and higher of our website. Specifically, upon a payment error, users are directed to /payment/status with an error message. However, selecting the "Skip" button redirects them to a confirmation page titled "Thank you for your order", suggesting successful payment. This misleading information can lead to confusion, especially since it results in the card being cleared for public users despite non-receipt of payment. **Steps to Reproduce**: 1. Navigate to the 'Shop' section of the website, add a product to the cart, and proceed to checkout. 2. Click the "Pay with demo". 3. Select "Canceled" as the Payment Status and then "Pay". 3. Click the "Skip" button during the payment process. 4. Observe redirection to a confirmation page with the title "Thank you for your order", implying successful transaction. **Proposed Solution**: This issue, present in versions 17.0 and later, is due to a modification in the <template id="confirmation">, where the "Thank you for your order" title is now displayed regardless of the payment state. To resolve this, we propose introducing a conditional check to display this title only when the payment state is "done", ensuring accurate representation of the transaction status. opw-3688785
This update fixes critical bugs in the Italian EDI module that were preventing users from sending invoices. The module had compatibility issues after a recent code migration that caused system errors. Applying this fix restores the ability to send invoices to the Italian EDI system without errors.
Original PR description
The compatibility was broken in a couple of points, clients are required to update the `l10n_it_edi` or cannot send invoices to the Italian EDI. Updating the module fixes the errors. (View changes…
The compatibility was broken in a couple of points, clients are required to update the `l10n_it_edi` or cannot send invoices to the Italian EDI. Updating the module fixes the errors. (View changes and the warning_message will not be used anymore)
These two errors may appear:
```
[...]
File "/home/odoo/work/odoo/odoo/fields.py", line 1216, in __get__
raise ValueError(f"Compute method failed to assign {missing_recs}.{self.name}")
ValueError: Compute method failed to assign account.move.send(<NewId 0x7ff2da360eb0>,).l10n_it_edi_warning_message
[...]
File "/home/odoo/work/odoo/addons/l10n_it_edi/wizard/account_move_send.py", line 57, in _compute_l10n_it_edi_warning_message
action = error_data['action']
~~~~~~~~~~^^^^^^^^^^
KeyError: 'action'
```
Credit goes to @salvorapi for his first analysis.
Original broken PR: odoo/odoo#142596
- Missing default

- Action being mandatory in the `warning_message` field
