Daily updates from Odoo
Thursday, October 23, 2025
36 changes · saas-18.4
Resolved issues and error corrections
This fix ensures Argentina vendor bills for foreign partners default to the expected “Invoices and Receipts from Abroad” document type. It also aligns foreign customer and supplier invoice suggestions with the selected journal, reducing manual corrections and compliance risk.
Original PR description
Description of the issue/feature this PR addresses: In this [commit](https://github.com/odoo/odoo/commit/5c07f9c0c1065d88022dc6d1299fec1d42dfc0af) we split 'Proveedor del Exterior' from 'Cliente del…
Description of the issue/feature this PR addresses: In this [commit](https://github.com/odoo/odoo/commit/5c07f9c0c1065d88022dc6d1299fec1d42dfc0af) we split 'Proveedor del Exterior' from 'Cliente del Exterior' which are both AFIP responsabilities for foreing supplier and customer respectively. In this [commit](https://github.com/odoo/odoo/commit/7e45c6ec768950b6296d991a8375577aed45c4dd), we added the possibility to create 'B' invoices for foreign partners. With this PR we are fixing the logic to suggest the correct document type for foreign vendor bills so it has a similar behavior as for customers. Current behavior before PR: In customer invoices the document type suggested by default depends on the journal: --> Expo journal will suggest 'Expo invoices' for Foreign Customers but 'B Invoices' for Foreign Suppliers --> Local electronic journal will suggest 'B Invoices' for Foreign Customers as well as for Foreign Suppliers In vendor bills the document type suggested by default will be 'INVOICES AND RECEIPTS FROM ABROAD' for Foreign Customers and 'B Invoices' for Foreign Suppliers Desired behavior after PR is merged: In customer invoices the document type suggested by default depends on the journal: --> Expo journal will suggest 'Expo invoices' for both Foreign Customers and Suppliers --> Local electronic journal will suggest 'B Invoices' for Foreign Customers as well as for Foreign Suppliers In vendor bills the document type suggested by default will be always 'INVOICES AND RECEIPTS FROM ABROAD' as expected. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#228635
Work entry generation now handles employees with different working schedule types, including fully flexible employees without a calendar. This prevents errors and helps ensure payroll-related work entries are generated accurately across varied contract setups.
Original PR description
- fixed work entries generation for employees with different working schedules types - fixed a traceback when the method `_attendance_intervals_batch` is called without a calendar (because the employee is fully flexible) or with more than 1 calendar - made work entries generation check for employee timezone in case the employee is fully flexible and doesn't have a calendar - added method `_get_calendar_at` to get the calendar of the resource at a given date - added `test_work_entry_different_calendars` for work entries generation for employees with contracts with different calendar types task-id: 5065160
Performance tests were updated to reflect an additional calendar lookup used when calculating attendance intervals. This helps ensure automated checks stay accurate for employees or appointments using different calendar setups.
Original PR description
- adjusted some query counters to account for the extra search in `_attendance_intervals_batch` done by the method `_get_calendar_at` task-id: 5065160
This fixes an issue that prevented managers from creating appraisals when they should have permission to do so. It helps keep performance review workflows running smoothly and adds test coverage to prevent the issue from returning.
Original PR description
fixed with https://github.com/odoo/enterprise/commit/d4b708d22c0c3768cbb50bd5a43e91db419ff277 added test to cover the use case opw-4794641 Forward-Port-Of: odoo/enterprise#87831
A scheduled HR update was incorrectly replacing employees' work phone numbers with the company phone number. This fix preserves the correct employee contact details and reduces unnecessary background recalculations.
Original PR description
When executing the ir_cron_data_employee_update_current_version job, employee's work_phone fields would always be overridden by the company phone. We found out that setting the employee phone as the company phone as a default was pretty much never useful. By searching for other computed properties that could be triggered by the cron job, I found out that two computed properties were the exact same as their equivalent in hr_version. I thus removed them. The computed property triggered by the cron would assign current_version_id, even if it was the same. Even in this case will all the computed properties be triggered (even if current_version_id stays the same), so I added a check before to avoid unnecessary recomputations. task-5103739
Fixed an issue where using Set Account on bank statement lines with similar references could create an invalid matching rule and block reconciliation. Users can now continue reconciling affected bank statements without encountering the regex validation error.
Original PR description
Currently, when a user uses the 'Set Account' button to reconcile a statement line, the system may also create a reconciliation model for fees for the given journal/account combination, based on the…
Currently, when a user uses the 'Set Account' button to reconcile a statement line, the system may also create a reconciliation model for fees for the given journal/account combination, based on the previous statement line reference pattern. To extract a patter from the references, the system computes the normalised longest common substring. This will be used as regex matching pattern of the newly created reconciliation rule. However, the common substring may end up with '\\', which is not a valid termination of a regex, leading to the error: `Invalid operation. The regex is invalid.` Steps to reproduce: - Have an account '646000 Test Account' - Create a Bank statement with label 'TEST REFERENCE BNK 2024' - Set Account 646000 - Create a Bank statement with label 'TEST REFERENCE BNK.OTHER' - Set Account 646000 Issue: Error `Invalid operation. The regex is invalid.` will raise blocking the action [opw-5086638](https://www.odoo.com/odoo/project.task/5086638) [opw-5062965](https://www.odoo.com/odoo/project.task/5062965) [opw-5123963](https://www.odoo.com/odoo/project.task/5123963) [opw-5166160](https://www.odoo.com/odoo/project.task//5166160) [opw-5159871](https://www.odoo.com/odoo/project.task/5159871) [opw-5160108](https://www.odoo.com/odoo/project.task/5160108) [opw-5109454](https://www.odoo.com/odoo/project.task/5109454) [opw-5086638](https://www.odoo.com/odoo/project.task/5086638) ... Forward-Port-Of: odoo/enterprise#97865
Fixed a display issue in the Timesheets monthly view where text could overlap into timer button areas when users increased text size and scrolled horizontally. This improves readability and keeps totals and footer rows visually clean.
Original PR description
Steps to reproduce: - Open timesheets and change to Month scale. - Increase text size a little bit. - Scroll to the right side Issue: - You can see runover text being visible in timer button cell of Total row and Footer row. Reason: - It is due to z-index problem as z-index-* is deprecated from https://github.com/odoo/odoo/pull/165568 (from saas-17.4+). Fix: - Replace it with Bootstrap z-index class notated as z-*(-1 to 3) task-4949182 Forward-Port-Of: odoo/enterprise#96371
Long mailing list names now remain contained within the list view instead of overlapping nearby information. This keeps the Marketing mailing lists screen readable and easier to use when records have lengthy names.
Original PR description
Issue: When you create a long name for your maling list, the name overflows over the other fields in the view. Repro: Go to marketing -> mailing lists -> create a fairly long name -> notice name overflows in the view. Cause: Small bootstrap issue, name field not limited to it's container. Fix: Added a simple w-100 to limit the field to 100% of it's container. opw-5153270 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#232312
This fixes a payroll work entry error that could occur when an employee with fully flexible hours had overlapping absences, such as sick leave and a public holiday. Payroll teams can now generate work entries without the process being blocked by this overlap scenario.
Original PR description
FIX] hr_work_entry_holidays: singleton error in overlaping leaves **Issue:** ValueError "Expected singleton: hr.work.entry.type(7, 8)" occurs during work entry generation when overlapping leaves…
FIX] hr_work_entry_holidays: singleton error in overlaping leaves **Issue:** ValueError "Expected singleton: hr.work.entry.type(7, 8)" occurs during work entry generation when overlapping leaves (sick leave + public holiday) create intervals containing multiple work entry types. **Steps to Reproduce:** 1. Go to the **Employees** app and create a new employee. * Set the working hours to **empty (fully flexible)**. 2. Create contract fields on the employee: * Set **Work Entry Source** to *Attendance*. * Set date_version and contract_date_start. 3. Go to **Time Off** → **New**, and create a sick time off for the employee. * Example: from **25th to 29th**. * Approve the time off. 4. Go to **Configuration** → **Public Holidays**, and create a new public holiday. * Example: **27th**, which overlaps with the sick time off. * Work Entry Type = **Paid Time Off**. 5. Go to **Payroll** → **Work Entries**. * A **traceback** occurs. **Root Cause:** In `_get_interval_leave_work_entry_type()`: Direct access to `interval[2].work_entry_type_id.code` causes singleton violation when overlapping leaves create intervals containing multiple work entry types. **Fix:** Replace direct access to `interval[2].work_entry_type_id.code` with safe recordset slicing `interval[2].work_entry_type_id[:1].code` to prevent singleton violation. **Note (18.4+):** Steps updated for versioned contract architecture where contract fields are set directly on employee. This resolves payroll blocking issues for deployments with overlapping leave scenarios. Test : [PR](https://github.com/odoo/enterprise/pull/93902) opw-4979974 Forward-Port-Of: odoo/odoo#223448
Adds test coverage to ensure flexible employees using attendance-based work entries can have overlapping sick leave and public holidays without causing payroll work entry errors. This helps protect payroll processing reliability for complex absence scenarios.
Original PR description
**Purpose:** Add regression test to verify that overlapping leave scenarios (sick leave + public holiday) do not cause singleton errors for fully flexible employees using attendance-based work entries. **Test Coverage:** - Fully flexible employee with no calendar assignment - Attendance-based work entry source configuration - Overlapping sick leave and public holiday scenario - Work entry generation and validation without singleton errors **saas-18.4+ Adaptation:** Adapted for versioned contract architecture - contract fields now set directly on employee. Related : [PR](https://github.com/odoo/odoo/pull/223448) opw-4979974 Forward-Port-Of: odoo/enterprise#93902
This fixes a formatting issue in printed folder-style reports where page numbers could wrap onto two lines when using the Montserrat font. Keeping the page number on one line makes report footers cleaner and more professional.
Original PR description
The folder layout is using the same footer than the `external_layout_standard` but when using Montserrat, the page number wraps in 2 lines on the folder layout. It's missing a `text-nowrap` class. task-4942402 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#228391
This fix prevents active customer live chat conversations from being accidentally canceled when a customer starts another chat. It ensures only still-pending chat requests are canceled, improving reliability for customers using chat across multiple pages or devices.
Original PR description
The website livechat module allows agents to start conversations with customers, but conversations are only displayed on the next navigation. Previously, pending chat requests were canceled whenever a customer opened a new live chat. The search condition for pending chats was too broad: it did not consider who started the conversation or whether it was already ongoing. As a result, ongoing chats could be unintentionally canceled. Customers could have multiple conversations (e.g. on different devices). This change ensures that only pending chat requests are canceled, leaving ongoing chats intact. task-5186567 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 Forward-Port-Of: odoo/odoo#232624
When an applicant is refused and a refusal email is sent, the email is now also recorded in the application's chatter. This gives recruiters a clearer communication history and helps teams confirm what was sent to candidates.
Original PR description
To reproduce: ============= refuse an application with `send_email` checked, the email is sent but not logged in the chatter Solution: ========= Add a `message_post` in the `_prepare_send_refusal_mails` method opw-5137342 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Vendor credit note DTE files in Chilean localization now import as credit notes instead of being incorrectly treated as invoices. This prevents import errors and helps accounting teams process supplier credit notes through drag-and-drop as expected.
Original PR description
### Steps to reproduce Go to Accounting -> Vendor Bills Attempt to import a valid vendor credit note by dragging-dropping the DTE file in the list view. Notice how the vendor credit note gets created with an error: ``` Error importing attachment 'DTE.xml' (type=l10n_cl.dte): This specific error occurred during the import: You can not use a credit_note document type with a invoice ``` ### Analysis `_l10n_cl_import_dte` should set the move type to credit note when the document type code is '61', but does not. This was broken by 42744fcecdbd36e See https://github.com/odoo/enterprise/commit/42744fcecdbd36ea0101070c68299227a9f204a6#diff-044bc1ef3ea4878783a064258b4436b44b3064c5196c22d0d104daee8fde4501L294 ### Solution Correctly set move_type to `in_refund` if the document type code is '61' Linked issue https://github.com/odoo/odoo/issues/232348 task-none
Accounting users can now create SEPA Direct Debit mandates without encountering an access error. This ensures authorized invoicing and banking staff can complete direct debit setup without needing administrator rights.
Original PR description
Have the Payment Provider Sepa Direct Debit module installed. Connect with a user with access right for Accounting: Invoicing & Banks. Create a Direct Debit Mandate => Get an access error. Reason: the compute does a read_group with a value on payment.provider, which non System Admin have no access to. Solution: Add a sudo for these _read_group Forward-Port-Of: odoo/enterprise#97127
Public website customers could get stuck after paying for an online order when accounting journal restrictions were enabled. The fix ensures payment confirmation can complete correctly without triggering an internal access error, improving checkout reliability.
Original PR description
Error in backend while public user payment confirmation Steps: - Install `website_sale` - Activate `restrict_mode_hash_table` on sale journal - From an incognito window, Make an order in ecommerce and pay it -> we get stucked on 'Your payment has been successfully processed' page because of an acces error in the backend This is because when posting a new move, we either to access or modify moves we get from `chain['moves']`, however these moves are returned with `sudo(False)` by `AccountMove._get_chain_info()`. opw-5128189 Forward-Port-Of: odoo/odoo#232143
Event registration pages now translate the date selection labels when visitors use another language. This improves the multilingual registration experience by showing consistent localized wording for event slots.
Original PR description
Scenario: - adds slots to an event - register to that event with another language Result: "Selected Date" or "Select a Date" is not translated or translatable. Fix: wrap those JS strings with _t function. opw-5167911 Forward-Port-Of: odoo/odoo#231729
Manufacturing users can now open the work-in-progress accounting wizard even when a work order is still running. The fix prevents an error caused by unfinished work orders that do not yet have an end time, reducing disruption during production cost tracking.
Original PR description
#### Issue: - Traceback when calculating the cost of a workorder #### Step to reproduce: - with apps: mrp, accountant - create a MO for a product - add a WO - confirm - start the WO - Action > "Post…
#### Issue: - Traceback when calculating the cost of a workorder #### Step to reproduce: - with apps: mrp, accountant - create a MO for a product - add a WO - confirm - start the WO - Action > "Post WIP Accounting entry" #### Current Behavior: - get a traceback #### Expected behaviour - open the WIP wizard #### Cause of the issue: - to calculate the cost of production, wizard use all WO including the one still running. However as it is still running its end date is registered as `False`. It raises a traceback when it compares the end of the WO with a limit date because `bool` and `datetime.datetime` are not compatible for '<'. #### Solution: - check if the end date of the WO is defined In module mrp_workorder an override of [button_start](https://github.com/odoo/enterprise/blob/18.0/mrp_workorder/models/mrp_workorder.py#L284-L295) change how work order are launched. Therefore, the test should be launched on an Enterprise run. opw-4961873 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#221938
This fix prevents an error when posting work-in-progress accounting entries for a manufacturing work order that is still in progress. Users can now open the WIP wizard as expected, reducing disruption during manufacturing and accounting workflows.
Original PR description
Issue: - Traceback when calculating the cost of a workorder Step to reproduce: - with apps: mrp, accountant - create a MO for a product - add a WO - confirm - start the WO - Action > "Post WIP Accounting entry" Current Behavior: - get a traceback Expected behaviour - open the WIP wizard Cause of the issue: - to calculate the cost of production, wizard use all WO including the one still running. However as it is still running its end date is registered as `False`. It raises a traceback when it compares the end of the WO with a limit date because `bool` and `datetime.datetime` are not compatible for '<'. Solution: - check if the end date of the WO is defined Test: - in module mrp_workorder an override of button_start change how work order are launched. Therefore, the test should be launched on an Enterprise run. opw-4961873 Forward-Port-Of: odoo/enterprise#97558 Forward-Port-Of: odoo/enterprise#93812
Large PNG images uploaded to Odoo are now resized without being converted to a lower-quality web palette. This prevents visible image degradation on website content and removes the need for users to manually resize images before upload.
Original PR description
When uploading a png image ir_attachment, the image is not modified if its resolution is under the maximum 1920x1920. However, if the resolution is bigger, it both gets resized and is converted to a WEB palette, which visibly degrades the quality of the image. A workaround for this is to resize the image locally to be max 1920 on either dimensions and then upload it, which effectively bypasses this special treatment. Steps to reproduce: - Go to the website app - Add a Text - Image snippet - Double click the image - Upload a .png image of a resolution strictly greater than 1920 in either width or height Old behavior: the png is visibly degraded New behavior: the png is not visibly degraded opw-3935533 Forward-Port-Of: odoo/odoo#173508
The fix restores the speed slider for animated background shapes in the website editor. Users can now adjust animation speed as expected, improving editing accuracy for page designs.
Original PR description
Steps to reproduce: - Drop a snippet - Add a background shape (e.g. Rainy 05) - Use the slider to change the speed - Nothing happens This commit is adapting `CSS_ANIMATION_RULE_REGEX` as it was too restrictive, the space after the colon is now optional. task-5170549 Forward-Port-Of: odoo/odoo#231747
This fixes a missing hours field when planning service work from a sales order. Users can now enter allocated hours in the planning dialog when the usual start time field is hidden, helping schedules capture the required effort correctly.
Original PR description
Steps to reproduce: - Create a Sales order with planning services. - Click on To Plan stat button. - Click on empty cell Issue: - Plan dialog is opened but has missing allocated_hours field. Reason: - In this commit https://github.com/odoo/enterprise/commit/d21bd4b694ec63ba83bea077714a8fe928d6e014 allocated hours was merged with start_datetime using a widget and thus removed from view. - But in planning list view we hide start_datetime when we schedule shifts from sales order. Fix: - Add back allocated_hours conditionally to be visible when we schedule shifts as in other cases start_datetime is present. task-5117776 Forward-Port-Of: odoo/enterprise#96391
Website form editors can no longer delete the final option from a multiple-checkbox field. This prevents forms from getting stuck in a state where users cannot add options back, improving reliability when configuring website forms.
Original PR description
Since `html_builder`, the last element of a multiple checkboxes form field can be removed, but it leads to a situation where no element can be added anymore to the field. To avoid this, this commit restores the former behavior which did forbid the removal of the last element. Steps to reproduce: - Drop a form snippet - Add a field - Set the field type to "Multiple checkboxes" - Remove all options => It was possible to remove the last option. task-4367641
The website donation form now waits for required currency information before processing a donation click. This prevents rare crashes or failed submissions on slow networks and reduces accidental double-click issues by showing a loading state.
Original PR description
This fixes a very rare race condition in the `test_01_donation` tour... but it is actually surprising it is not more frequent than it is. Steps to reproduce: - Simulate a slow network (e.g. using…
This fixes a very rare race condition in the `test_01_donation` tour... but it is actually surprising it is not more frequent than it is. Steps to reproduce: - Simulate a slow network (e.g. using Chrome DevTools) - Load a page with a donation snippet - Quickly fill in the donation form and click the submit button => You'll sometimes get a crash. Or a more precise one: - Add a 1 minute delay to the `/website/get_current_currency` route - Load a page with a donation snippet - Fill in the donation form and click the submit button once the page is fully loaded. => You'll definitely get a crash. This commit makes that button's handler async-protected, meaning it will now properly wait for what is needed (the currency) before proceeding, but it will also display a loading effect for the duration and prevent double clicking. Once the form is submitted, the loading effect is removed for stability safety. In master it can probably be improved. runbot-220885 Forward-Port-Of: odoo/odoo#232585 Forward-Port-Of: odoo/odoo#232408
Website pages in right-to-left languages now load dynamically requested styling using the visitor's website language instead of the session language. This prevents excessive horizontal whitespace on portal pages with chatter, improving usability for Arabic and other RTL-language users.
Original PR description
Scenario to reproduce from 18.0: - install right-to-left (eg. arabic) language on website - open a portal record with chatter (eg. /my/invoices/1) - switch to right-to-left language - scroll…
Scenario to reproduce from 18.0: - install right-to-left (eg. arabic) language on website - open a portal record with chatter (eg. /my/invoices/1) - switch to right-to-left language - scroll horizontally to the left Result: there is a huge amount of whitespace scrollable to the left. Cause: In 18.0, the chatter has an hidden textarea .o-mail-Composer-fake with position "left: -10000px; top: -10000px;". But the chatter assets (portal.assets_chatter_style) are called dynamically with getBundle which is using the session lang instead of the website lang. So the bundle is gotten with the wrong lang and the CSS is not rtlcss'ed and this create big whitespace to the left of the page. Fix: set the website request language when getting bundle for the frontend. Note: this PR also create a TestLangUrlCommon to prevent TestLangUrl tests of being run a second time in TestControllerRedirect. opw-5013485 Forward-Port-Of: odoo/odoo#232671 Forward-Port-Of: odoo/odoo#223575
This fix corrects how VoIP contact search combines phone keypad-style search terms with other filters. Users should see more accurate contact results instead of searches returning few or no matches.
Original PR description
t9_search should be ORed to the subdomain, which in turn should be ANDed to the domain. Currently, both the subdomain and the t9_search are ANDed to the domain, resulting in a "subdomain AND t9_search" condition, which is not correct and unlikely to match anything. Forward-Port-Of: odoo/enterprise#97731
Helpdesk users can now add the SLA status grouping back in the SLA reporting view after removing it. This avoids needing to reload the report and makes SLA analysis smoother and less disruptive.
Original PR description
Currently, when the user opens the sla reporting view, if he removes the default grouping of sla_status, he has no way to get it back unless he reloads the view completly. This commit fixes this issue by adding the sla_status field to the group_by options. task-5076401 Forward-Port-Of: odoo/enterprise#95261
The offer signature shortcut now works correctly when an employee has signed the same offer more than once. HR users are shown all related signature requests instead of being blocked or taken to an incorrect single request, making follow-up smoother.
Original PR description
Steps to reproduce: - Go to an employee and create an offer - Sign the offer with the employee twice - Log as the HR responsible and use the "Requested signature" smartbutton on the offer This has been fixed by opening a kanban view of all sign requests, if multiple. task-5053624
Subscription orders using external tax calculators now keep the correct recurring total instead of being recalculated with standard tax rules. This prevents customers and staff from seeing incorrect recurring amounts when taxes are supplied by an external service.
Original PR description
sale_subscription now uses `account.tax` to recalculate the tax amounts [1], thus bypassing amounts set by external calculators. For externally calculated orders, we override the recurring_total calculation to restore the previous behavior of calculating the amount using `price_subtotal` on the lines. This field will contain the amount returned by the external calculator. [1] https://github.com/odoo/enterprise/commit/70376f94e9f26e631890312edc0857d9ff37dc7b opw-4964610 Forward-Port-Of: odoo/enterprise#93567 Forward-Port-Of: odoo/enterprise#93054
The table selection popup in POS self-order now lists tables consistently by floor and table number. This makes it easier for customers or staff to find the right table and reduces confusion during ordering.
Original PR description
Task [#4991803](https://www.odoo.com/odoo/my-tasks/4991803) Runbot: https://runbot.odoo.com/runbot/bundle/18-0-incremental-order-table-pop-pos-self-order-ltra-391429 --- When selecting a table in the POS self-order, we sort the tables by `floor_id` and then by `table_number` in ascending order. This ensures a consistent and user-friendly experience when choosing a table. Forward-Port-Of: odoo/odoo#222811 Forward-Port-Of: odoo/odoo#222421
Invoices grouped by Sent or Not Sent now show only the matching records instead of duplicating all invoices in both groups. This makes invoice lists more reliable for accounting teams when tracking whether customer invoices have been sent.
Original PR description
### Issue: The groups "Sent" and "Not Sent" display all the invoices. ### Steps to reproduce: - Go in Accounting > Customer > Invoices - Create a custom GroupBy with "Sent" - Unfold the groups: all invoices appear in each group ### Cause: `web_read_group` returns the groups with their length and the domain corresponding. When unfolding `web_search_read` uses the given domain to get the records to display. Here the issue comes from the domain returned, it contains `['move_sent_values', '=', 'sent']`, but `move_sent_values` is a computed field that doesn't have a `_search` method so the domain doesn't filter on this field. ### Solution: Add the method `_search_move_sent_values` to search on `is_move_sent`. opw-5164650 Forward-Port-Of: odoo/odoo#232400
The scheduled check for Mexican electronic invoice status now rotates through records instead of repeatedly checking the same first batch. This helps ensure all imported posted invoices are monitored for possible SAT cancellations or status changes.
Original PR description
Currently one of the domains returned by the method `_get_update_sat_status_domains` is `[('state', '=', 'invoice_received'), ('move_id.state', '=', 'posted')]`. This domain is used to always return…
Currently one of the domains returned by the method `_get_update_sat_status_domains` is `[('state', '=', 'invoice_received'), ('move_id.state', '=', 'posted')]`. This domain is used to always return l10n_mx_edi_documents that have been imported from somewhere and whose invoice has been posted. This is because Odoo needs to always checked the value of the originator of an EDI document, in case it has been cancelled from the SAT Portal for instance.
Both `state = 'invoice_received'` and `'move_id.state = 'posted'` are mostly fixed value. The state needs to stay `invoice_received` as Odoo needs to always check the originator document's value. And once an invoice is posted, it's stays as so except in the case of cancellation.
This leads to an issue when the database contains more than 100 documents that are both `invoice_received` and `move_id.state = 'posted'`. In this case, the cron `_fetch_and_update_sat_status` will always process the same 100 documents. Once the limit of 100 is reached, the cron retriggers itself before terminating. Then on the next execution, the search call with the domain coming from `_get_update_sat_status_domain` will return the same 100 documents again.
This commit fixes this issue by ordering the documents in the cron method by `write_date asc`. Even if the SAT value of the documents does not change, the `write_date` should be updated as their is still a write that is triggered via `_update_document_sat_state`. This prevents the cron from always processing the same documents over and over again.
Forward-Port-Of: odoo/enterprise#93205Website form fields that are still in use can no longer be deleted accidentally. This prevents crashes when editing forms and guides users to remove the field from the form before deleting it.
Original PR description
The system crashes when a user tries to edit a website form field and that field has already been deleted from the model. **Steps to produce:-** - Install the `website` module. - Create a `new custom…
The system crashes when a user tries to edit a website form field and that field has already been deleted from the model. **Steps to produce:-** - Install the `website` module. - Create a `new custom field` on a model(for example, a field on the `mail.mail` model). - Website > edit > `add Form` widget to a page, and configure it to use the `mail.mail` model. - Add the newly created custom field to the form and save the page. - Now, `delete` the custom field which is created previously. - Return to the website page > edit > mark the deleted field as required, and attempt to save the changes. **Error:-** `ValueError: Unable to whitelist field(s) [''] for model 'mail.mail'.` **Root cause:-** - At [1], we can see that in the current version, it `only logs an error` using the logger, but in later versions, it `raises a ValueError` instead. **Solution:-** - This fix prevents a field from being deleted if it is actively used in any website form. - It adds a validation check that blocks the deletion and raises an error, forcing the user to remove the field from the form first. [1]: https://github.com/odoo/odoo/blob/d4f424d731fa93ccd232d0def0a7612997345ef7/addons/website/models/website_form.py#L123-L126 **sentry-5689731444** I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#232415 Forward-Port-Of: odoo/odoo#219590
This fixes an issue where only one shipping label printed when several label files were attached to a delivery record. Businesses using connected delivery printers can now print all expected labels at once, reducing manual reprints and shipping delays.
Original PR description
Before this commit, only 1 label get printed even if multiple files are in the chatter After this commit we handle the cases with multiple files + revert suppression of public method for API opw-5181209 Forward-Port-Of: odoo/enterprise#97843 Forward-Port-Of: odoo/enterprise#97805
This fix prevents crashes when users rapidly drag and drop cards in large grouped Kanban views, especially while the page is still updating. It makes the experience more reliable for teams working with many records and columns by safely cancelling actions when the view and data are temporarily out of sync.
Original PR description
On a grouped kanban view displaying a lot of records (i.e. with a lot of columns and a lot of records by column), drag and drop several records from the same column quick multiple times. Before this…
On a grouped kanban view displaying a lot of records (i.e. with a lot of columns and a lot of records by column), drag and drop several records from the same column quick multiple times. Before this commit, different crashes could occur. The first category of crashes concern the sortable hook. It called the onDrop callback even if the dragged element was no longer in the DOM (which occurs if there's a re-rendering while the user is dragging). This has been fixed in the hook, and tested. Another crash could arise in kanban (in the model). If the user dropped the card while there was a scheduled/ongoing re-rendering, i.e. at a specific moment where the model isn't synchronized with the DOM, the dropped card was still in the DOM, but it's associated datapoint was no longer referenced in hte model. In that case, we can do nothing but cancel the d&d. Note that this couldn't be tested, as reproducing the exact behavior (typically having a slow rendering due to the number of cards to render) isn't possible in a unit test, where user interactions are done programmatically. Task~5167650 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 Forward-Port-Of: odoo/odoo#231886
Products assigned to allowed subcategories now appear correctly in mobile self-order sessions. This prevents customers from missing available items when businesses organize menus with nested product categories, aligning mobile behavior with PoS and kiosk ordering.
Original PR description
**Steps to reproduce:** - Make a sub category, such as Soda for Drinks in PoS product categories - Make a product and assign this sub category to it - Allow the category in the PoS configuration for…
**Steps to reproduce:** - Make a sub category, such as Soda for Drinks in PoS product categories - Make a product and assign this sub category to it - Allow the category in the PoS configuration for a Mobile order Session - Open the Session, the product will not be displayed **Problem:** When a product has a subcategory, it is not displayed in the mobile interface, even if said category is allowed in the settings. This problem does not occur in the Kiosk, only on the mobile sessions. **Why the fix:** The products should be displayed if their category has been added to the available categories in the settings. It now works as it does in the PoS and the Kiosk, meaning it is displayed as long as the sub category is mentioned in the Restrict Categories section of the configuration. Also, in case you have categories A -> A/B -> A/B/C and you don't have products associated to A but you have some in C, they won't show up in the self. Currently, products from child categories can be shown in the self when all their parent categories had products associated to them. When computing the available categories, we would only return categories which had products directly related to them, regardless if their nth child had some. Thus in the setting mentioned previously, only the category C was returned. However this logic is not correct with the fact that the self, not in kiosk mode, only shows the top categories, meaning only the categories without parents. https://github.com/odoo/odoo/blob/434e8cf53a039cc2efc3cb531608028182928ad9/addons/pos_self_order/static/src/app/pages/product_list_page/product_list_page.js#L146-L151 The self was not showing the products from C as C had a parent category. In order for the product from C to be shown, the category A had to be included in the list of available categories. opw-4934728 Forward-Port-Of: odoo/odoo#221740