Thursday, August 7, 2025
14 changes · saas-18.3
Enhancements to existing features
The first bank account sync now creates a proper opening bank statement instead of a placeholder transaction. This prevents fake accounting entries, improves starting balance accuracy, and makes initial bank reconciliation more reliable.
Original PR description
Before: - When syncing a bank account for the first time, the system created a dummy bank statement line to fill missing statement data. - This was not linked to a real transaction and could confuse users or lead to inaccurate reporting. After: - Replaced the dummy statement line logic with the creation of a proper opening bank statement. - The system now accurately sets the starting balance and the current balance based on the imported transactions. - This logic only applies when no previous bank statement lines exist for the journal and the current balance differs from the sum of imported transactions. Impact: - Prevents creation of fake bank transactions and journal entries during initial sync, ensuring accurate accounting from the start. - Improves performance and reliability by calculating the correct opening balance using real transaction data and provided bank balance. TaskID-4815622
Resolved issues and error corrections
Italian electronic invoicing now preserves the manually selected document type when sending reverse charge tax integrations from vendor credit notes. This ensures credit notes generate negative amounts, so the transaction is correctly treated as a reversal rather than a second vendor bill.
Original PR description
When tax integrations are sent from a credit note (of a vendor bill) they should have a negative value, as it is the reversal operation. However, currently the amounts are positive, so it appears to…
When tax integrations are sent from a credit note (of a vendor bill) they should have a negative value, as it is the reversal operation. However, currently the amounts are positive, so it appears to be a second Bill rather than its reverse. **Steps to reproduce (with an IT Company)** - Create a non-eu [PARTNER] with complete address and VAT - Create a Vendor Bill with: - Partner: [PARTNER] - Electronic Invoicing > Document Type set to TD18 - A line having Reverse charge tax (ie. 22% G RC) - Confirm and send tax integration - Reverse move - Ensure the document type is set to TD18 as well - Confirm and send tax integration - Check the generated xml **Issue** Credit note tax integration will have a positive amounts, while being a credit note it should have negative amounts This occurs because when generating the xml, the document type is recomputed from the invoice features, even if the user set it manually Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4788529) opw-4788529 Forward-Port-Of: odoo/odoo#221672 Forward-Port-Of: odoo/odoo#220878
The point of sale now blocks duplicate orders, order lines, and payments when multiple requests happen at the same time. This helps keep sales records and payments accurate, reducing the risk of duplicated transactions and reconciliation issues.
Original PR description
Before this commit, it was possible for concurrent requests to create duplicate PoS orders, order lines, and payments. This was due to the absence of unique identifiers at the database level for these records during their creation. This commit addresses the issue by adding SQL unique constraints on the UUID fields for the `pos.order`, `pos.order.line`, and `pos.payment`. These database-level constraints ensure that any attempt to insert a duplicate record (based on its unique UUID) will be rejected, thereby preventing data duplication and maintaining transactional integrity. opw-4899804 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#221975 Forward-Port-Of: odoo/odoo#216862
This fixes an editing issue where embedded videos in sanitized website HTML fields disappeared during edit mode, even though they returned after saving or leaving the editor. Users can now see, remove, or adjust videos while editing content, reducing confusion and preventing accidental content changes.
Original PR description
Scenario: - Insert a video in a sanitized html field (for example event.event().description) - Save - Edit Result: the video disappear when editing, so it's hard to remove it or modify it, but reappear when leaving edition. Cause: sanitized field remove iframe, so we need to re-add the iframe when editing the page. Fix: run the code that re-adds the iframe when editing the page. opw-4919773 Forward-Port-Of: odoo/odoo#219397
Customers are no longer sent automatic payment request emails when a payment is already being manually processed through the payment register. This avoids confusing customers with reminders to pay invoices that are already in progress.
Original PR description
**Before this commit:** When creating an invoice payment with the "automatic invoice" option enabled in Sales settings and using a saved payment token, an email is sent to the customer before the…
**Before this commit:** When creating an invoice payment with the "automatic invoice" option enabled in Sales settings and using a saved payment token, an email is sent to the customer before the transaction move is posted and the invoice payment status is updated to "In Payment." This results in the email incorrectly asking the customer to remit payment, even though the payment is already being processed. **Steps to Reproduce:** 1. Enable "Automatic Invoicing" from Sales settings. 2. Enable and publish any payment provider (e.g., Demo) in test mode. 3. Create an invoice and generate a payment link. Open the link in a new incognito tab and pay using any dummy card number (ensure the "Save my payment details" checkbox is checked). This saves the payment token for the partner. 4. Create a new invoice with the same partner, then register payment. Select the payment method and the previously saved token, then confirm. 5. Observe that the payment status is "In Payment," but the email sent to the customer incorrectly asks them to remit payment. **Fix:** This change prevents payment notification emails from being sent automatically when the payment is manually created from the payment register wizard. Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4850293) opw-4850293 Forward-Port-Of: odoo/odoo#221997 Forward-Port-Of: odoo/odoo#221587
Vendor bills no longer fail when the same vendor supplies a shared product with different units of measure in different companies. The system now selects the vendor setup for the active company, helping multi-company purchasing and accounting teams create bills reliably.
Original PR description
**Step to reproduce:** 1. Install purchase and account module. 2. Enable the uom option (Purchase > Configuration > Settings). 3. Create a vendor (partner). 4. Set up companies (have at least two…
**Step to reproduce:**
1. Install purchase and account module.
2. Enable the uom option (Purchase > Configuration > Settings).
3. Create a vendor (partner).
4. Set up companies (have at least two companies).
5. Create a product (Vendors bills > Product) that is shared across two companies.
6. Go to Vendors > Product : in the product’s Purchase tab:
- Add the same vendor twice - one line for each company.
- Assign different UoMs (e.g., “Unit(s)” for US company and “Kilogram(s)” for AT company).
7. Switch to one company.
8. Create a vendor bill in one of the companies using that product and vendor.
**Issue:**
A ValueError is raised when creating the vendor bill:
`ValueError: Wrong value for account.move.line.product_uom_id: uom.uom(1, 2)`
https://github.com/odoo/odoo/blob/0e23327c322acbdf6acfecd52385ffee0266220c/addons/account/models/account_move_line.py#L806-L807
**Cause:**
During the computation of product_uom_id where retrieves all seller records
matching the partner_id but fails to limit the result.
**Solution:**
To fix this, retrieve sellers by both partner_id and company_id and first matching
seller is used. This ensures the UoM is correctly set according to the company also.
opw-4877577
Co-authored-by: PIYUSH <pish@odoo.com>
Forward-Port-Of: odoo/odoo#217137Delivery operation reports now print correctly even when an item has no reserved stock. The report also hides zero-quantity lines, making delivery slips clearer and avoiding confusing empty entries.
Original PR description
**Steps to reproduce:** 1. Install Inventory > Go to Inventory > Configuration > Tick Storage Locations. 2. Go to Operations > Deliveries > create a new delivery. 3. Add two products: one with…
**Steps to reproduce:** 1. Install Inventory > Go to Inventory > Configuration > Tick Storage Locations. 2. Go to Operations > Deliveries > create a new delivery. 3. Add two products: one with on-hand quantity, one without. 4. Set demand quantities > mark as To Do, check availability, and try to print. **Issue:** - A traceback (IndexError: tuple index out of range) occurs when printing picking report if a product has no reserved quantity, due to missing move lines. **Cause:** - The template attempts to access `move.move_line_ids[0]` without checking if `move_line_ids` is non-empty. This raises an IndexError if there's no move lines. https://github.com/odoo/odoo/blob/f539705023993e284dce5dc1027c3c3af9c42d75/addons/stock/report/report_stockpicking_operations.xml#L143-L146 - Also, move lines with zero quantity are displayed in the picking operation report. <img width="529" height="94" alt="image" src="https://github.com/user-attachments/assets/61c439a2-16c4-44aa-a664-fbec672f6226" /> **Solution:** - Add a check to ensure `move.move_line_ids` is non-empty before accessing the first element. - Add filter to avoid rendering move lines with zero `quantity` in the delivery. **opw-4961985** Forward-Port-Of: odoo/odoo#220317
This update prevents access errors when opening the Transaction button on reconciled payments in multi-company setups. It ensures the payment uses the correct default bank statement journal for the selected company, avoiding accidental selection of a journal from another company.
Original PR description
This fixes the access error when using the 'Transaction' smart button from a reconciled payment present since Steps to reproduce: - Multi-company environment with account_accountant installed - Only select one company - Create a payment with a journal entry (by adding an account on the payment method) - Create a corresponding bank statement and reconcile them both together - Go to the payment form view - Click on the Transaction button `button_open_statement_lines` - Access error is raised due to a "random" assignation of journal which is likely to be one from the other company This make sure we select the default statement line journal by default, ensuring we don't search for a journal in every company
The Romanian SAF-T export now handles missing optional product group information without crashing. VAT checks were also aligned with the correct validation logic, reducing false errors and helping businesses complete required tax exports more reliably.
Original PR description
- Added fallback for missing to prevent crash during export. - Replaced incorrect usage of with to align with actual partner VAT validation logic and avoid false errors. These changes ensure smoother SAF-T export by handling optional fields and validation more robustly. Forward-Port-Of: odoo/enterprise#91737
Customers no longer receive automatic emails asking them to pay when a payment has already been manually registered with a saved payment method. This avoids confusing payment reminders while the invoice is correctly marked as being processed.
Original PR description
**Before this commit:** When creating an invoice payment with the "automatic invoice" option enabled in Sales settings and using a saved payment token, an email is sent to the customer before the…
**Before this commit:** When creating an invoice payment with the "automatic invoice" option enabled in Sales settings and using a saved payment token, an email is sent to the customer before the transaction move is posted and the invoice payment status is updated to "In Payment." This results in the email incorrectly asking the customer to remit payment, even though the payment is already being processed. **Steps to Reproduce:** 1. Enable "Automatic Invoicing" from Sales settings. 2. Enable and publish any payment provider (e.g., Demo) in test mode. 3. Create an invoice and generate a payment link. Open the link in a new incognito tab and pay using any dummy card number (ensure the "Save my payment details" checkbox is checked). This saves the payment token for the partner. 4. Create a new invoice with the same partner, then register payment. Select the payment method and the previously saved token, then confirm. 5. Observe that the payment status is "In Payment," but the email sent to the customer incorrectly asks them to remit payment. **Fix:** This change prevents payment notification emails from being sent automatically when the payment is manually created from the payment register wizard. opw-4850293 Forward-Port-Of: odoo/enterprise#91761 Forward-Port-Of: odoo/enterprise#91570
Time off that overlaps with a public holiday is no longer deferred into the next payslip. This prevents employees from incorrectly losing future leave or having payroll adjustments for days that were already treated as public holidays.
Original PR description
The aim of this commit is to prevent a sick day or any other type of time off taken on a public holiday to be deferred. To reproduce: - Create a public Holiday for previous month - Regenerate the work entries for that month - Compute a batch of payslip for last month, validate and mark it as paid --> The public holiday should be on the payslip - OPTIONAL: run the cron `Payroll: Generate pdfs` to make create the payslip in document and make it available to the concerned employee. - With the concerned employee, put a time off on the whole week of the last month. It should overlap with the public holiday. - Validate the time off and defer it for next payslip - Compute a batch of payslip for following month, validate and mark it as paid Before this commit: The overlapping sick day gets deferred completely ignoring the fact it was a public holiday. After this commit: The overlapping sick day doesn't get deferred. opw-4903546 Forward-Port-Of: odoo/enterprise#89264
Australian payroll tax withholding amounts are now included when preparing tax return closing entries, improving the completeness of payroll-related tax reporting. The payroll accounting module also installs more reliably when Australian localization is being set up for a new company.
Original PR description
This PR is divided in 2 commits: A first commit is an implementation AU specific and will create the lines related to tax on salary in the tax return closing entry. Before this commit, these lines…
This PR is divided in 2 commits: A first commit is an implementation AU specific and will create the lines related to tax on salary in the tax return closing entry. Before this commit, these lines weren't taken into account in the closing entry. The condition to select the account.move.line are the following: - The journal item has a "W2", "W3" or "W4" (Withholding Tax) tax grid whose journal entry is linked to an hr.payslip. - The journal item does not have an originating tax record (i.e., tax_line_id is empty). - The journal item is posted to a tax provision account (i.e., a balance sheet one) as defined on the salary rule. A second commit fixes a bug: the manifest of the l10n_au_hr_payroll_account module was having a 'countries': ['au'] dependency, that was adding a condition to the dependencies to auto install the module: we expect an existing AU company in DB. But for example if the user installs l10n_au, the condition is evaluated at the moment he clicks on install, and no AU company exists at that time. Task-4921992
When products are added to a Field Service task, the related sales order is no longer locked too early when automatic sales locking is enabled. This ensures the delivery order is created correctly and users can continue managing the Field Service sale without getting stuck in an inconsistent state.
Original PR description
Issue: When the "Lock Confirmed Sales" setting is enabled, adding a product to a Field Service task would lock the associated sales order before its picking could be created. The confirmation process…
Issue: When the "Lock Confirmed Sales" setting is enabled, adding a product to a Field Service task would lock the associated sales order before its picking could be created. The confirmation process locks the order first , and the subsequent step to create stock moves (`_action_launch_stock_rule`) explicitly skips locked orders. Reproducible on 17.0~master [Task](https://www.odoo.com/odoo/action-4043/4633977) Odoo 17: https://drive.google.com/file/d/1qmAYhSu6gU91efuJEDF-Irn2cLGUQP0A/view?usp=drivesdk Odoo 18: https://drive.google.com/file/d/1x8IeXwT7ZFM7Av9Vp6GSvGIbOaEGfmVx/view?usp=drivesdk Steps to reproduce: 1. In Sales > Configuration > Settings, enable "Lock Confirmed Sales". 2. Go to a Field Service task. 3. In the kanban view via the "Products" smart button, add a product. 4. Come back to the task, refresh the browser, open the linked Sales Order from the smart button. 5. **Before this fix:** The SO is locked, no picking is created, and SO lines will have delivered_qty set even though we haven't delivered anything. 6. **After this fix:** The SO is not locked, and a Delivery smart button is correctly displayed, linking to the generated picking. This behavior left the sales order in an inconsistent state: it was locked, but had no corresponding delivery order. As a result, users were blocked from removing or modifying the products added to the task, as the system prevented edits on a locked order with no picking to cancel. Let's step through what's going on here; 0. We enable "Lock Confirmed Sales" option. 1. Add a product to the Field Service(FS) task https://github.com/odoo/enterprise/blob/4256ea170c31209b83ff808e51145757571f8556/industry_fsm_sale/controllers/catalog.py#L19-L42 https://github.com/odoo/enterprise/blob/4256ea170c31209b83ff808e51145757571f8556/industry_fsm_sale/controllers/catalog.py#L38 2. set_fsm_quantity() is invoked, which will create a SO for the FS task https://github.com/odoo/enterprise/blob/35e1f47160d5840e8701fc0ad43ec42bbfaf9e36/industry_fsm_sale/models/product_product.py#L144 3. `_fsm_create_sale_order()` will immediately `action_confirm()` the new SO, because of the reasons in the function description. ( Since we are immediately confirming newly created SO, I think we should consider not applying the "Lock Confirmed Orders" option to FSM SOs.) https://github.com/odoo/enterprise/blob/2347dac2568dbcf83578f044f8fe41ab70a20f47/industry_fsm_stock/models/project_task.py#L124-L134 https://github.com/odoo/enterprise/blob/2347dac2568dbcf83578f044f8fe41ab70a20f47/industry_fsm_stock/models/project_task.py#L134 4. `odoo/addons/sale/models/sale_order.py/action_confirm()` will lock SO because we enabled 'Lock Confirmed Sales' https://github.com/odoo/odoo/blob/863c064fd911cb4eeedad0abec82adb4690128f6/addons/sale/models/sale_order.py#L964 6. `_action_launch_stock_rule()` is invoked, is in charge of creating Pickings for SOs https://github.com/odoo/odoo/blob/3be83d363786526fe470e41122169e594b5467fb/addons/sale_stock/models/sale_order_line.py#L303 https://github.com/odoo/odoo/blob/3be83d363786526fe470e41122169e594b5467fb/addons/sale_stock/models/sale_order_line.py#L343-L344 7. But, since `line.order_id.locked` , the system do not create Pickings for the SOs. https://github.com/odoo/odoo/blob/3be83d363786526fe470e41122169e594b5467fb/addons/sale_stock/models/sale_order_line.py#L315-L316 The line was introduced by https://github.com/odoo/odoo/commit/17bece3e797913bcba8dd7e07fc8541c0a45e3f7 This commit resolves the issue by passing a context key `fsm_create_sale_order=True` when confirming a sales order that is being created from a Field Service task. The `_should_be_locked` method on the sale order is overridden to check for this context key. If the key is present, it prevents the order from being locked within that specific transaction, allowing the stock rules to execute correctly and create the necessary picking. The order will be locked for any subsequent operations as intended. Tradeoff here; We are sacrificing the universal application of one feature (automatic lock on confirmed sales order) to fix a critical bug that makes the entire FSM delivery process unusable. --- EDIT: Without this change, all of [test_fsm_stock](https://github.com/odoo/enterprise/blob/17.0/industry_fsm_stock/tests/test_fsm_stock.py)'s test cases that use `_fsm_ensure_sale_order()` will fail if the setting is on. (around ~20 test cases). [In the past, similar issue occurred for Subscription Orders, and the PO confirmed that the "Lock Confirmed Order" setting should never affect the subscriptions. ](https://github.com/odoo/enterprise/commit/e4f9d76c0a58f3cc226a2372f3936cea4547312e). This commit takes the same approach to ignore the setting upon SO confirmation. opw-4633977 opw-4749653 opw-4880664 Forward-Port-Of: odoo/enterprise#91563 Forward-Port-Of: odoo/enterprise#88855
The journal report now keeps draft accounting entries grouped consistently when several invoices share the same date. This prevents errors when users include draft entries and use the Load More option, making report navigation more reliable.
Original PR description
**Issue description:** When fetching AMLs for the journal report with _query_aml(), it sorts the AMLs based on (am.date, am.name), which are not unique in case we have multiple (draft) moves with the same date. The lines will end up mixed and ordered with respect to the account, which causes errors with the "Load More" functionality, as it assumes that the lines are ordered based on their move. For posted entries, it's not an issue as the am.name is unique. **Steps to reproduce:** -Create 3 or more invoices (with 3+ AMLs each) in draft and on the same invoicing date. -Open journal report settings and set the Load More Limit to 5. -Open the journal report and set the date to this day and check the "Include Draft Entries" option. -Press "Load More", you will get an error. opw-4929907 Forward-Port-Of: odoo/enterprise#91746 Forward-Port-Of: odoo/enterprise#90360