Daily updates from Odoo
Wednesday, November 6, 2024
7 changes · 18.0
Resolved issues and error corrections
This fix prevents an error when users process a return for exchange from stock receipts without the Sales app installed. The exchange flow now works correctly in stock-only setups, avoiding an unexpected interruption for warehouse users.
Original PR description
Currently, a traceback occurs when the user tries to click return for exchange button. To reproduce this issue: 1) Install `stock` 2) Create a new receipt picking with stock moves and quantity 3) Click on the `validate` button and then the `return` button 4) Update the return quantity and click `return for exchange` Error:- ``` AttributeError: 'stock.move' object has no attribute 'sale_line_id' ``` The `sale_line_id` is defined in `stock.move` from `sale_stock` module. https://github.com/odoo/odoo/blob/2be7f413493a6ad43980eb031b8383deb3a706c0/addons/sale_stock/models/stock.py#L16-L17 If the sales module is not installed, then the move does not contain any sale_line_id. which leads to the traceback mentioned above. https://github.com/odoo/odoo/blob/2be7f413493a6ad43980eb031b8383deb3a706c0/addons/stock/wizard/stock_picking_return.py#L197 sentry-5993887458
This fix prevents Indonesian QRIS point-of-sale payments from crashing when the bank API key or merchant ID is configured incorrectly. Instead of a technical error, the system can handle the failed bank response more safely, helping cashiers continue troubleshooting payment setup issues.
Original PR description
This error occurs because the bank's QRIS API Key and Merchant ID were set up incorrectly. Steps to reproduce: --- - Install ``POS`` and ``l10n_id`` module - Change company to ``ID Company`` - Create…
This error occurs because the bank's QRIS API Key and Merchant ID were set up incorrectly. Steps to reproduce: --- - Install ``POS`` and ``l10n_id`` module - Change company to ``ID Company`` - Create a new ``Warehouse`` in Inventory - Now create a new journal(eg: Test) in invoicing with ``Type`` as ``Bank`` > go to the internal link of ``Account Number`` write any ``QRIS API Key`` and ``QRIS Merchant ID`` and Save - Now go to ``Payment Methods`` and create a new one in POS(eg: Demo) with ``Integration`` as ``qr_code`` and ``QR Code Format`` as ``QRIS`` > Select ``Journal`` as ``Test`` and Save - Go to ``Clothes`` > Open Session > Add product > Payment > select payment method as ``Demo`` > Click ``retry`` Traceback: --- ``AttributeError: 'str' object has no attribute 'get'`` At [1], we are facing an error because ``data`` contains the failed message in it, and the status of the response is ``failed``. [1]- https://github.com/odoo/odoo/blob/dd71d998796cf426527972a3feac6fdd040f3fe3/addons/l10n_id/models/res_bank.py#L101 sentry-6029900658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents errors when customers edit their address during checkout on Peruvian localized websites. It ensures the required Peru-specific address fields are available, allowing purchases to be completed smoothly.
Original PR description
- Change the company of the first website to the localized company - Open web shop as public user - Make a purchase - Checkout and fill the address - Edit the address - Confirm Issue: Traceback will raise because of the missing localization fields opw-4232531 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Manufacturing users can now post a work-in-progress accounting entry even when a work order's time tracking has been started but not ended. This prevents an error screen and keeps the manufacturing accounting workflow moving smoothly.
Original PR description
before this commit, if user tries to open/generate WIP entry for manufacturing without recording the end time in the time tracking inside the work order a traceback is shown to user * create a manufacturing order that generate work order * in the work orders generated, start a work order * now click on POST WIP accounting entry from action * traceback is shown  after this commit, no traceback wont be shown in the above scenario Related EE: https://github.com/odoo/enterprise/pull/72345 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a point-of-sale issue where restaurant receipts could show zero change after customers overpaid for orders that had already been sent to the kitchen. Receipts now display the correct amount of change, reducing cashier confusion and improving customer trust.
Original PR description
When using the restaurant, orders that were sent to the kitchen did not show the change amount on the receipt. Steps to reproduce: ------------------- * Open restaurant * Select any table, add items…
When using the restaurant, orders that were sent to the kitchen did not show the change amount on the receipt. Steps to reproduce: ------------------- * Open restaurant * Select any table, add items to the order * Select **Order** * Select **Payment** * Select any payment method * Pay more than the order * Validate > Observation: The receipt show a change of 0.0 Why the fix: ------------ Before this commit: https://github.com/odoo/odoo/commit/1649ee1a757ab1a095fd92f7605ac2b004568352 the change could get computed on an onchange: https://github.com/odoo/odoo/blob/662f63b630cae8604179174cdd67536f3300bb53/addons/point_of_sale/models/pos_order.py#L417-L427 By definiton, onchanges will only trigger from web form views. In our case, the onchange was never triggered when synchronizing orders from the UI, even though we would make a change to the payment_ids when adding the change line. After the above mentioned commit, the code inside the onchange was put into a separate function `_compute_prices()` which is still called in the onchange but also in the `write` function. When an order was previously synced from the UI, we call the write function. https://github.com/odoo/odoo/blob/430656132044f8d675712d5b6cbfef807880d024/addons/point_of_sale/models/pos_order.py#L124 By going into `_compute_prices` in the write method, we compute the `amount_return` before the change line was added to the order. https://github.com/odoo/odoo/blob/430656132044f8d675712d5b6cbfef807880d024/addons/point_of_sale/models/pos_order.py#L128 Computing `amount_return` before adding the change line is problematic since it is computed with regards to the negative payment lines. https://github.com/odoo/odoo/blob/430656132044f8d675712d5b6cbfef807880d024/addons/point_of_sale/models/pos_order.py#L440 To solve our solution, we call `_compute_prices` after we add the change line. `amount_return` represents the change given to a client. If we give `10$` back to a client, the change payment line will have an amount of `-10$` but `amount_return` should be positive 10. (Thus the change of `-`) We also add a small fix for `amount_difference` which can have precision error and thus show something like `-0.0`. opw-4253292
Six payment terminal setup now sends the IoT Box request from the user's browser instead of through the server. This helps configuration succeed when the IoT Box is reachable from the customer site but not from the hosted Odoo server.
Original PR description
The wizard to configure a Six payment terminal currently sends a request to the IoT Box via the server. However, often the IoT Box is not on the same network as the server so this request fails. This PR moves the request logic into a JS widget, so as long as the client can reach their IoT Box the Terminal configuration should succeed. task-4214070
Creating invoices or sales orders for Brazilian customers using Avalara automatic tax mapping no longer triggers an error when no lines have been added yet. This prevents a blocking crash and lets users continue preparing documents normally with external tax configuration.
Original PR description
Issue: A traceback occurs when attempting to create an invoice or sales order for a customer whose fiscal position is set to Automatic Tax Mapping in Brazilian accounting. ```python File…
Issue: A traceback occurs when attempting to create an invoice or sales order for a customer whose fiscal position is set to Automatic Tax Mapping in Brazilian accounting. ```python File "/home/odoo/src/enterprise/account_external_tax/models/account_move.py", line 18, in _compute_tax_totals subtotal = tax_totals['subtotals'][0] ~~~~~~~~~~~~~~~~~~~~~~~^^^ IndexError: list index out of range ``` Steps to reproduce: - Have Brazilian localization (including EDI modules) with Avatax configuration. - Create a new Sales Order or Invoice and: - Use a contact with a fiscal position set to "Automatic Tax Mapping (Avalara Brazil)", or - Set the fiscal position to that on the SO or invoice itself. - Observe the traceback as described in the ticket. Explanation: In account_move/sale_order from the modules account_external_tax/sale_external_tax, the method _compute_tax_totals attempted to compute the tax totals when there were no account move lines (tax_totals['subtotals'] is empty), which results in an "out of range" traceback. The Brazilian Automatic Tax Mapping is computed externally, which is why it triggered this issue. opw-4256191