Tuesday, September 23, 2025
34 changes · 18.0
Enhancements to existing features
Adds a download button for IR56B reports in Hong Kong Payroll, making it easier for users to export the required XML file. This supports smoother payroll reporting and reduces manual steps for preparing statutory submissions.
Original PR description
Add ir56b report download button for downloading .xml file in Hong Kong Payroll. task - 5081474
Adds a dedicated option on the IoT Box homepage to resend connected device information to the Odoo server. This helps recover missing or reset IoT device records faster, avoiding unnecessary service restarts in lab, demo, or support situations.
Original PR description
In the context of the labodoo, database without IoT box are reseted which force to restart the IoT service to re-setup the IoT in the database. This does take some time and ressources that is not neccesary in this context as we would only need to retieve the IoT devices information. This PR propose the idea of having a dedicated route that would directly call the `send_alldevices` method which call `/iot/setup` route which will update the devices. I do think it can also be convenient in the context of the support in the case somehow a device was not synced (can likely happen if the odoo server was down when it was detected) or if the iot box record was removed from the odoo database and need to be recreated Preview: <img width="344" height="512" alt="image" src="https://github.com/user-attachments/assets/1b6c94b5-3f79-4d51-8e0e-f6a83f31bf46" /> task-5101536
Resolved issues and error corrections
Credit notes for Mexican public invoices can now keep the selected “Returns, discounts or bonuses” tax usage when allowed by SAT rules. This prevents the XML from being generated with the wrong default value, reducing compliance errors for companies using fiscal regime 616.
Original PR description
**Steps to reproduce:** 1. Install `l10n_mx` and `l10n_mx_edi`. 2. Create an invoice with: * Enable *CFDI to Public*. * Confirm, then send to SAT. 3. Create a credit note with: * *Usage* = `Returns,…
**Steps to reproduce:** 1. Install `l10n_mx` and `l10n_mx_edi`. 2. Create an invoice with: * Enable *CFDI to Public*. * Confirm, then send to SAT. 3. Create a credit note with: * *Usage* = `Returns, discounts or bonuses` (G02). 4. Download the generated XML for the credit note. **Observed behavior:** - The `<UsoCFDI>` tag in the XML shows `S01` (No fiscal effects). **Expected behavior:** - The `<UsoCFDI>` tag should show `G02` for credit notes under regime 616 when explicitly selected. **Root cause:** - For regime 616 (`Público en general`), the code always defaults to `S01`. - The condition only allowed `G02` when refunding a global invoice (`is_refund_gi`), not for normal credit notes. **Solution:** - Allow `G02` usage to be preserved for credit notes (tipo_de_comprobante = 'E') even when `CFDI to public` is active, as this is now permitted by SAT regulations for fiscal regime 616. **ref:** http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/catCFDI_V_4_20250820.xls opw-5012917
The website shop sitemap generation now uses less memory when handling very large product catalogs. This helps prevent server crashes caused by search engines or web crawlers requesting product sitemap pages.
Original PR description
### Issue Server crashes with MemoryErrors when a database has a large product catalogs. ### Solution This commit disables the prefetcher to avoid MemoryErrors when generating the sitemap for large product catalogs as web crawlers would continously crash the server when requesting the sitemap. ### References opw-5001680 opw-4955333 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Brazilian service invoices with installments now exclude taxes from the installment data sent for validation. This prevents rejection errors where installment totals do not match line totals, helping invoices process correctly.
Original PR description
Service invoices require us to send installments without taxes. If we include taxes we get an error: **Errors**: Rejection: Total Installments doesn’t match Total Lines ∑ installments[m]grossValue - ∑ (lines[n].lineAmount-line[n].lineTaxedDiscount) <> 0 This **PR** clears taxes before tax calculation to ensure the installments we send are correct. **task**-4761630
The Mexican e-invoicing flow now handles customer names entered with accents when matching them against official legal names that omit accents. This helps prevent invoice stamping errors for PoS customers using the self-invoicing portal.
Original PR description
Currently, the self-invoicing portal lets client request an invoice after making a purchase in PoS. A form allows them to enter their personal informations such as their name. Many of them enter their name with accents, however the government has all the names without any accents which causes errors when trying to match the requesting party with their legal name during the stamping process of the CFDI. task-4952174
Fixes an error that could stop users from printing and sending invoices when a related invoice report setting had been disabled. This helps ensure invoice delivery continues to work even when report options are customized.
Original PR description
Currently, An error occurs when the user print and send invoices and 'Invoice report' is disabled in reports 'report_invoice_with_payments'. Step to produce: - Install the `account` module. - Go to…
Currently, An error occurs when the user print and send invoices and 'Invoice report' is disabled in reports 'report_invoice_with_payments'. Step to produce: - Install the `account` module. - Go to Settings / Technical / Actions / Reports, Search 'report_invoice_with_payments', and disable the 'Invoice report'. - Go to Invoicing / Customers / Invoices, Create one invoice add a customer and invoice line, and Confirm it back to the list view of the invoice - Select this invoice and click on Print & Send. - After Opening a wizard, click the 'Print & Send' button. The issue occurs when the user tries to generate and send invoices and the system checks that 'is_invoice_report' is enabled for invoices at [1]. Link [1]: https://github.com/odoo/odoo/blob/658711aa1e1809b267006149ed6a547e548c1f90/addons/account/models/account_move_send.py#L658 To resolve this, we have to remove this comparison [1] as the user can disable 'is_invoice_report' from 'report_invoice_with_payments'. Sentry-6185986435 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now update the resource on multiple planning entries at the same time from My Planning without triggering an error. This improves reliability for teams managing schedules in bulk and avoids interruptions when editing several planning slots together.
Original PR description
Currently, An error occurs when trying to change(update) all resources in planning slot at once from the 'My Planning' list view. Step to produce: - Install the `sale_planning` module (with demo data). - Open a list view of 'My Planning', Select all records, and try to change(update) all resources at one time. `ValueError: Expected singleton: planning.slot(5, 7)` The error occurs because the system attempts to access a single value of fields (allocated_hours, allocated_percentage) from multiple records at [1]. Link [1]: https://github.com/odoo/enterprise/blob/a3de64e02ea62da0ebb06c589ed122dad44243ca/planning/models/planning.py#L2043-L2044 To resolve this issue, Use an iteration(for loop) to iterate records one by one. Sentry-6217013028
This fixes an invoice sending issue where users could choose postal delivery even after the related postal mail feature was uninstalled, causing an error. The send invoice wizard now only shows delivery methods that are currently available, helping users complete invoice sending without interruption.
Original PR description
Currently, a traceback is occurring when the user tries to send a customer invoice with the sending method as `By Post`. To reproduce this issue: 1) Install Accounting and Unistall `snailmail` 3)…
Currently, a traceback is occurring when the user tries to send a customer invoice with the sending method as `By Post`. To reproduce this issue: 1) Install Accounting and Unistall `snailmail` 3) Create a posted `Customer Invoice` with a customer having no Invoice Sending (Remove the value in customer's accounting page if he has the value) 4) Click the `Send` button and select the sending method as `To Post` 5) Click the `Send` button in wizard Error:- ``` ValueError: Wrong value for res.partner.invoice_sending_method: 'snailmail' ``` The selection value `snailmail` for `invoice_sending_method` is defined in `snailmail_acount`. But it will be uninstalled when the `snailmail` module installed. https://github.com/odoo/odoo/blob/636d76d6dcbbe472b9d57cbe403d0758d94ad81d/addons/snailmail_account/models/res_partner.py#L7-L9 But in the `account.move.send.wizard`, the sending_method values are getting from the computed method `_compute_sending_method_checkboxes`. https://github.com/odoo/odoo/blob/636d76d6dcbbe472b9d57cbe403d0758d94ad81d/addons/account/wizard/account_move_send_wizard.py#L130 We get all the selection values(including the inactive) for the field `invoice_sending_method`. When the user selects the `snailmail` checkbox (By Post)to send the invoice, the value of `invoice_sending_method` for res.partner will be assigned from the below line. https://github.com/odoo/odoo/blob/636d76d6dcbbe472b9d57cbe403d0758d94ad81d/addons/account/wizard/account_move_send_wizard.py#L269 This will lead to the above traceback as the `snailmail` value for the selection field `invoice_sending_method` in the partner is not valid. We can resolve this issue by accessing only the active selection values for the field `invoice_sending_method`. So only the user can select the valid value for sending_method. sentry-6091298443
Users adding images by URL will no longer see a technical crash when the remote image cannot be reached or takes too long to respond. Instead, Odoo shows a user-friendly error while still logging details for support teams to investigate.
Original PR description
Currently, multiple tracebacks are occurring when the tries to add an image through URL. Types of exceptions occurring currently are ConnectionError and TimeoutError. https://github.com/odoo/odoo/blob/e0584a789b4bca0ab0d6691642440eec04433332/addons/html_editor/controllers/main.py#L255 We can resolve this issue by showing a user exception and a logger warning(for debugging) instead of a traceback. sentry-6093300975
Odoo Studio now avoids crashing when a user saves a report after removing all report content. The change checks that the expected report element exists before trying to update it, so the save action can complete without an index error.
Original PR description
The error occurs when `main_qweb.xpath("//*[@id='wrapwrap']")[0]` is accessed,
but the XPath query returns an empty list. This leads to an `IndexError: list
index out of range`.
-Steps to produce:
1. Open Odoo Studio
2. Create an empty new report using studio
3. Click on EDIT SOURCES
4. Select studio customization in uses to edit report
5. remove all elements from <t t-name="studio_main_report">
6. click on save
Error: "IndexError: list index out of range"
-Solution:
Wrapped the XPath query inside a conditional check before accessing `[0]`.
Now, the code verifies whether the list is non-empty before proceeding with
element replacement.
If the element is missing, the operation is skipped, preventing the crash.
sentry-6197314021A live chat rule with certain special characters in the URL field could cause the website to fail when opened. This update safely handles those characters so the website remains available even if a rule contains problematic input.
Original PR description
Setting special regex characters for`regex_url` inside live chat rules throws unhandled regex error.
**Steps to reproduce:**
- Install `website` and `im_livechat`
- Go to `livechat>YourWebsite.com Dropdown Menu>configure channel`
- Go to `channel rules>Add a line`
- Inside URL Regex field enter any of the quantifier regex such as `+`, `*`, `
`{any number}`, `[]`,`{any number range start,any number range limit}` and save
the rule.
-Open `website`.
Error:
`re.error: nothing to repeat at position 0`
**Solution:**
- We use `re.escape()` to safely handle user input that may contain special regex characters.
**Sentry-6538643923**Field service sales orders with zero-priced service lines now correctly move to an invoiced status once their related invoice is posted. This prevents orders from incorrectly remaining marked as needing invoicing, giving teams a clearer view of completed billing work.
Original PR description
Steps: - Install sale and fsm module. - Enable anglo-saxon from the setting. - Create a service type product with fsm project as template. - Select that product on SO and set unit price to 0 on SOL. - Confirm that order and create and post invoice. Issue: - Sale order status still shows `To invoice` even though we create SOL related invoice. Cause: - In [PR] we made invoice status for anglo-saxon line `To Invoice` so it always say `To Invoice` even user create related invoice. Fix: - Make those lines `Invoiced` if there is related invoice by checking qty_invoiced is greater or equal to qty. [PR]: https://github.com/odoo/enterprise/pull/70132 opw-5055540 Forward-Port-Of: odoo/enterprise#94723
Sales orders now better identify coupon and global discount lines, so related integrations can report the correct discounted amount. This also prevents discount line values from being accidentally reset when their quantity changes, improving accuracy for order totals and delivery/payment workflows.
Original PR description
Issue ----- When using Shiprocket with the "Cash On Delivery", the request sent to the Shiprocket API doesn't contain the amounts discounted by coupons. Steps to reproduce ----- - Set an Indian…
Issue ----- When using Shiprocket with the "Cash On Delivery", the request sent to the Shiprocket API doesn't contain the amounts discounted by coupons. Steps to reproduce ----- - Set an Indian company up (with valid address and some dummy mail & phone) - Create a customer "IN Cust" (with valid address and some dummy mail & phone) - Create a product "IN Prod" - Sale price: 1000 INR - Weight: 100g - Set some reference, eg "INPROD" - Create a Shiprocket delivery method - Payment Method: COD - Set some "Shiprocket Channel" - Enable Debug requests - In settings, enable "Promotions, Loyalty & Gift Card" - Go to Sales > Products > Discount & Loyalty - Create a new program - Name: 50% off - Program Type: Coupons - Change the existing reward to 50% discount on order - Generate some coupon - Copy the code to the generated coupon - Create a SO our product and customer - Use the coupon code & apply the 50% discount - Add shipping - Shiprocket COD - Get rate - Confirm the SO - Go to the picking & validate it - Open logs (Settings/Technical/Database Structure/Logging) - Open the "shiprocket_request_external/shipments/create/forward-shipment" log --> total_discount is 0 Cause ----- The problem comes from https://github.com/odoo/enterprise/blob/a971f55e736f9645eda137fd6dcb574483886483/delivery_shiprocket/models/shiprocket_request.py#L301 There are 2 issues here. The first and most important one is how we find the discount lines. https://github.com/odoo/enterprise/blob/a971f55e736f9645eda137fd6dcb574483886483/delivery_shiprocket/models/shiprocket_request.py#L320 Discounts from coupons don't use the `sale_discount_product_id`, we'll have to define a new function to override in `sale_loyalty` for this. The second issue is that we use the untaxed discount amount. https://github.com/odoo/enterprise/blob/a971f55e736f9645eda137fd6dcb574483886483/delivery_shiprocket/models/shiprocket_request.py#L321 This leads to an incoherent total amount, since the tax is computed on the products' full prices. We should instead be forwarding the total discount value (with tax included to offset the taxes applied on the full product price). ----- Enterprise PR: https://github.com/odoo/enterprise/pull/92310 Ticket: opw-4755357 Forward-Port-Of: odoo/odoo#223517
Shiprocket cash-on-delivery shipments now include coupon-based discounts in the amounts sent to Shiprocket. This prevents customers and merchants from seeing incorrect COD totals when promotional coupons are applied, including tax-inclusive discount handling.
Original PR description
Issue ----- When using Shiprocket with the "Cash On Delivery", the request sent to the Shiprocket API doesn't contain the amounts discounted by coupons. Steps to reproduce ----- - Set an Indian…
Issue
-----
When using Shiprocket with the "Cash On Delivery", the request sent to the Shiprocket API doesn't contain the amounts discounted by coupons.
Steps to reproduce
-----
- Set an Indian company up (with valid address and some dummy mail & phone)
- Create a customer "IN Cust" (with valid address and some dummy mail & phone)
- Create a product "IN Prod"
- Sale price: 1000 INR
- Weight: 100g
- Set some reference, eg "INPROD"
- Create a Shiprocket delivery method
- Payment Method: COD
- Set some "Shiprocket Channel"
- Enable Debug requests
- In settings, enable "Promotions, Loyalty & Gift Card"
- Go to Sales > Products > Discount & Loyalty
- Create a new program
- Name: 50% off
- Program Type: Coupons
- Change the existing reward to 50% discount on order
- Generate some coupon
- Copy the code of the generated coupon
- Create a SO our product and customer
- Use the coupon code & apply the 50% discount
- Add shipping
- Shiprocket COD
- Get rate
- Confirm the SO
- Go to the picking & validate it
- Open logs (Settings/Technical/Database Structure/Logging)
- Open the "shiprocket_request_external/shipments/create/forward-shipment" log
--> total_discount is 0
Cause
-----
The problem comes from
https://github.com/odoo/enterprise/blob/a971f55e736f9645eda137fd6dcb574483886483/delivery_shiprocket/models/shiprocket_request.py#L301
There are 2 issues here.
The first and most important one is how we find the discount lines.
https://github.com/odoo/enterprise/blob/a971f55e736f9645eda137fd6dcb574483886483/delivery_shiprocket/models/shiprocket_request.py#L320
Discounts from coupons don't use the `sale_discount_product_id`. We can use the `_can_be_invoiced_alone` function to find both regular and loyalty discounts
https://github.com/odoo/odoo/blob/ee63fe7863dfa0083674dc927c1aa67c9e36c481/addons/sale/models/sale_order_line.py#L1033-L1041
def _can_be_invoiced_alone(self):
""" Whether a given line is meaningful to invoice alone.
It is generally meaningless/confusing or even wrong to invoice some specific SOlines
(delivery, discounts, rewards, ...) without others, unless they are the only left to invoice
in the SO.
"""
self.ensure_one()
return self.product_id.id != self.company_id.sale_discount_product_id.id
https://github.com/odoo/odoo/blob/ee63fe7863dfa0083674dc927c1aa67c9e36c481/addons/sale_loyalty/models/sale_order_line.py#L50-L51
def _can_be_invoiced_alone(self):
return super()._can_be_invoiced_alone() and not self.is_reward_line
We just have to be careful not to accidentally include delivery fees because of
https://github.com/odoo/odoo/blob/ee63fe7863dfa0083674dc927c1aa67c9e36c481/addons/delivery/models/sale_order_line.py#L18-L19
def _can_be_invoiced_alone(self):
return super()._can_be_invoiced_alone() and not self.is_delivery
The second issue is that we use the untaxed discount amount.
https://github.com/odoo/enterprise/blob/a971f55e736f9645eda137fd6dcb574483886483/delivery_shiprocket/models/shiprocket_request.py#L321
This leads to an incoherent total amount, since the tax is computed on the products' full prices. We should instead be forwarding the total discount value (with tax included to offset the taxes applied on the full product price).
-----
Community PR:
https://github.com/odoo/odoo/pull/223517
Ticket:
opw-4755357
Forward-Port-Of: odoo/enterprise#92310This fix prevents users from changing the amount in currency on posted journal items in ways that could leave invoice totals and related analytic entries inconsistent. The field remains editable only where appropriate, such as draft tax lines, helping preserve accurate accounting records.
Original PR description
- Create an invoice with some products and post it - Go to Accounting > Journal items and ser for the ones belonging to the invoice. - Set the checkbox for the product sales one and set whatever tax…
- Create an invoice with some products and post it - Go to Accounting > Journal items and ser for the ones belonging to the invoice. - Set the checkbox for the product sales one and set whatever tax grid (you'll have to reveal that column). - Accept the changes. - Now go back to the invoice. - You'll see a new tracking message. Something like Journal Item #1093 updated - It contains a link and from that link you can go to the journal item form. - In that form you can edit the *amount in currency* field. Issue: - If a user do so, it leaves inconsistent invoice amounts: totals aren't recomputed, analytic lines aren't recomputed either. How it should behave: - Amount in currency shouldn't be editable here. Mainly when the journal entry is already posted! opw-4951629 A vídeo showing the issue: 📹️ https://www.loom.com/share/f7cd1d8f4138458f9b6c190233b0b9df?sid=eec77c17-a4a6-4698-8604-10aaa7e33f47 MT-10887 cc @moduon --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#225346 Forward-Port-Of: odoo/odoo#223187
Sendcloud deliveries can now use customs HS codes up to 12 characters, matching Sendcloud's current API rules. This helps prevent international parcels, especially shipments to the US, from being delayed because their customs code was shortened or rejected.
Original PR description
**PROBLEM** We limit the `hs_code` length to 8 characters, but if we refer to the [sendcloud v2 api doc](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/parcels/schemas/parcel-item), we see that `hs_code` length can be up to 12 characters. Some clients have issue with parcels being held longer in custom when sending them to the US. [opw-5051585](https://www.odoo.com/odoo/project/49/tasks/5051585) Forward-Port-Of: odoo/enterprise#94894
This fixes a problem where users with employees in multiple companies could hit a validation error when adding timesheets to Helpdesk tickets. Timesheets now keep the intended company instead of being overwritten when the linked project has no company set, reducing disruption during daily work and migrations.
Original PR description
Steps to Reproduce: ------------------ - Open Helpdesk. - Go to Configuration → Helpdesk Teams. - Create a new team. - Enable the Billing feature and assign a project to this team. - Set the…
Steps to Reproduce: ------------------ - Open Helpdesk. - Go to Configuration → Helpdesk Teams. - Create a new team. - Enable the Billing feature and assign a project to this team. - Set the project’s Company field to Null. - Create an employee for the current user in another company. - Ensure the user has employees in both companies. - Create a new ticket (or open an existing one) in the newly created team. - Try creating a new timesheet → a Validation Error is raised. Root Cause: ----------------- When a user has employees associated with multiple companies and tries to log a timesheet with multi-company enabled, a validation error occurs. **This happens because:** - The default company is derived from the project linked to the Helpdesk team. Since the company_id field on the project is no longer required, it may be Null, leading to an error when fetching the correct [employee for the company](https://github.com/odoo/odoo/blob/6a36015e2ee69aafe3880bf1fff38439af5cd673/addons/hr_timesheet/models/hr_timesheet.py#L214-L216 ). - Additionally, the [company check](https://github.com/odoo/enterprise/blob/83a1b88c8cae4db5c9b1bf82ee7ebb4e13c41b2a/helpdesk_timesheet/models/analytic.py#L81-L82) is incorrect. The code is checking whether the `company_id` key exists in a `list of vals`, whereas it should be checked directly on the vals dict itself. Issue Faced: ------------- In version 18.3, timesheets are created during migration [here](https://github.com/odoo/upgrade/blob/24f85bbc3408bf10b1cee93e4c395edf806beaa8/migrations/helpdesk_timesheet/saas~18.3.1.0/post-migrate.py#L44-L58 ). Even though the correct company_id is passed, it gets overridden during the process. and If the associated project does not have a company set, the company_id becomes False [here](https://github.com/odoo/enterprise/blob/83a1b88c8cae4db5c9b1bf82ee7ebb4e13c41b2a/helpdesk_timesheet/models/analytic.py#L81-L82), which results in a Validation Error because the [here](https://github.com/odoo/odoo/blob/6a36015e2ee69aafe3880bf1fff38439af5cd673/addons/hr_timesheet/models/hr_timesheet.py#L214-L216) unable to determine the correct employee linked to the company. OPW: 5004092 Forward-Port-Of: odoo/enterprise#92507
ENASARCO taxes are now correctly treated as both withholding and pension fund contributions in Italian electronic invoices. This ensures compliant XML reporting and correct default setup when installing the Italian localization modules.
Original PR description
* = l10n_it, l10n_it_edi, l10n_it_edi_withholding The ENASARCO tax works both as a Withholding (negative) tax and as a Pension Fund tax. It must appear in the XML in both sections DatiRitenuta and CassaPrevidenziale. - We modified the master data to amend this error. Now the correct Withholding type appears right after installing the module. - Since there was an explicit check on taxes being both, we removed it. - Removed an exception where ENASARCO taxes were allowed to have positive values Forward-Port-Of: odoo/odoo#226357
Fixes an issue where matching a purchase order to a vendor bill could fail when both used the same individual contact linked to a company. The matching process now treats the individual and its parent company consistently, preventing the error and allowing the workflow to complete.
Original PR description
**Issue** When both a Purchase Order and a Vendor Bill are created using the same individual contact linked to a company, Bill Matching fails with a traceback. **Steps to Reproduce** 1. Create an…
**Issue** When both a Purchase Order and a Vendor Bill are created using the same individual contact linked to a company, Bill Matching fails with a traceback. **Steps to Reproduce** 1. Create an individual contact and link it to a company. 2. Create a Purchase Order with the individual as a vendor. 3. Create a Vendor Bill with the same individual as the vendor. 4. Try to perform Bill Matching. 5. A `ValueError: Expected singleton: res.partner(...)` is raised. Video for reference: https://drive.google.com/file/d/1qVnPLpk8jyMTKz-6AVLSaN2nVVeWiF4y/view **Root Cause** Purchase Orders store the partner exactly as selected (the individual contact), while Vendor Bills are normalized internally to the parent company (`commercial_partner_id`). This creates a mismatch in the Bill Matching logic, where records reference both the individual and the company, leading to an invalid recordset and the singleton error. **Fix** Always normalize vendors to their `commercial_partner_id` during Bill Matching. This ensures that both Purchase Orders and Vendor Bills consistently reference the same partner, avoiding mismatches between individual contacts and their parent company. Opw-5050339 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where confirming a batch transfer could lose barcode settings, causing location barcodes such as WH-Stock to be read incorrectly. Warehouse users can now confirm batch deliveries and continue scanning locations normally without failed scans caused by split characters.
Original PR description
### Steps to reproduce: - In the settings enable: "Batch, Wave & Cluster Transfers" - Create 2 deliveries - Barcode > operations > Delivery orders > Batches > New - Add your two deliveries and…
### Steps to reproduce: - In the settings enable: "Batch, Wave & Cluster Transfers" - Create 2 deliveries - Barcode > operations > Delivery orders > Batches > New - Add your two deliveries and confirm - Scan WH-Stock #### > The scan fails considering you scanned each letter independently. ### Cause of the issue: When the barcode is scanned a call of the split barcode will be launched to split the barcode in multiple barcodes according to the `barcode_separator_regex` present in the config: https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode/static/src/models/barcode_model.js#L613-L632 The issue lies in the fact that even thought the is `barcode_separator_regex` was conrrectly populated at the onWillStart of the mainComponent: https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode/static/src/components/main.js#L209-L213 https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode/controllers/stock_barcode.py#L97 https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode/static/src/components/main.js#L229 https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode/static/src/models/barcode_picking_model.js#L36-L38 It was reset by the batch confirmation here: https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode_picking_batch/static/src/models/barcode_picking_batch_model.js#L123-L135 because this part of the config is not meant to be returned by the private method `_get_barcode_data` but rather by public complete version `get_barcode_data`: https://github.com/odoo/enterprise/blob/aeb9343f4b7dfab0fbc04bca4623ae85b3ea6030/stock_barcode/controllers/stock_barcode.py#L91-L98 Now, since no `barcode_separator_regex` was provided to our new config, each character will be considered to be considered as an independent barcodes and the `WH-Stock` barcode will not match any location. opw-5062331
Resetting a user's Odoo Calendar no longer incorrectly triggers an error about changing events the user cannot edit. This makes calendar resets complete as expected and avoids unnecessary support issues for Google Calendar users.
Original PR description
Before this commit, when resetting the Odoo Calendar of an user, it would trigger a ValidationError for updating events that the current user wasn't able to update, even though it was not an updated per se, but just a deletion of it in Odoo. After this commit, we no longer trigger that ValidationError during resets of Odoo Calendars, fixing the error. task-5103918
Customer statement emails sent from child contacts now avoid sending empty statement attachments. The statement button is also hidden when there is no activity or no amount due, reducing confusion for accounting users.
Original PR description
**Steps to reproduce:** 1. Go to Accounting > Customers > create a company with child contact (invoice) (both having name and email). 2. Create an invoice with the child contact as customer and…
**Steps to reproduce:** 1. Go to Accounting > Customers > create a company with child contact (invoice) (both having name and email). 2. Create an invoice with the child contact as customer and confirm it. 3. Go to the child contact and open the Customer Statement smart button. 4. Download the PDF → data is shown correctly. 5. Send the statement → the attachment in the sent mail is empty. **Issue:** - When sending customer statements via email from a child contact, the generated PDF attachment contains no data, showing empty amounts and transactions. - Additionally, the "Customer Statement" button was still visible even when the total due was zero. **Cause:** - The button visibility condition checks for `total_due == 0.0 and not has_moves`, which didn’t properly cover all use cases. **Solution:** - Update button visibility condition to: `invisible="not has_moves or total_due == 0"` ensuring it is hidden when there are no moves or the total due is zero. **opw-5009182**
This fix stops internal users from being assigned to a website in a way that could later break module installation, such as Helpdesk. Users are now warned earlier when the setup is invalid, reducing unexpected installation failures and improving reliability.
Original PR description
Scenario: - Install website and set a website on an internal user - Install helpdesk Result: installation fails with a traceback containing the message "Remove website on related partner before they…
Scenario: - Install website and set a website on an internal user - Install helpdesk Result: installation fails with a traceback containing the message "Remove website on related partner before they become internal user.". Cause: 479e8d0cae98f7e086e5fb4a0ca4e33ed24bfc12 added a constraint so when the groups are changed, we raise an error if the user is internal and as a website_id set. But if we do it the other way (setting a website_id on an internal user), no restraint prevent this, but if at any moment the groups of the user are changed (which helpdesk does by adding implied_ids groups) we get an unexpected error. Fix: change the constraint to be triggered by both website_id and groups_id change so the user is aware sooner than he should not do it. Note: the current code also prefetched all internal users and would not work with non-active user, so this code simplifies that by just prefetching the groups of the current users. opw-5077601 PR note: putting this in draft since this is breaking some tests that I need to check
Public holiday timesheets now reflect each employee's flexible work schedule instead of defaulting to the company's standard 8-hour day. This prevents overstated time off entries for employees whose configured average day is shorter, improving accuracy in timesheets and leave reporting.
Original PR description
## Issue: For employees with flexible working hours, when a Public Holiday is added, the timesheet was filled with 8h based on the company’s default calendar instead of the employee’s flexible…
## Issue: For employees with flexible working hours, when a Public Holiday is added, the timesheet was filled with 8h based on the company’s default calendar instead of the employee’s flexible schedule ## Cause: When creating `resource.calendar.leaves`, timesheets call `_work_time_per_day()` This method uses `work_hours_data` containing half-day intervals (tmp_start/tmp_end) These data come from `_attendance_intervals_batch()`, but we were passing an empty resource, so the check for `flexible_hours` failed: https://github.com/odoo/odoo/blob/bd7d5fdf8df3a4d544de3e2493cd4b3966fa7d0b/addons/resource/models/resource_calendar.py#L382-L393 We want to use the calendar itself as the calendar resource to get the `work_hours_data` ## Steps to reproduce: - On an employee, in Work Information, set the Working Hours to Flexible 40 hours/week - Modify Flexible 40 hours/week (Hours per Week: 30, Average Hour per Day: 6) - In Time Off > Configuration > Public Holidays, add a New holiday (You can leave default values) - Go in Timesheets > All Timesheets, before the fix, the flexible employee have 8h in internal for Time Off opw-4881758