Tuesday, August 12, 2025
49 changes
13 changes
Resolved issues and error corrections
Project profitability figures now use the accounting line balance instead of recalculating amounts with current currency rates. This prevents incorrect project cost and profitability totals when vendor bills or other entries use historical or manually adjusted exchange rates.
Original PR description
Issue description: The profitability items for projects were not matching the numbers from analytic accounting reports due to discrepancies in currency rate calculations. This issue was traced to two…
Issue description: The profitability items for projects were not matching the numbers from analytic accounting reports due to discrepancies in currency rate calculations. This issue was traced to two main causes: 1. Profitability items were using the currency rate of today, even for old move lines. ```rates = self.env['res.currency'].browse(list(currency_ids))._get_rates(self.company_id, date.today())``` While this was deemed acceptable for performance reasons in #113146, it caused mismatches with analytic accounting reports. 2. Some move lines use a changed currency rate that differs from the rate stored in the currency table for the same date (due to manual change in the currency rate), leading to further mismatches. To resolve this: - The `balance` is now used instead of `price_subtotal` for calculations. This ensures accurate amounts without relying on conversion rates when the project currency matches the company currency. Steps to Reproduce: 1. Create a project with an associated analytic account. 2. Enable any foreign currency and add different rates for it for today and yesterday. 3. Create a new vendor bill with: - Date = yesterday - Currency = the new foreign currency - Analytic distribution set to the created project's analytic account. 4. Check the project dashboard profitability. You will see the numbers are incorrect because it uses the currency rate of today. opw - 4881380 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222462 Forward-Port-Of: odoo/odoo#217337
Marketing card previews and test mailings now use the right preview card, avoid recording preview interactions as real clicks, and show translated default content. Campaigns linked to removed business models are also cleaned up automatically, while field selection controls are easier to clear and display more consistently.
Original PR description
- Avoid counting "clicks" on archived (implicitly preview) cards - Pick the preview card when building the default mailing body - Translate the default mailing body - If a card targets a model that has been uninstalled, remove the campaign as is done for mailings task-4247003 Forward-Port-Of: odoo/odoo#222383 Forward-Port-Of: odoo/odoo#214315
Point of Sale now correctly opens the product configuration popup when a combo item includes products with special variant settings. It also avoids asking cashiers to choose variant options that were already selected in the combo flow, reducing confusion and checkout errors.
Original PR description
When a combo contained a product that had variant with type 'no_variant' and 'always', if you added the product to the cart the product configuration popup would not open. Also, in the combo you can…
When a combo contained a product that had variant with type 'no_variant' and 'always', if you added the product to the cart the product configuration popup would not open. Also, in the combo you can only select product_product and not product_template, so the product configuration popup should not propose the variant linked to the 'always' type, as you already selected a product template in the combo configuration popup. Steps to reproduce: ------------------- * Create a product attribute PA1 with type 'no_variant' and 2 values V1 and V2 * Create a product attribute PA2 with type 'always' and 2 values V3 and V4 * Create a product template PT1 with PA1 and PA2 * Create a combo choice PC1 with the 2 variants of PT1 * Create a combo product CP1 with PC1 * Open PoS and add CP1 to the cart * The combo configurator popup opens, click on the version with V2 > Observation: The product configurator popup does not open > Second fix: The product configurator allows you to select the variant linked to the 'always' type, which is not correct as you already selected it through the combo configurator popup Why the fix: ------------ The first fix just make sure that the product configuration popup opens when it is necessary. The second fix filters the variants proposed in the product configuration popup to only show the variants that are not linked to the 'always' type. But this only happens when we do it from the combo configuration popup. opw-4719258 Forward-Port-Of: odoo/odoo#222252 Forward-Port-Of: odoo/odoo#215603
Paid time off in the French localization now uses the employee’s actual working schedule when calculating hours, instead of defaulting to the company schedule. This keeps timesheets accurate when employees work different daily hours while preserving the legally required day count rules.
Original PR description
With the French fiscal localization: When an employee has a different working schedule than the company’s default one. If the employee’s daily working hours are greater than the company’s default…
With the French fiscal localization: When an employee has a different working schedule than the company’s default one. If the employee’s daily working hours are greater than the company’s default hours. The timesheet for paid time off only displays the company’s default hours instead of the employee’s actual hours. Steps to reproduce: ------------------- * Install l10n_fr_hr_holidays * Set the French fiscal localization * Working schedule of the company -> 7:30 per day * Working schedule of the employee -> 8 per day * Create a paid time-off with this employee * Check the Timesheet of this employee > Observation: Timesheet shows 7:30 instead of 8 Why the fix: ------------ We needed to ensure the hours are always calculated correctly (using the employee’s or company’s calendar when appropriate) while still forcing the correct day count (1 or 0.5) and extending it according to French law. ✅ Day count is forced (0.5 or 1) depending on the leave type. ✅ Hours are fetched from `super()._get_durations()` so the timesheet keeps accurate hours. This prevents timesheets from showing incorrect hours when the employee's work schedule differs from the company's work schedule. opw-4744516 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220511
This update corrects outdated field references in the employee work entry module after HR contract data was renamed during the saas-18.4 migration. It prevents upgrades from being blocked, helping customers move to the new version without this migration error.
Original PR description
- When migrating from `saas~18.3` to `saas~18.4` upgrade is blocked. Issue - - The model `hr.contract` was…
- When migrating from `saas~18.3` to `saas~18.4` upgrade is blocked.
Issue
-
- The model `hr.contract` was [renamed](https://github.com/odoo/upgrade/blob/815644044a3cf9ec41b2cf7580da47abdf6d3553/migrations/hr/saas~18.4.1.1/pre-migrate.py#L25) to `hr.version`. The fields `date_start` and `date_end` were also [renamed](https://github.com/odoo/upgrade/blob/815644044a3cf9ec41b2cf7580da47abdf6d3553/migrations/hr/saas~18.4.1.1/pre-migrate.py#L30-L31) to `contract_date_start` and `contract_date_end` in the hr.version model.
- These fields were still referenced in this module, causing issues.
Solution:
-
- Updated the references from `date_start` and `date_end` to `contract_date_start` and `contract_date_end` to resolve the issue.
- Reference [PR](https://github.com/odoo/odoo/pull/202869/files)
Traceback:
-
```python3
Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-18.4/odoo/service/server.py", line 1410, in preload_registries
registry = Registry.new(dbname, update_module=update_module, install_modules=config['init'], upgrade_modules=config['update'])
File "<decorator-gen-6>", line 2, in new
File "/home/odoo/src/odoo/saas-18.4/odoo/tools/func.py", line 89, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/registry.py", line 175, in new
load_modules(
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 450, in load_modules
load_module_graph(
File "/home/odoo/src/odoo/saas-18.4/odoo/modules/loading.py", line 201, in load_module_graph
registry.init_models(env.cr, model_names, {'module': package.name}, new_install)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/registry.py", line 719, in init_models
model._auto_init()
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/models.py", line 2908, in _auto_init
new = field.update_db(self, columns)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/fields_relational.py", line 284, in update_db
return super().update_db(model, columns)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/fields.py", line 1120, in update_db
self.update_db_notnull(model, column)
File "/home/odoo/src/odoo/saas-18.4/odoo/orm/fields.py", line 1173, in update_db_notnull
model._init_column(self.name)
File "/home/odoo/src/odoo/saas-18.4/addons/hr_work_entry/models/hr_work_entry.py", line 82, in _init_column
self.env.cr.execute("""
File "/home/odoo/src/odoo/saas-18.4/odoo/sql_db.py", line 426, in execute
self._obj.execute(query, params)
psycopg2.errors.UndefinedColumn: column hc.date_start does not exist
LINE 14: hwe.date_start >= hc.date_start AND
^
HINT: Perhaps you meant to reference the column "hwe.date_start".
```
- OPW - 4996246
- UPG - 3056379
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-prA scheduled accounting task now stops retrying journal entries that fail during automatic posting. This prevents repeated error messages and excessive record creation, helping keep accounting operations and system performance stable.
Original PR description
**Steps to reproduce:** - For simplicity, create a new account. - Create a new journal entry, with one line on the newly created account. - Set the date to today or older. - Set auto-post to "At…
**Steps to reproduce:** - For simplicity, create a new account. - Create a new journal entry, with one line on the newly created account. - Set the date to today or older. - Set auto-post to "At date". - Make sure the journal has autocheck_on_post set to True. - Keep the journal entry in draft, and duplicate it until you have 100 copies. (Make sure auto-post is set to "At date" on all of the copies aswell) - Set the newly created account to 'Deprecated'. - Manually execute the scheduled action "Account: Post draft entries with auto_post enabled and accounting date up to today" **Issue:** The scheduled action fails and then falls into an infinte loop, and logs an error on the chatter every minute, which could lead to thousands of mail_message records beign created. **Cause:** If the autopost scheduled action fails on a certain move, it marks it as 'move.checked = False'. So that when it is calls itself again (if the number of moves to post is greater than or equal to 100), it won't fetch the same move and fail again. But having 'journal_id.autocheck_on_post = True' in the search domain allows autopost to fetch the same move it marked before (if the journal allows it), which leads to an infinite loop. **Solution:** If autopost fails on a move, set 'auto_post' to 'no' so it won't be fetched again. opw-4815790 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#214946 Forward-Port-Of: odoo/odoo#213642
This fix prevents French FEC file imports from incorrectly replacing account names when multiple accounts share similar codes. Businesses can import accounting files with greater confidence that existing account labels will remain accurate.
Original PR description
Steps to reproduce: - import a fec with different account 164*** with different names Issue: All the account's name will be overriden Cause: Before 18.0, apparently, code and name were joined and was not an issue solution: update the code to the new logic by filtering out the name from the override (`_apply_template`) opw-4690284 Forward-Port-Of: odoo/enterprise#89194 Forward-Port-Of: odoo/enterprise#86809
New salary offers now appear correctly when users return to applicant or employee offer lists. When creating an offer from an employee record, the employee field is filled in automatically, reducing manual entry and confusion.
Original PR description
…ee field - = hr_contract_salary Steps: - Navigate to Recruitment > Job Positions > Applications> Offers - Now, create a New offer using the New button, and go back to offer list view - Navigate to Employee > Select an employee > Contract > Offers - Now, create a New offer using the New button, and go back to offer list view - Navigate to Employee > Select an employee > Contract > Offers - Now, click on New button to open offer form. Issues: - New offer is not included in list for applicants when returning via breadcrumb - New offer is not included in list for employees when returning via breadcrumb - Employee field is not pre-populated when creating a new offer for employee Fix: - Modified smart button action for applicants - Modified smart button action for employees - Computed the employee field to be autofilled Task - 4787302 Forward-Port-Of: odoo/enterprise#86160
This fix prevents one employee from being automatically clocked out when another employee clocks in from a different point-of-sale device. Businesses using Belgian POS certification can now keep accurate simultaneous staff attendance records across synchronized devices.
Original PR description
- Fixes an issue where clocking in a second employee on a different device would automatically clock out the first one. This was due to `self` being unset during POS session leading to incorrect loading of `users_clocked_ids` and `employees_clocked_ids`. - The issue was appearing when `pos_session._post_read_pos_data` is triggered from `pos_config.notify_synchronisation`. task-id: 4902090 Forward-Port-Of: odoo/enterprise#89273
Subscriptions that were paused and then manually invoiced now clear the pause state when that invoice is posted. This prevents resumed subscriptions from using an already-invoiced date and helps keep billing periods accurate.
Original PR description
Version: - saas-18.4 Before: - If a subscription was paused and a manual invoice was created, resuming the subscription would set the next invoice date incorrectly. - It would often pick a date that had already been invoiced manually, skipping over the pause period. - This happened because the user_pause_start is not reset after posting the manual invoice. After: - Now, when a manual invoice is posted during a pause, the pause state is cleared right away. - This makes sure the next_invoice_date is calculated properly when the subscription is resumed, without missing the pause period. Impact: - Fixes issues where subscriptions skipped billing periods after a manual invoice during a pause. - Keeps the billing period accurate when pausing and resuming subscriptions. Steps to reproduce: - Create and confirm a subscription. - Pause the subscription. - Post a manual invoice. - Resume the subscription. task-4946268
Rental orders now show the correct remaining availability when rental transfers are disabled. This prevents products from appearing unavailable after another rental is picked up, helping sales teams confidently confirm valid rental orders.
Original PR description
Steps to reproduce: - Do not enable “Rental Transfer” in settings - Create a storable product “P1”: - Enable “Can be rented” - update available quantity to 10 units - Create a first rental order for…
Steps to reproduce:
- Do not enable “Rental Transfer” in settings
- Create a storable product “P1”:
- Enable “Can be rented”
- update available quantity to 10 units
- Create a first rental order for 24h:
- 9 units of P1
- Confirm the order
- Create a second rental order for the same 24h period:
- 1 unit of P1
-> Expected: The availability widget is green and indicates 1 unit available (correct).
Problem:
After picking up the first order, the widget on the second order turns red and incorrectly shows no availability.
The current logic checks virtual_available (1 unit) and subtracts rented_qty_during_period (9 units), resulting in -8. It then takes max(0, -8) → 0. However, the actual picked quantity should be taken into account, regardless of whether “Rental Transfer” is enabled, since disabling it merely omits the creation of a picking—not the move itself.
opw-4901017
opw-4906162
Forward-Port-Of: odoo/enterprise#92056
Forward-Port-Of: odoo/enterprise#91155The Spanish VAT books export now avoids a technical error when the company’s IAE Group or Heading is missing. Instead, users are guided to update the company settings, making the issue easier to resolve and reducing disruption during tax reporting.
Original PR description
**Steps to reproduce:** 1. Install the `l10n_es_reports` module. 2. Remove the value from the `IAE Group or Heading` field in company settings. 3. Navigate to `Accounting -> Reporting -> Tax Report -> Generic Tax Report`. 4. Click the down arrow and select `VAT Record Books (XLSX)`. **Observed behavior:** * A traceback error occurs when attempting to export the VAT books. **Root cause:** * The system attempts to traverse the `IAE Group or Heading` field, which is empty, causing the traceback. **ref**: https://github.com/odoo/enterprise/blob/d8539dff5f3dcecfeb99fd7fc22a6915aaa02c4b/l10n_es_reports/models/libros_export.py#L126-L138 **Solution:** * If field `IAE Group or Heading` not configured, a RedirectWarning is raised to guide the user to the company form view for proper setup. opw-4981531 Forward-Port-Of: odoo/enterprise#92049 Forward-Port-Of: odoo/enterprise#91607
UPS commercial invoices generated from deliveries now show the same currency as the related customer order instead of defaulting to the company's currency. This helps avoid incorrect customs paperwork and reduces confusion for international shipments.
Original PR description
The automatically generated UPS Commercial Invoice is using the company's currency instead of the currency of the invoiced order. ### How to reproduce: * Setup UPS Delivery Method. * Create a sale order with a currency different from the company's. * Assign a customer in a different country. * Validate the delivery. * Check the UPS Commercial Invoice — it shows the company's currency. opw-4973217 Forward-Port-Of: odoo/enterprise#92065 Forward-Port-Of: odoo/enterprise#91883
11 changes
Resolved issues and error corrections
This fixes an issue that could prevent users from opening Spain's Modelo 111 report after a reporting engine change. The update removes an incompatible grouping setting so the report loads normally and avoids unexpected errors.
Original PR description
7 changes
Resolved issues and error corrections
Australian payroll withholding amounts are now included in tax return closing entries, helping businesses produce more complete tax accounting records. The payroll accounting module will also install more reliably when Australian localization is set up, avoiding a setup issue for new Australian companies.
Original PR description
18 changes
Resolved issues and error corrections
This fix ensures that when a manufacturing order is unbuilt, returned components keep their original consignment owner information. This prevents consigned stock from being incorrectly mixed into company-owned inventory, improving inventory accuracy for manufacturing operations.
Original PR description
**Problem:** when a MO is unbuild, if some components where consigned, they will come back in stock as not consigned **Steps to reproduce:** - enable "consignemnet" setting - create a storable…
Commit https://github.com/odoo/odoo/commit/97fe24cea74241a7820841a470994d3ebf9d8d38 changed the engine for some report line of Modelo 111. The new engine used, `external`, is not compatible with…
Commit https://github.com/odoo/odoo/commit/97fe24cea74241a7820841a470994d3ebf9d8d38 changed the engine for some report line of Modelo 111. The new engine used, `external`, is not compatible with having a grouping value defined by the user (field `user_groupby`). Except that value does not get removed from the report lines. As a result, a traceback pops up whenever we try to access the report. Two previous commits aimed to sync that field with the `groupby` field (https://github.com/odoo/odoo/commit/a7d54c76aaee325449248fa698adb9e549c486ee), and update it if it was not compatible with the engine (https://github.com/odoo/odoo/commit/0d5bf820c3737ee3e4af54d1fb556b72d6c59c3d) but both only work with `aggregation` engine. This commit makes `_validate_engine()` account for `external` engine, as it was only checking for `aggregation` engine when validating `groupby` related fields. opw-4972212 opw-4971497 opw-4931269 opw-4949654 Forward-Port-Of: odoo/odoo#221407 Forward-Port-Of: odoo/odoo#221021
Purchase orders now choose the supplier price list entry that matches the applicable minimum quantity when the same vendor has multiple entries. This prevents small purchases from incorrectly using bulk pricing, improving pricing accuracy and avoiding undercharged purchase orders.
Original PR description
Steps to reproduce the bug: - Create a storable product “P1” - Under the Purchase tab: - add two vendor pricelist entries: 1:/ - Vendor: Azure Interior - min_qty: 1 - Price: $5 2:/ - Vendor: Azure…
Steps to reproduce the bug:
- Create a storable product “P1”
- Under the Purchase tab:
- add two vendor pricelist entries:
1:/
- Vendor: Azure Interior
- min_qty: 1
- Price: $5
2:/
- Vendor: Azure Interior
- min_qty: 100
- Price: $2
- Create a purchase order:
- vendor: Azure Interior
- Try to add the product P1
**Problem:**
When adding a product to a purchase order, if multiple supplier info
lines exist for the same vendor, the one with the lowest price will be
selected, instead of the one matching the smallest applicable quantity
(min_qty).
This regression was introduced by the following commit, which
tried to fix an unrelated bug with supplier info date matching:
https://github.com/odoo/odoo/commit/7eabfcff402993f32f5c835e18e07c91782a7b33#diff-5684edced9bdfc98021a85de4c6cdf691ea7add74e56ab50334a1d7db9ef4224L470
As part of that fix, the logic was changed to use the _select_seller
method, which by default sorts supplier info lines by price_discounted
and returns the first one — regardless of whether the min_qty is met.
Previously, the logic correctly selected the supplier line based
on min_qty when multiple lines existed for the same vendor.
**_Note:_** This bug is no longer present as of version 18.1, because
the date-related issue was fixed differently in the following commit:
https://github.com/odoo/odoo/commit/19c65c4884a3746b44b6272694662eb32a6bf32f
That later fix preserved the original behavior of respecting min_qty.
**Solution:**
Explicitly pass ordered_by='min_qty' when calling _select_seller.
This ensures that supplier info lines are prioritized based on the
lowest applicable min_qty, not the lowest price, when the vendor is the
same.
opw-4942819
Forward-Port-Of: odoo/odoo#221902
Forward-Port-Of: odoo/odoo#221764The invoice sending process now ignores invoices that are no longer ready to be sent and clears outdated sending information when invoices are moved back to draft. This prevents background sending jobs from failing when users change an invoice status after selecting it for sending.
Original PR description
This commit makes the asynchronous invoice sending process more robust. Previously, the `_cron_account_move_send` method would fail if it encountered an invoice that was not in a 'posted' state. This could happen if a user changed the state of an invoice back to 'draft' or 'canceled' after it was selected for sending but before the cron job ran. To fix this, we added an extra condition to the search domain, so that only posted invoices are accounted for. We also added an explicit reset of `sending_data` in the draft button method, so that setting a posted invoiced back to draft does not retain (outdated) sending data. Steps to reproduce: 1. Select posted invoices and send. 2. Before cron runs, set one invoice to 'draft'. 3. Manually run the cron job `_cron_account_move_send`. 4. Observe the traceback. OPW-4985528 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222278
Fixes an issue where point of sale orders from a closed session could fail to invoice when cash rounding was involved. This helps businesses complete invoicing reliably for mixed-payment POS orders after session closure.
Original PR description
Currently it's not always possible to invoice an order from another sessio nthat is already closed when there is cash rounding. Steps to reproduce: ------------------- * Enable cash rounding for cash methods only, 5cents half-up * Open pos session * Add a produc with price 174.99 to order * Add a customer * Go to pay * Select pm cash and enter 100 * Select pm bank and enter 75 * Change 0.01 * Validate * Close session * Open session * Try invoicing the precedent order > Observation: Not possible to invoice, move is not balanced Back porting as it is exaclty the same issue: https://github.com/odoo/odoo/commit/626c3fd1bff85cc6cb222bdba80c14dd761dafd3 opw-[4829919](https://www.odoo.com/web#id=4829919&view_type=form&model=project.task) Forward-Port-Of: odoo/odoo#222543 Forward-Port-Of: odoo/odoo#220096
Marketing card previews and test mailings now behave more like real campaigns without skewing engagement results. Preview clicks are no longer counted, default mailing content uses the right preview card and user language, and obsolete campaigns are cleaned up when their linked model is removed.
Original PR description
- Avoid counting "clicks" on archived (implicitly preview) cards - Pick the preview card when building the default mailing body - Translate the default mailing body - If a card targets a model that has been uninstalled, remove the campaign as is done for mailings task-4247003 Forward-Port-Of: odoo/odoo#222383 Forward-Port-Of: odoo/odoo#214315
Point of Sale product configuration now lets cashiers change attribute choices even when the current combination is invalid. The Add button is disabled until a valid combination is selected, preventing blocked sales flows for products with exclusion rules.
Original PR description
If you setup the attribute exclusion on a product template with 2 attribute, so that only 2 valid combinations are possible, you would not be able to select the second attribute value in the product configurator popup. Steps to reproduce: ------------------- * Create 2 attributes with 2 values each A1V1 A1V2 and A2V1 A2V2 * Create a product template with these attributes and set the attribute exclusion so that only 2 valid combinations are possible. * Open PoS and try to add the product to the cart. * The configurator popup will appear. > Observation: You will not be able to change the selection because the other combinations are not correct. Why the fix: ------------ Instead of blocking the selection of wrong combinations, we disable the add button when the current selection is not valid. This allows the user to change the selection of the attributes without being blocked by the exclusion rules. opw-4825451 Forward-Port-Of: odoo/odoo#219688
Purchase orders created from sales orders now keep the assigned project for make-to-order, buy, and drop-shipping flows. This helps teams maintain accurate project tracking and reporting without requiring extra apps or manual corrections.
Original PR description
This commit fixes two issues related to project propagation from Sale Order to Purchase Order: **1. Project not propagated when using MTO+Buy route** **Steps to reproduce:** - Install only…
This commit fixes two issues related to project propagation from Sale Order to Purchase Order: **1. Project not propagated when using MTO+Buy route** **Steps to reproduce:** - Install only `sale_project_stock` and `purchase` - Enable multi-step routes and unarchive the "MTO" route - Create a storable product "P1" with: - Routes: MTO + Buy - Vendor: any - Create a Sale Order with: - 1 unit of P1 - Any project set in "Other Info" - Confirm the SO **Issue:** A Purchase Order is created but the project is not propagated to it. This propagation was previously ensured by `project_mrp_sale`, via: https://github.com/odoo/odoo/blob/238a41e35280256382f6509182b9e900fb4f7aba/addons/project_mrp_sale/models/stock_move.py#L9 --- **2. Project not propagated when using drop-shipping** **Steps to reproduce:** - Enable drop-shipping - Create a product "P2" with: - Route: Drop-Ship - Create a Sale Order with: - 1 unit of P2 - Any project set - Confirm the SO **Issue:** A Purchase Order is created, but the project is again missing. --- **Fix:** - Move the `_prepare_procurement_values` override from `project_mrp_sale` to `sale_project_stock` to ensure project propagation regardless of the presence of `project_mrp_sale` - Also adapt `sale_project` to ensure project is retrieved from the Sale Order if not set on the Sale Order Line. opw-4976606 Forward-Port-Of: odoo/odoo#222179
Preparation receipts in Point of Sale now use larger, easier-to-read order details and line items. They also include scheduled preparation time when timing presets are used, helping staff prepare orders at the right moment.
Original PR description
- Increase the size of the `order_reference`, `tracking_number`, order lines and title element on the order changes preparation receipts. - Also ensure that the preparation receipt contains the `preset_time` information when a preset with `use_timing` is used for the order. task-id: 4936935 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Paid time-off timesheets now use the employee’s actual working schedule when it differs from the company default. This prevents underreported hours for French payroll and leave tracking while keeping the required French leave day-count rules.
Original PR description
With the French fiscal localization: When an employee has a different working schedule than the company’s default one. If the employee’s daily working hours are greater than the company’s default…
With the French fiscal localization: When an employee has a different working schedule than the company’s default one. If the employee’s daily working hours are greater than the company’s default hours. The timesheet for paid time off only displays the company’s default hours instead of the employee’s actual hours. Steps to reproduce: ------------------- * Install l10n_fr_hr_holidays * Set the French fiscal localization * Working schedule of the company -> 7:30 per day * Working schedule of the employee -> 8 per day * Create a paid time-off with this employee * Check the Timesheet of this employee > Observation: Timesheet shows 7:30 instead of 8 Why the fix: ------------ We needed to ensure the hours are always calculated correctly (using the employee’s or company’s calendar when appropriate) while still forcing the correct day count (1 or 0.5) and extending it according to French law. ✅ Day count is forced (0.5 or 1) depending on the leave type. ✅ Hours are fetched from `super()._get_durations()` so the timesheet keeps accurate hours. This prevents timesheets from showing incorrect hours when the employee's work schedule differs from the company's work schedule. opw-4744516 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220511
Swiss payroll declarations now show which employee information is missing before users send or print them. This makes it easier for non-specialist users to correct incomplete data and avoid declaration errors or delays.
Original PR description
It is currently complicated for non trained users to figure out what is missing before sending or printing a declaration. In this PR we extend the warning mechanism to declarations to visualize what information is missing on what employees. Forward-Port-Of: odoo/enterprise#92083 Forward-Port-Of: odoo/enterprise#86195
This fix prevents one employee's clock-in from being ended when another employee clocks in from a different point-of-sale device. It helps stores with multiple terminals track staff attendance accurately and avoid accidental clock-outs during device synchronization.
Original PR description
- Fixes an issue where clocking in a second employee on a different device would automatically clock out the first one. This was due to `self` being unset during POS session leading to incorrect loading of `users_clocked_ids` and `employees_clocked_ids`. - The issue was appearing when `pos_session._post_read_pos_data` is triggered from `pos_config.notify_synchronisation`. task-id: 4902090 Forward-Port-Of: odoo/enterprise#89273
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 Forward-Port-Of: odoo/enterprise#91913 Forward-Port-Of: odoo/enterprise#90422
Fixed an issue in the Belgian point-of-sale fiscal integration where printing a bill again for an already-synced order could fail silently. Businesses can now reprint or issue multiple bills for the same order consistently, even when no new order changes need syncing.
Original PR description
Before this commit an issue was appearing when we try to make multiple bill on the same order. If the order was already synced and didn't get any changes, clicking `Print bill` with `pos_blackbox_be` wouldn't do anything. Now we print the bill after syncing the order, even if the order don't have any new changes to sync. task-id: 4901299 community PR: https://github.com/odoo/odoo/pull/222424 Forward-Port-Of: odoo/enterprise#92070
Spanish Model 349 reports now calculate rectified amounts using linked credit notes only, instead of being affected by payments or other unrelated transactions. This ensures rectification figures and official BOE exports reflect the correct tax position for prior-period supplier bills.
Original PR description
# How to reproduce the issue With l10n_es fiscal position: - Create a bill in a previous period (e.g., amount 1000). Partially credit note this bill for 500. - Register a partial payment of 250 on…
# How to reproduce the issue With l10n_es fiscal position: - Create a bill in a previous period (e.g., amount 1000). Partially credit note this bill for 500. - Register a partial payment of 250 on this bill. - In the tax report, go to model 349. Under the Rectificationes section, the new rectified value will be 250. This is incorrect, as the rectifications in this report should only reflect the value of the original move from a past period after applying the credit note. Payments or other transactions should not impact this report. This commit adjusts the computation of the report (and the BOE export) to ensure that, instead of using `amount_residual` (which includes payments and other transactions), the report uses the sum of the credit notes linked to the move included in the rectification report. Also changed the test test_mod349_credit_note. The rectification section is supposed to show the adjusted amount after rectification. In the test a bill of 400 is fully refunded. Instead of 400, the report should show 0. (https://www.boe.es/buscar/doc.php?id=BOE-A-2010-5098 in TIPO DE REGISTRO 2: REGISTRO DE RECTIFICACIONES. in 153-165 Numérico Base Imponible Rectificada section) opw-4895636 Forward-Port-Of: odoo/enterprise#91350 Forward-Port-Of: odoo/enterprise#89431
UPS Commercial Invoices now use the currency from the related sale order instead of the company’s default currency. This prevents incorrect customs paperwork when shipments are based on orders in foreign currencies.
Original PR description
The automatically generated UPS Commercial Invoice is using the company's currency instead of the currency of the invoiced order. ### How to reproduce: * Setup UPS Delivery Method. * Create a sale order with a currency different from the company's. * Assign a customer in a different country. * Validate the delivery. * Check the UPS Commercial Invoice — it shows the company's currency. opw-4973217 Forward-Port-Of: odoo/enterprise#92065 Forward-Port-Of: odoo/enterprise#91883
This change fixes an error that could appear after a user successfully signed a document with Aadhaar and returned to Odoo. It ensures the signing request is referenced correctly, allowing the completed signing flow to continue without interruption.
Original PR description
Before this commit, after successfully signing with Aadhaar and returning to Odoo, `sign_request = request_item_sudo.sign_request_id UnboundLocalError: local variable 'request_item_sudo' referenced before assignment` This happened because request_item_sudo was not defined. This commit fixes the issue by correcting the variable name so it’s properly defined before use.
Rental orders now show the correct remaining stock even when the Rental Transfer setting is turned off. This prevents available rental products from being incorrectly marked as unavailable after another rental has been picked up.
Original PR description
Steps to reproduce: - Do not enable “Rental Transfer” in settings - Create a storable product “P1”: - Enable “Can be rented” - update available quantity to 10 units - Create a first rental order for…
Steps to reproduce:
- Do not enable “Rental Transfer” in settings
- Create a storable product “P1”:
- Enable “Can be rented”
- update available quantity to 10 units
- Create a first rental order for 24h:
- 9 units of P1
- Confirm the order
- Create a second rental order for the same 24h period:
- 1 unit of P1
-> Expected: The availability widget is green and indicates 1 unit available (correct).
Problem:
After picking up the first order, the widget on the second order turns red and incorrectly shows no availability.
The current logic checks virtual_available (1 unit) and subtracts rented_qty_during_period (9 units), resulting in -8. It then takes max(0, -8) → 0. However, the actual picked quantity should be taken into account, regardless of whether “Rental Transfer” is enabled, since disabling it merely omits the creation of a picking—not the move itself.
opw-4901017
opw-4906162
Forward-Port-Of: odoo/enterprise#92056
Forward-Port-Of: odoo/enterprise#91155The Spanish VAT books export now avoids a crash when the company's IAE Group or Heading is missing. Instead, users are redirected to the company settings to complete the required setup, making the issue easier to resolve.
Original PR description
**Steps to reproduce:** 1. Install the `l10n_es_reports` module. 2. Remove the value from the `IAE Group or Heading` field in company settings. 3. Navigate to `Accounting -> Reporting -> Tax Report -> Generic Tax Report`. 4. Click the down arrow and select `VAT Record Books (XLSX)`. **Observed behavior:** * A traceback error occurs when attempting to export the VAT books. **Root cause:** * The system attempts to traverse the `IAE Group or Heading` field, which is empty, causing the traceback. **ref**: https://github.com/odoo/enterprise/blob/d8539dff5f3dcecfeb99fd7fc22a6915aaa02c4b/l10n_es_reports/models/libros_export.py#L126-L138 **Solution:** * If field `IAE Group or Heading` not configured, a RedirectWarning is raised to guide the user to the company form view for proper setup. opw-4981531 Forward-Port-Of: odoo/enterprise#92122 Forward-Port-Of: odoo/enterprise#91607
**Problem:** when a MO is unbuild, if some components where consigned, they will come back in stock as not consigned **Steps to reproduce:** - enable "consignemnet" setting - create a storable product (the comp) - set on on hand quantity of 3 without owner - set on on hand quantity of 4 with an owner - create another product (the final product), with a BOM of 7 of the comp product - create a manufacturing order for the final product, confirm and produce all. - unbuild it - open the comp product form, click on the on hand smart button **Current behavior:** - there is a quantity of 7 unconsigned **Expected behavior:** - there should be a quantity of 3 unconsigned and a quantity of 4 consigned **Cause of the issue:** when the stock move line is create in action_unbuild() there is no mechanism to get back the owner of the original stock move line from the MO https://github.com/odoo/odoo/blob/ceccb92af19a6a3fc0c7b5924d9f497b1aec1d55/addons/mrp/models/mrp_unbuild.py#L204 opw-4900386 Forward-Port-Of: odoo/odoo#219905
This fix prevents Odoo from crashing when users open an app while multiple modules are still being installed. It makes the web interface handle partially loaded view information safely, improving reliability during installation workflows.
Original PR description
Currently, an error occurs when the user tries to install multiple modules and, during installation user tries to access any app. This issue happens because line [1] tries to get view info by view…
Currently, an error occurs when the user tries to install multiple modules and, during installation user tries to access any app. This issue happens because line [1] tries to get view info by view name, like `hierarchy`. Normally, we get the view information from the `_get_view_info` method (see [2]), and we override this method to add another view to the returned data (as in [3]). But during installation, when the user tries to access any app, the view is already loaded into the database. So when the `fields_get` method is called, the view is found. However, since the module isn't fully loaded yet, the overridden `get_view_info` method hasn't taken effect. As a result, the additional view we expect isn’t included, and accessing that view key causes an error. This commit fixes the above error by ensuring that `_view_info` is accessed only when `type_` is present in `_view_info` at [1]. [1]: https://github.com/odoo/odoo/blob/80976e3579db4862c16cafab2ec183a7a0d0b63c/addons/web/models/ir_ui_view.py#L14 [2]: https://github.com/odoo/odoo/blob/80976e3579db4862c16cafab2ec183a7a0d0b63c/addons/web/models/ir_ui_view.py#L22-L31 [3]: https://github.com/odoo/odoo/blob/80976e3579db4862c16cafab2ec183a7a0d0b63c/addons/web_hierarchy/models/ir_ui_view.py#L56-L57 sentry-5661154820
Attachments added while scheduling an activity are now linked to the final activity record instead of the temporary scheduling wizard. This prevents those files from being removed during future database upgrades, helping users retain important activity-related documents.
Original PR description
Steps to reproduce the issue: 1. Create a new activity on any `mail.thread` (`project.project` for example) 2. On the wizard, upload an attachment 3. Schedule the activity 4. Upgrade the database to…
Steps to reproduce the issue: 1. Create a new activity on any `mail.thread` (`project.project` for example) 2. On the wizard, upload an attachment 3. Schedule the activity 4. Upgrade the database to any future version Current behavior before PR: The attachments created with activities would be deleted due to the query [here](https://github.com/odoo/upgrade/blob/master/migrations/base/0.0.0/pre-clean-transients.py#L69), because they are linked to the transient model `mail.activity.scheduel`. Attachments linked to these models are deleted during the upgrade. Desired behavior after PR is merged: The newly created attachments are linked to the `mail.activity` record directly, avoiding the post-upgrade issue. This change also aligns the feature with attaching a file to a `mail.message` record, where the `res_model` and `res_id` fields move from `mail.compose.message` to the target model after posting the message. opw-4812659 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The point of sale product screen now adjusts the number of product tiles per row on mobile devices instead of forcing a fixed layout. This prevents the product list from overflowing and makes mobile checkout browsing smoother, with a test added to help avoid regressions.
Original PR description
- This commit fixes the issue of vertical scrolling on mobile devices, now we responsively display the correct number of product lists by line, instead of forcing the display of 3 per lines. - Also add a test to ensure that the product list does not overflow on mobile devices. backport of commit (8dba5b2781d40c0817829ce330aeea2c6b0bff36) task-id: 4922341 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Calendar reminders now only appear for upcoming events within the correct reminder window. This prevents users from receiving confusing notifications for meetings that have already passed, especially for recurring events.
Original PR description
Steps to reproduce the issue: 1. Create a calendar event (meeting, for example) 2. Set the start date as yesterday and in 30 minutes from now. 3. Set it to be recurrent every week with end_type set to end_date and in the future(1 month from now). 4. Add a reminder to the event (30 mins, for example) and ensure that calendar_last_notif_ack is set before the alarm window for your user's res.partner. 5. Save the event and observe an alarm notification made for an event in the past. After the fix, the calendar alarms will only trigger for events in the future and in their designated time windows. The recurrence logic was also removed from the query to align with this [[REF]](https://github.com/odoo/odoo/pull/42031/commits/a27afdb5434166c3ea48c18ccfba9e8245d18e62) since recurring events are all persistent records in the database. opw-4776638 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#222214
This fix ensures work entries for employees on flexible schedules use the actual time period being processed, rather than assuming a full standard day. This prevents incorrect 8-hour durations when attendances occur on public holidays or partial-day gaps, improving payroll and attendance accuracy.
Original PR description
### Steps to reproduce: - Set Marc Demo's contract work entry source to attendances and working schedule to flexible hours. - Create a public holiday with generic time off work entry type. - Create…
### Steps to reproduce: - Set Marc Demo's contract work entry source to attendances and working schedule to flexible hours. - Create a public holiday with generic time off work entry type. - Create one or multiple attendances for marc demo on the public holiday. - Regenerate work entries for marc demo for that day, the gaps in between the attendances created and the working hours will be filled with work entries with the right start/end time but duration will always be 8h. ### Cause: This is happening because when getting the duration batch for the work entry we get the attendance intervals the employee should work in that period and if the employee is flexible we will get a fake attendance with the number of hours required per day ignoring if the period is just a small period of the day ### Fix: We are checking now since the start date not monday so we don't set a fixed week start. We check if the period is less than the remaining hours we get it as it mostly means that it is less than one day opw-4887933
This fix prevents the Spanish Modelo 111 tax report from crashing when opened after a reporting engine change. It removes an incompatible grouping setting so affected users can access the report normally.
Original PR description
Commit https://github.com/odoo/odoo/commit/97fe24cea74241a7820841a470994d3ebf9d8d38 changed the engine for some report line of Modelo 111. The new engine used, `external`, is not compatible with having a grouping value defined by the user (field `user_groupby`). Except that value does not get removed from the report lines. As a result, a traceback pops up whenever we try to access the report. Two previous commits aimed to sync that field with the `groupby` field (https://github.com/odoo/odoo/commit/a7d54c76aaee325449248fa698adb9e549c486ee), and update it if it was not compatible with the engine (https://github.com/odoo/odoo/commit/0d5bf820c3737ee3e4af54d1fb556b72d6c59c3d) but both only work with `aggregation` engine. This commit makes `_validate_engine()` account for `external` engine, as it was only checking for `aggregation` engine when validating `groupby` related fields. opw-4972212 opw-4971497 opw-4931269 opw-4949654 Forward-Port-Of: odoo/odoo#221021
This fixes an issue where older Saudi ZATCA Phase 1 invoice QR codes disappeared after the electronic invoicing module was installed. Businesses can now see the correct QR code for both Phase 1 and Phase 2 invoices, supporting compliant invoice reporting.
Original PR description
Phase 1 ZATCA QR codes disappear when l10n_sa_edi is installed, there is a check for document submission to display the QR code for Phase 2 which older Phase 1 invoices will not pass as it doesn't use edi. Description of the issue/feature this PR addresses: Phase 1 ZATCA QR Code disappears once l10n_sa_edi is installed Current behavior before PR: Always hide Phase 1 ZATCA QR Code Desired behaviour after PR is merged: Showing Phase 1 and Phase 2 ZATCA QR codes based on the invoice task-5005304 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
PDF reports covering multiple records now fall back to generating each document separately when automatic splitting cannot determine the correct pages. This prevents missing or broken report files in cases where report templates or PDF generation tools produce inconsistent outlines, though large batches may take longer to process.
Original PR description
When generating PDF reports with multiple records, the system tries to split the concatenated PDF using outlines. However, in cases where the number of outlines doesn't match the number of records or…
When generating PDF reports with multiple records, the system tries to split the concatenated PDF using outlines. However, in cases where the number of outlines doesn't match the number of records or outlines are missing, it falls back to generating individual PDFs per record by recursively calling `_render_qweb_pdf_prepare_streams()` for each `res_id`.
This ensures that each record gets its corresponding PDF even if splitting the combined PDF is not possible due to template or wkhtmltopdf inconsistencies.
issue related: https://github.com/odoo/odoo/issues/202299
Current Behavior:
The _render_qweb_pdf_prepare_streams method does not correctly generate PDF streams under specific conditions, causing the PDF to not be properly split for each res_id. When these conditions are met, the generated streams are set to None, resulting in incorrect PDF processing.
The issue occurs when all the following conditions are true:
reader.numPages != len(res_ids_wo_stream)
len(res_ids_wo_stream) > 1 and set(res_ids_wo_stream) == set(html_ids_wo_none) is True
not has_valid_outlines is False
has_same_number_of_outlines and has_top_level_heading is False, since has_same_number_of_outlines is False
Expected Behavior:
The method should correctly assign a valid PDF stream to each res_id, ensuring proper document splitting even when outlines cannot be used.
Steps to Reproduce:
Generate a PDF report where the number of pages does not match the number of res_ids.
Ensure that the report includes multiple records, and the outlines structure is not valid for splitting.
Debug and Observe that the streams assigned to res_ids are None, leading to issues in PDF rendering.
Error:
Odoo Server Error
RPC_ERROR
Odoo Server Error
Occured on 172.20.18.5:8069 on model ir.cron and id 31 on 2025-03-18 12:02:43 GMT
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/safe_eval.py", line 397, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(309,)", line 1, in
File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 5481, in _cron_account_move_send
self.env['account.move.send']._generate_and_send_invoices(
File "/home/odoo/src/odoo/addons/account/models/account_move_send.py", line 687, in _generate_and_send_invoices
self._generate_invoice_documents(moves_data, allow_fallback_pdf=allow_fallback_pdf)
File "/home/odoo/src/odoo/addons/account/models/account_move_send.py", line 612, in _generate_invoice_documents
self._prepare_invoice_pdf_report(batch)
File "/home/odoo/src/odoo/addons/account/models/account_move_send.py", line 333, in _prepare_invoice_pdf_report
content_by_id = self.env['ir.actions.report']._get_splitted_report(pdf_report.report_name, content, report_type)
File "/home/odoo/src/odoo/addons/account/models/ir_actions_report.py", line 60, in _get_splitted_report
pdf_dict = {res_id: stream['stream'].getvalue() for res_id, stream in content.items()}
File "/home/odoo/src/odoo/addons/account/models/ir_actions_report.py", line 60, in
pdf_dict = {res_id: stream['stream'].getvalue() for res_id, stream in content.items()}
AttributeError: 'NoneType' object has no attribute 'getvalue'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 1962, in _transactioning
return service_model.retrying(func, env=self.env)
File "/home/odoo/src/odoo/odoo/service/model.py", line 156, in retrying
result = func()
File "/home/odoo/src/odoo/odoo/http.py", line 1929, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/src/odoo/odoo/http.py", line 2177, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/src/odoo/odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 42, in call_button
action = call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 533, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_cron.py", line 120, in method_direct_trigger
self.ir_actions_server_id.run()
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions.py", line 995, in run
res = runner(run_self, eval_context=eval_context)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_actions.py", line 827, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "/home/odoo/src/odoo/odoo/tools/safe_eval.py", line 411, in safe_eval
raise ValueError('%r while evaluating\n%r' % (e, expr))
ValueError: AttributeError("'NoneType' object has no attribute 'getvalue'") while evaluating
'model._cron_account_move_send(job_count=20)'
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR
at makeErrorFromResponse (http://172.20.18.5:8069/web/assets/0604b65/web.assets_web.min.js:3140:163)
at XMLHttpRequest. (http://172.20.18.5:8069/web/assets/0604b65/web.assets_web.min.js:3145:13)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prInternal users can now convert Excel files in shared document folders into Odoo spreadsheets even when portal users have edit access on the folder. During conversion, portal users are limited to view-only access on the new spreadsheet, avoiding an error while respecting spreadsheet sharing rules.
Original PR description
Let's say a Document Folder is shared with a portal user with 'edit' access. The portal user shares a .xlsx file to the folder, and an internal user later try to convert the file to odoo spreadsheet.…
Let's say a Document Folder is shared with a portal user with 'edit' access. The portal user shares a .xlsx file to the folder, and an internal user later try to convert the file to odoo spreadsheet. During the conversion, the portal user has 'edit' role on the folder, which is copied to the documents.access records of the converted sheet. Since Odoo prevents Spreadsheets from being shared in edit mode to portal users, _check_spreadsheet() raises a Validation Error, even though the internal user has all the access rights. To improve the user experience, this commit overrides `copy_data` of `documents.access` model to assign `view` access to portal users for an odoo spreadsheet. Maybe we can extract the if-conditions, and make it an API to reduce repeated code, as the same logic is being used in `_check_spreadsheet()` on the same file. However, looping through the copied vals_list only when handler is spreadsheet might have more value in terms of performance. --- This commit enables .xlsx to spreadsheet conversion only for internal users. The solution for portal users requires more complex implementation deserving its own review cycle, which is proposed in [PR #92134](https://github.com/odoo/enterprise/pull/92134) (PR #92134's first commit is the same commit as current PR's commit) opw-4753670
Payroll users in Belgium can now export work entries for any active company they have access to, instead of being limited to their current company. The export also now checks that the selected company has its required Group S code set, helping prevent incomplete or failed submissions.
Original PR description
before this commit only the current company was taken into account when exporting work entries now another company can be selected if multiple companies are active for the current user In addition to that this commit also add a check for the company's group s code to enforce the user to set it before exporting work entries task-4213675 closes old PR: odoo/enterprise/pull/71521
This fixes an issue where nested grouped lines in account reports did not fold properly and could trigger an error when users expanded or collapsed partner lines. The change helps keep financial reports stable and easier to navigate when using grouped account data.
Original PR description
Steps to reproduce: - Create an Account Group - Create a new Account Report as follows: * Name: any * Lines: 1. [test line] * Group By: partner_id,account_id * Expressions: 1. [test expression] *…
Steps to reproduce:
- Create an Account Group
- Create a new Account Report as follows:
* Name: any
* Lines:
1. [test line]
* Group By: partner_id,account_id
* Expressions:
1. [test expression]
* Computation Engine: Odoo Domain
* Formula: [('account_id.account_type', '=', 'asset_receivable')]
* Subformula: sum
- Actions > Create Menu Item
- Open the new report
- Try to unfold/fold a partner line
Issue:
Folding will not fold the first child (representing the created account group). Also, error will raise
```
Uncaught Promise > Got duplicate key in t-foreach: ~account.report~37|~account.report.line~255|{'groupby': 'partner_id'}~res.partner~4226|~account.group~90
Occured on odoo.nas.cpolar.cn on 2025-04-26 04:58:53 GMT
OwlError: Got duplicate key in t-foreach: ~account.report~37|~account.report.line~255|{'groupby': 'partner_id'}~res.partner~4226|~account.group~90
Error: Got duplicate key in t-foreach: ~account.report~37|~account.report.line~255|{'groupby': 'partner_id'}~res.partner~4226|~account.group~90
at AccountReport.template (eval at compile (https://odoo.nas.cpolar.cn/web/assets/debug/web.assets_web.js:13743:20), <anonymous>:138:49) (/web/static/lib/owl/owl.js:5752)
at App.callTemplate (https://odoo.nas.cpolar.cn/web/assets/debug/web.assets_web.js:11363:50) (/web/static/lib/owl/owl.js:3372)
at AccountReport.template (eval at compile (https://odoo.nas.cpolar.cn/web/assets/debug/web.assets_web.js:13743:20), <anonymous>:9:12) (/web/static/lib/owl/owl.js:5752)
at RootFiber._render (https://odoo.nas.cpolar.cn/web/assets/debug/web.assets_web.js:9774:38) (/web/static/lib/owl/owl.js:1783)
at RootFiber.render (https://odoo.nas.cpolar.cn/web/assets/debug/web.assets_web.js:9766:18) (/web/static/lib/owl/owl.js:1775)
at ComponentNode.render (https://odoo.nas.cpolar.cn/web/assets/debug/web.assets_web.js:10493:23) (/web/static/lib/owl/owl.js:2502)
```
Analysis:
Folding issues occurs because of a mismatch in the grouping markup quote escape. If we don't have the very same string the controller cannot properly recognize the parent line and then is unable to fold/unfold properly.
This eventually led to the mentioned error at unfold as the backend will try to generate the apparently missing lines to unfold, only to create duplicate lines
opw-4754241Tickets created from Timesheets now automatically use the Helpdesk team linked to the selected project. This prevents tickets from being assigned to the wrong team and helps keep support work routed correctly from the start.
Original PR description
Steps to Reproduce: - 1. Go to Timesheets > My Timesheets, start the timer, and select the project linked to the helpdesk team. 2. In the timer header, quick-create a new ticket via the "Ticket" field dropdown 3. Observe that the default helpdesk team on the new ticket is incorrect. Issue: - - When creating a ticket from the Timesheets module (e.g., via timer header or views), the system selects an incorrect default helpdesk team, leading to misassigned tickets. Cause: - - The core default logic for team_id prioritizes user membership or the first team without considering the selected project's linked helpdesk team. Fix: - - Override `_default_team_id` to set the correct Helpdesk Team based on the selected project. - A domain has been added to the team selection field within the timesheet views to only show teams that have the timesheet feature enabled. task-4885679 Forward-Port-Of: odoo/enterprise#89503
Work entries now calculate attendance-based durations correctly for employees on flexible schedules, even when the period starts midweek or covers only part of a day. This prevents holiday-related gaps from being incorrectly recorded as a full 8 hours, improving payroll and attendance accuracy.
Original PR description
### Steps to reproduce: - Set Marc Demo's contract work entry source to attendances and working schedule to flexible hours. - Create a public holiday with generic time off work entry type. - Create…
### Steps to reproduce: - Set Marc Demo's contract work entry source to attendances and working schedule to flexible hours. - Create a public holiday with generic time off work entry type. - Create one or multiple attendances for marc demo on the public holiday. - Regenerate work entries for marc demo for that day, the gaps in between the attendances created and the working hours will be filled with work entries with the right start/end time but duration will always be 8h. ### Cause: This is happening because when getting the duration batch for the work entry we get the attendance intervals the employee should work in that period and if the employee is flexible we will get a fake attendance with the number of hours required per day ignoring if the period is just a small period of the day ### Fix: We are checking now since the start date not monday so we don't set a fixed week start. We check if the period is less than the remaining hours we get it as it mostly means that it is less than one day opw-4887933
Swedish SIE4 imports now complete even when the file does not include previous-year information for opening balances. The importer uses a sensible fallback date and also retries with an alternate character encoding, reducing failed imports for affected accounting files.
Original PR description
**Issue**: Importing a SIE4 file without previous year information causes a traceback. **Steps to reproduce**: - Go to Accounting > Settings > Import - Import SIE 4 file - Check the box "Import account opening balances" - Select the right xml and observe the traceback **Cause**: The method `_prepare_sie4_opening_balance_move` tries to directly access the previous year: https://github.com/odoo-dev/enterprise/blob/6d4919658650a006c73d4aaf1f500d67723dda0d/l10n_se_sie4_import/wizard/import_wizard.py#L376C9-L376C58 This results in a traceback when the previous year is not present. **Solution**: Make `_prepare_sie4_opening_balance_move` more permissive by falling back to the day before the first day of the current year if the `-1` section is not there. **Additional Notes**: The client file does not support `UTF8` format, retry with the `ISO-8859-1` format in case of `UnicodeDecodeError`. opw-4894495 Forward-Port-Of: odoo/enterprise#89425
Fixes an error that could stop users from checking the status of a GSTR-1 return after the related exception email template was deleted. This helps Indian GST reporting workflows continue smoothly instead of showing a system traceback.
Original PR description
Steps to reproduce: - Delete the mail template `GSTR-1 Exception` - Accounting -> Reporting -> GST Return Period - Create a return period, Under GSTR1 click Push to GSTN - Click on the Check Status…
Steps to reproduce:
- Delete the mail template `GSTR-1 Exception`
- Accounting -> Reporting -> GST Return Period
- Create a return period, Under GSTR1 click Push to GSTN
- Click on the Check Status Button
The following RPC is produced:
```py
File "/home/odoo/src/enterprise/l10n_in_reports_gstr/models/gst_return_period.py", line 1261, in button_check_gstr1_status
self.check_gstr1_status()
File "/home/odoo/src/enterprise/l10n_in_reports_gstr/models/gst_return_period.py", line 1345, in check_gstr1_status
act_type_xmlid, advisor_user = self._get_gstr_responsible_activity_and_user()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/enterprise/l10n_in_reports_gstr/models/gst_return_period.py", line 1271, in _get_gstr_responsible_activity_and_user
act_type = self.env['mail.activity.type'].sudo()._load_records({
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/src/odoo/odoo/models.py", line 5439, in _load_records
xml_ids = [data['xml_id'] for data in data_list if data.get('xml_id')]
^^^^^^^^
AttributeError: 'str' object has no attribute 'get'
```
In this commit, we resolve the above issue and restore the expected output
task-5010701Appointment users can now create appointments from calendar events when the appointment uses a single resource. This removes an access error that previously blocked the booking flow, helping staff schedule appointments without administrator help.
Original PR description
Before this commit, trying to create an appointment through a calendar event as an user will raise an AccessError. This is because in this fix #76653 we needed to make sure the appointment_resource_id is being set on the calendar event and for this we needed to make it readonly. This causes that an user, is not able to get the proper access rights to read on to the 'appointment.booking.line' which is being triggered since inside each booking line, we have an appointment_resource_id which is a many2one to the appointment resource. To fix this, we are adding a sudo on the booking lines when we only have 1 booking line and the appointment resource is set on the calendar event. This way, the user will be able to read the booking lines and create the appointment. opw-4614976 Forward-Port-Of: odoo/enterprise#88373
Repeat website appointment bookings now reuse an existing contact when the same email is provided, instead of creating a duplicate record. This keeps customer data cleaner while respecting company boundaries in multi-company setups.
Original PR description
Booking an appointment on the website creates a new contact. If the same user books again, a duplicate contact is created instead of reusing the existing one. --- **Steps to Reproduce** 1. Book an…
Booking an appointment on the website creates a new contact. If the same user books again, a duplicate contact is created instead of reusing the existing one.
---
**Steps to Reproduce**
1. Book an appointment with a name, email, and phone.
2. Book a second appointment using the same data.
3. A new duplicate contact is created.
---
**Cause:**
In v18, the appointment booking flow lost the fallback email search mechanism that existed in v17. When `_get_customer_partner()` returns empty (anonymous users), the system immediately creates a new partner without checking if one already exists with the same email. This regression causes duplicate contacts to be created for repeat anonymous bookings.
**Root Issue:**
The v17 logic included an email search fallback:
```python
customer = request.env['res.partner'].sudo().search([('email_normalized', '=', email_normalized)], limit=1)
```
This was removed in v18, breaking the partner reuse mechanism.
**Solution:**
Restore the email search logic with multi-company awareness:
1. **Email Search**: When no customer is found, search for existing partners by normalized email
2. **Company Boundaries**: Limit search to partners without a company or belonging to the current company context to prevent cross-company data conflicts
3. **Fallback Creation**: Only create new partners when no compatible existing partner is found
---
This fix restores the fallback email search logic from v17, ensuring anonymous users booking appointments reuse their existing contact records while maintaining proper company data isolation in multi-company environments.
The search is limited to partners without a company or partners belonging to the current company to prevent cross-company data conflicts.
**opw-4614897**