Monday, April 28, 2025
44 changes · saas-18.2
Resolved issues and error corrections
This fixes an error that could stop users from printing the Picking Operations report for Indian companies when products include HSN/SAC codes. The report now uses the correct product reference, allowing delivery paperwork to print normally.
Original PR description
Description of the issue/feature this PR addresses: - there is typo, where 'ml' is not correctly replaced with 'move', in this commit…
Description of the issue/feature this PR addresses: - there is typo, where 'ml' is not correctly replaced with 'move', in this commit https://github.com/odoo/odoo/commit/381615636185b88585e5ca112e43b6a7d81e1895. ## steps to reproduce - Create an Indian company - install stock module and create a delivery - select a product which has `'HSN/SAC Code` field set and validate the order. - print `Picking Operations` report ## Traceback received: ```py File "/data/build/odoo/odoo/addons/base/models/[ir_ui_view.py](http://ir_ui_view.py/)", line 2206, in _render_template return self.env['ir.qweb']._render(template, values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/build/odoo/odoo/tools/[profiler.py](http://profiler.py/)", line 313, in _tracked_method_render return method_render(self, template, values, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/build/odoo/odoo/addons/base/models/[ir_qweb.py](http://ir_qweb.py/)", line 605, in _render result = ''.join(rendering) ^^^^^^^^^^^^^^^^^^ File "<2221>", line 2048, in template_2221 odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'ml' Template: stock.report_picking Path: /t/t/div/t/div/table[1]/tbody/t/tr/td[1]/t/h6/span Node: <span t-field="ml.product_id.l10n_in_hsn_code"/> The above server error caused the following client error: RPC_ERROR: Odoo Server Error ``` --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change fixes an internal test setup issue in the Brazilian electronic invoicing stock module. It ensures sales orders are created with the needed permissions only during setup, helping keep automated checks reliable without granting broader access than necessary.
Original PR description
Creating an SO requires either sudo or some sort of SO group which is not set by default. In this case it looks like sudo-ing for creation during setup then unsudo-ing works fine. So do that to avoid over-accessing. https://runbot.odoo.com/odoo/error/163657
Belgian payroll users can now import warrant information from attachments as intended. This prevents payroll validation issues when warrant data is supplied through attached files, improving reliability for payroll processing.
A missing controller connection was added to the Project kanban view so that previously prepared behavior now works as intended. This helps ensure users see the correct project task interactions in the kanban interface.
Original PR description
The controller extended in the PR https://github.com/odoo/odoo/pull/194090 is not added in to the view. Adding into project kanban view.
Miscellaneous changes
When submitting message templates to the WhatsApp API, the request could occasionally time out before receiving a response. This resulted in templates being created on Facebook's side, but not registered in Odoo, as the template ID assigned by Facebook was never received. Since template names must be unique, resubmitting the same template fails, leaving the systems out of sync. This commit increases the request timeout to (10s connect, 30s read) to reduce the chance of timeouts. opw-470
Original PR description
When submitting message templates to the WhatsApp API, the request could occasionally time out before receiving a response. This resulted in templates being created on Facebook's side, but not registered in Odoo, as the template ID assigned by Facebook was never received. Since template names must be unique, resubmitting the same template fails, leaving the systems out of sync. This commit increases the request timeout to (10s connect, 30s read) to reduce the chance of timeouts. opw-4706852 opw-4720635 Forward-Port-Of: odoo/enterprise#84209 Forward-Port-Of: odoo/enterprise#83581
### Steps to reproduce: - Accounting dashboard - Click on the three dots of the "Bank" card - Click "import file" - Try importing a CAMT file with the namespace "camt" - Traceback Other issue: - Try importing a CAMT file with a custom Code in `ns:Domn/ns:Cd` (example: "IC1") - Traceback ### Cause: Namespaces can be used in CAMT files but the way Odoo handled them was incorrect. We were creating a dictionary using `root.nsmap`. It only worked when the file didn't have a namespace ke
Original PR description
### Steps to reproduce: - Accounting dashboard - Click on the three dots of the "Bank" card - Click "import file" - Try importing a CAMT file with the namespace "camt" - Traceback Other issue: - Try…
### Steps to reproduce: - Accounting dashboard - Click on the three dots of the "Bank" card - Click "import file" - Try importing a CAMT file with the namespace "camt" - Traceback Other issue: - Try importing a CAMT file with a custom Code in `ns:Domn/ns:Cd` (example: "IC1") - Traceback ### Cause: Namespaces can be used in CAMT files but the way Odoo handled them was incorrect. We were creating a dictionary using `root.nsmap`. It only worked when the file didn't have a namespace key because if the key was different from 'ns' the `findall` didn't work. Second issue: Some banks use their own codes in the CAMT files. The specification has numerous codes which Odoo added in a dictionary, and it reads from this dictionary to get a description. When there is a custom code, Odoo tries to read a key which doesn't exist explaining the traceback. ### Solution: - Change the way namespace is computed using the tag. - If the code is not in the dictionary, we take the custom code. opw-4553152 Forward-Port-Of: odoo/enterprise#82888
Currently, when validating deliveries, if multiples attachments are posted in the same chatter message, the printing jobs do not complete. Steps to reproduce: ------------------- * Install fedex * In operation types, select Delivery Orders then hardware * In print on validation, enable Carrier Labels and Export Documents * In the shipping methods, select fedex international * Change Label format to ZPL11 * Connect the database to an iot box * Set up the shipping labels to be send on z
Original PR description
Currently, when validating deliveries, if multiples attachments are posted in the same chatter message, the printing jobs do not complete. Steps to reproduce: ------------------- * Install fedex * In…
Currently, when validating deliveries, if multiples attachments are posted in the same chatter message, the printing jobs do not complete. Steps to reproduce: ------------------- * Install fedex * In operation types, select Delivery Orders then hardware * In print on validation, enable Carrier Labels and Export Documents * In the shipping methods, select fedex international * Change Label format to ZPL11 * Connect the database to an iot box * Set up the shipping labels to be send on zebra printer * Set up commercial invoice (/invoice) to be sent to another printer * Create a sale order, using fedex international as shipping * Confirm the SO * Select the delivery * Validate the delivery > Observation: Nothing prints, jobs are sent to CUPS bu not printing Why the fix: ------------ https://github.com/odoo/enterprise/blob/8075101192fb81a78f2a984cf2adf67fc77c0194/delivery_fedex_rest/models/delivery_fedex.py#L192-L196 As show, when sending the shipping, if the invoice is generated, it gets added to the attachements. The function `message_post` will post all attachments in the same chatter message. In `delivery_iot` the `message_post` function is overridden to allow sending the printing jobs to the iot. https://github.com/odoo/enterprise/blob/8075101192fb81a78f2a984cf2adf67fc77c0194/delivery_iot/models/stock_picking.py#L33-L46 Here, `attachments_names` will both contain `Label` and `ShippingDoc`. Since we enter the first if condition, the report is related to the shipping labels. Then we send the data related to all attachments to the device linked to the shipping labels, aka the zebra printer. Since the other attachment is of type PDF, the zebraprinter does not know what to do with it and ends up printing nothing. Since we can have multiple different attachment, the if/elseif condition does not make sense. By breaking it in two if, we can send both reports separately, while still keeping all attachments in the same chatter message. opw-4546715 Forward-Port-Of: odoo/enterprise#83481 Forward-Port-Of: odoo/enterprise#82094
With this commit we remove the namespaces that are not used in the cdfi document. Steps: - Create an invoice and send the edi document - Look at the xml -> namespace `xmlns:cce20="http://www.sat.gob.mx/ComercioExterior20"` is included but unused opw-4493568 Forward-Port-Of: odoo/enterprise#83838
Original PR description
With this commit we remove the namespaces that are not used in the cdfi document. Steps: - Create an invoice and send the edi document - Look at the xml -> namespace `xmlns:cce20="http://www.sat.gob.mx/ComercioExterior20"` is included but unused opw-4493568 Forward-Port-Of: odoo/enterprise#83838
The exception for the second trimester for 2024 has been redone for 2025. task-4734827 Forward-Port-Of: odoo/enterprise#84024
Original PR description
The exception for the second trimester for 2024 has been redone for 2025. task-4734827 Forward-Port-Of: odoo/enterprise#84024
Forward-Port-Of: odoo/enterprise#84038 Forward-Port-Of: odoo/enterprise#83992
Original PR description
Forward-Port-Of: odoo/enterprise#84038 Forward-Port-Of: odoo/enterprise#83992
- Set default `filter_account_type` to 'receivable' in follow-up report view for more relevant results. - Update the selection of default journal types to 'sale', 'bank' and 'cash' for follow-up reports. opw-[4724675](https://www.odoo.com/odoo/project/967/tasks/4724675), [4735031](https://www.odoo.com/odoo/project/967/tasks/4735031) Forward-Port-Of: odoo/enterprise#83513
Original PR description
- Set default `filter_account_type` to 'receivable' in follow-up report view for more relevant results. - Update the selection of default journal types to 'sale', 'bank' and 'cash' for follow-up reports. opw-[4724675](https://www.odoo.com/odoo/project/967/tasks/4724675), [4735031](https://www.odoo.com/odoo/project/967/tasks/4735031) Forward-Port-Of: odoo/enterprise#83513
The pos.order form view removed the refund button for the inherited view. This can cause issues if other modules depend on that button to add to the arch, so making it invisible would still make the element accessible by xpath. ci error https://runbot.odoo.com/runbot/build/78974416 Forward-Port-Of: odoo/enterprise#84118 Forward-Port-Of: odoo/enterprise#84030
Original PR description
The pos.order form view removed the refund button for the inherited view. This can cause issues if other modules depend on that button to add to the arch, so making it invisible would still make the element accessible by xpath. ci error https://runbot.odoo.com/runbot/build/78974416 Forward-Port-Of: odoo/enterprise#84118 Forward-Port-Of: odoo/enterprise#84030
In this commit, --------------- When multi-domains are configured in Odoo, it will generate various webhooks at UrbanPiper, which leads to the creation of duplicate draft orders along with the original order. Added a check to restrict duplicate orders with the same delivery ID and the same delivery provider. task - 4727174 Forward-Port-Of: odoo/enterprise#84026 Forward-Port-Of: odoo/enterprise#83583
Original PR description
In this commit, --------------- When multi-domains are configured in Odoo, it will generate various webhooks at UrbanPiper, which leads to the creation of duplicate draft orders along with the original order. Added a check to restrict duplicate orders with the same delivery ID and the same delivery provider. task - 4727174 Forward-Port-Of: odoo/enterprise#84026 Forward-Port-Of: odoo/enterprise#83583
Steps: === - Open Restaurant in POS system. - Create an order with preset as Takeout and select desired time. - validate it. - open that order in backend. - Observe the takeout date & time—it differs from the originally selected time. Issue: === - The POS system stores the preset_time in local time, but the backend consider it as UTC, leading to mismatched times when displayed. Fix: === - The frontend now sets preset_time in UTC before saving, ensuring consistent time handling ac
Original PR description
Steps: === - Open Restaurant in POS system. - Create an order with preset as Takeout and select desired time. - validate it. - open that order in backend. - Observe the takeout date & time—it differs from the originally selected time. Issue: === - The POS system stores the preset_time in local time, but the backend consider it as UTC, leading to mismatched times when displayed. Fix: === - The frontend now sets preset_time in UTC before saving, ensuring consistent time handling across the system. Task: 4477402 Related: odoo/odoo#194058 Forward-Port-Of: odoo/enterprise#77558
fix wrong formulas in different tables: - in "worst churn" under Value, starting the 7th line, the value used was "recurring_monthly" instead of "amount_signed" - in "worst contraction", the 10th line didn't use the list 4 like the rest of the table - in "top expansion", the 10th line didn't use the list 2 like the rest of the table Task: 4711532 Forward-Port-Of: odoo/enterprise#83019
Original PR description
fix wrong formulas in different tables: - in "worst churn" under Value, starting the 7th line, the value used was "recurring_monthly" instead of "amount_signed" - in "worst contraction", the 10th line didn't use the list 4 like the rest of the table - in "top expansion", the 10th line didn't use the list 2 like the rest of the table Task: 4711532 Forward-Port-Of: odoo/enterprise#83019
In cc759094a32e413cb1b71cbbe7be9dc85ded819f, the follow-up report generation was moved from `_send_email` to `execute_followup`, which is only called during manual follow-up processing. As a result, the report was missing when follow-ups were triggered by the cron. This commit moves the report generation logic to `_execute_followup_partner`, which is called in both manual and automatic (cron) cases. Also, patched `_run_wkhtmltopdf` in `TestAccountFollowupReports` to prevent tests from han
Original PR description
In cc759094a32e413cb1b71cbbe7be9dc85ded819f, the follow-up report generation was moved from `_send_email` to `execute_followup`, which is only called during manual follow-up processing. As a result, the report was missing when follow-ups were triggered by the cron. This commit moves the report generation logic to `_execute_followup_partner`, which is called in both manual and automatic (cron) cases. Also, patched `_run_wkhtmltopdf` in `TestAccountFollowupReports` to prevent tests from hanging, since PDF generation requires multiple workers and tests run with only one. task-4752110 Forward-Port-Of: odoo/enterprise#84114
### Issue: - In attendance-based contracts, lunch break intervals were automatically deducted from attendances,. - However, this deduction was not reflected in the generated work entries, resulting in inconsistencies between attendance duration and payroll calculations. ### Steps To Repoduce: - Set up an attendance-based contract with lunch break in the schedule. - Log attendance from 08:00 to 20:00 without logging out for lunch. - Observe: - The attendance has the lunch b
Original PR description
### Issue:
- In attendance-based contracts, lunch break intervals were automatically deducted from attendances,.
- However, this deduction was not reflected in the generated work entries, resulting in inconsistencies
between attendance duration and payroll calculations.
### Steps To Repoduce:
- Set up an attendance-based contract with lunch break in the schedule.
- Log attendance from 08:00 to 20:00 without logging out for lunch.
- Observe:
- The attendance has the lunch break interval deducted.
- The work entry does not, and includes the full duration.
### Solution:
- revert the change introduced in https://github.com/odoo/enterprise/pull/71979/commits/0a54ef993da3ef4882acdee1b8f5e378e2e9f2e0 only for contracts without flexible hours.
- Lunch breaks are now deducted from both attendances and work entries only when the contract has flexible_hours = False.
opw-4627247
Forward-Port-Of: odoo/enterprise#83825**Issue** Menu items starting with helpdesk in their URL were not dispalyed to the public user in some cases. **Steps to reproduce** - Have `website_helpdesk` installed. - Activate the website form for a helpdesk team. - Create a menu item for the website, using a URL starting with helpdesk, e.g. `/helpdesk-123-test` - This menu is always invisible to the public user. **Cause** This issue was fixed in previous versions, but it appears the duplicated `_compute_visible` code present
Original PR description
**Issue** Menu items starting with helpdesk in their URL were not dispalyed to the public user in some cases. **Steps to reproduce** - Have `website_helpdesk` installed. - Activate the website form…
**Issue** Menu items starting with helpdesk in their URL were not dispalyed to the public user in some cases. **Steps to reproduce** - Have `website_helpdesk` installed. - Activate the website form for a helpdesk team. - Create a menu item for the website, using a URL starting with helpdesk, e.g. `/helpdesk-123-test` - This menu is always invisible to the public user. **Cause** This issue was fixed in previous versions, but it appears the duplicated `_compute_visible` code present in `website.py` was not deleted in forward ports of the fix (see enterprise PR 63105). https://github.com/odoo/enterprise/blob/b320390d23d3f009beb809e0334c8fa61c44d824/website_helpdesk/models/website.py#L24-L26 As a result, the menu item starting with `/helpdesk` is matched as a helpdesk menu, but will logically not be part of the helpdesk published menus: https://github.com/odoo/enterprise/blob/b320390d23d3f009beb809e0334c8fa61c44d824/website_helpdesk/models/website.py#L30-L32 opw-4560291 Forward-Port-Of: odoo/enterprise#83863 Forward-Port-Of: odoo/enterprise#82824
### Step to reproduce: - In the settings enable Multi-step routes - Inventory > Configuration > Warehouse Management > Warehouses - Put you warehouse in manufacturing in 2 steps - Create a bill of material for a final product FP with one raw: - 3 x COMP (storable product with 10 units in stock) - Create and confirm an MO for 1 unit of FP. > This create a picking from stock to preprod for 3 unit of COMP - In the shopfloor on your MO click on the 3 dots and add components - Register
Original PR description
### Step to reproduce: - In the settings enable Multi-step routes - Inventory > Configuration > Warehouse Management > Warehouses - Put you warehouse in manufacturing in 2 steps - Create a bill of…
### Step to reproduce:
- In the settings enable Multi-step routes
- Inventory > Configuration > Warehouse Management > Warehouses
- Put you warehouse in manufacturing in 2 steps
- Create a bill of material for a final product FP with one raw:
- 3 x COMP (storable product with 10 units in stock)
- Create and confirm an MO for 1 unit of FP.
> This create a picking from stock to preprod for 3 unit of COMP
- In the shopfloor on your MO click on the 3 dots and add components
- Register a new unit of COMP
> The picking from stock to pre-prod was updated twice, hence for 5 units
### Cause of the issue:
When you add a product from the shopfloor, we create a new move from pre-prod to virtual/production with the corresponding `product_uom_qty` of 1 and confirm it:
https://github.com/odoo/enterprise/blob/fc1fb4c56da916b165c43d8f6b6a4b903733a12f/mrp_workorder/wizard/additional_product.py#L63-L68 Since the procure method of this move has been adjusted, this confirmation will correctly create and run a procurement to generate a move from stock to pre-prod. Note that this part of the flow is strictly necessary if the additional product is not already part of the component raw of the MO. However, since in the present case there is already move raw from pre-prod to virtual/production associated to that product, the action confirm will also merge our additional move with the current existing one and hence modify its `product_uom_qty`. However, an override of mrp ensures that when such modification happen, we should also run the procurement to ensure that modifying the demand of a move will also update the related pickings:
https://github.com/odoo/odoo/blob/7def831bea18a91e4fa0f9c6aa6de34f4d6d18c8/addons/mrp/models/stock_move.py#L413-L419 Since we already run that same procurement we should bypass this call in our case.
opw-4562965
Forward-Port-Of: odoo/enterprise#83555
Forward-Port-Of: odoo/enterprise#81818Updated test case `test_searching_lot_gs1`. This commit updates the test_searching_lot_gs1 test case to include an assertion ensuring that no lot is returned while searching. Related Community PR: https://github.com/odoo/odoo/pull/206268 Sentry:6544673924 OPW: 4725056 Forward-Port-Of: odoo/enterprise#83920
Original PR description
Updated test case `test_searching_lot_gs1`. This commit updates the test_searching_lot_gs1 test case to include an assertion ensuring that no lot is returned while searching. Related Community PR: https://github.com/odoo/odoo/pull/206268 Sentry:6544673924 OPW: 4725056 Forward-Port-Of: odoo/enterprise#83920
Before this commit, the user could have a crash when he tries to create a shift in non-working period because the method to search on the right timezone to use does not take into account the shift could be not linked to a resource. This commit makes sure the timezone is correctly found without any issue when we search on a timezone. Forward-Port-Of: odoo/enterprise#84224
Original PR description
Before this commit, the user could have a crash when he tries to create a shift in non-working period because the method to search on the right timezone to use does not take into account the shift could be not linked to a resource. This commit makes sure the timezone is correctly found without any issue when we search on a timezone. Forward-Port-Of: odoo/enterprise#84224
This commit backports a change done in https://github.com/odoo/enterprise/pull/83876. The check on the product vendor was based on the `_select_seller` method, which does not give any result if the quantity does not match any vendor. However, the check should be more permissive and allow the RFQ creation if a vendor exists, no matter the quantity. Part of task-4680780 Backport of https://github.com/odoo/enterprise/pull/83876 Forward-Port-Of: odoo/enterprise#83938
Original PR description
This commit backports a change done in https://github.com/odoo/enterprise/pull/83876. The check on the product vendor was based on the `_select_seller` method, which does not give any result if the quantity does not match any vendor. However, the check should be more permissive and allow the RFQ creation if a vendor exists, no matter the quantity. Part of task-4680780 Backport of https://github.com/odoo/enterprise/pull/83876 Forward-Port-Of: odoo/enterprise#83938
In this commit: === - Fixed a traceback that occurred during menu synchronization caused by multiple product.template.attribute.value (PTAV) records found, where only one was expected (singleton error). - The issue was due to having both active and inactive PTAV records linked to a product. task-4753173 Forward-Port-Of: odoo/enterprise#84127
Original PR description
In this commit: === - Fixed a traceback that occurred during menu synchronization caused by multiple product.template.attribute.value (PTAV) records found, where only one was expected (singleton error). - The issue was due to having both active and inactive PTAV records linked to a product. task-4753173 Forward-Port-Of: odoo/enterprise#84127
Issue --> When the Replenishment view is opened, the method `_unlink_processed_orderpoints` is called to remove previously automatically created orderpoints that have since been refilled. In this method, the search domain contains `qty_to_order` which causes computations to fulfil the search query. The search_query also contains `("trigger", "=", "manual")`. Even if the recordset for this leaf is 0, the `qty_to_order` computations still occur, only to return 0 records in the search. Soluti
Original PR description
Issue --> When the Replenishment view is opened, the method `_unlink_processed_orderpoints` is called to remove previously automatically created orderpoints that have since been refilled. In this…
Issue -->
When the Replenishment view is opened, the method `_unlink_processed_orderpoints` is called to remove previously automatically created orderpoints that have since been refilled. In this method, the search domain contains `qty_to_order` which causes computations to fulfil the search query. The search_query also contains `("trigger", "=", "manual")`. Even if the recordset for this leaf is 0, the `qty_to_order` computations still occur, only to return 0 records in the search.
Solution -->
Move the `qty_to_order <= 0` check after the search produces a recordset for `("trigger", "=", "manual")`. This avoids unnecessary computations.
Benchmarks -->
For this benchmark, we'll assume the worst case, where every orderpoint on the database has trigger set to `auto`. The number of seconds represents the time taken to open the Replenishment view.
| # of auto trigger orderpoints | Before | After |
|--------|--------|--------|
| 12.2k | 155.58 s | 4.49 s |
| 6k | 59.87 s | 3.78 s |
opw-4606704
Forward-Port-Of: odoo/odoo#203182This commit disable both protection upon neutralizing a db by removing the tokens. Manual forward port of #207020 opw-4734555 upg-2759374 Forward-Port-Of: odoo/odoo#207684
Original PR description
This commit disable both protection upon neutralizing a db by removing the tokens. Manual forward port of #207020 opw-4734555 upg-2759374 Forward-Port-Of: odoo/odoo#207684
In Romania, when sending multiple invoices to e-Factura, if one invoice is rejected, the Send & Print wizard will raise a UserError at https://github.com/odoo/odoo/blob/9416ca8cb63fc53a862aa8533dfa60ba33506191/addons/account/wizard/account_move_send.py#L461 This causes the transaction to get rolled back, and any successfully-sent invoices to be lost. Solution: Commit after each invoice is sent. opw-4630496 Forward-Port-Of: odoo/odoo#206901 Forward-Port-Of: odoo/odoo#205593
Original PR description
In Romania, when sending multiple invoices to e-Factura, if one invoice is rejected, the Send & Print wizard will raise a UserError at https://github.com/odoo/odoo/blob/9416ca8cb63fc53a862aa8533dfa60ba33506191/addons/account/wizard/account_move_send.py#L461 This causes the transaction to get rolled back, and any successfully-sent invoices to be lost. Solution: Commit after each invoice is sent. opw-4630496 Forward-Port-Of: odoo/odoo#206901 Forward-Port-Of: odoo/odoo#205593
Accessing external resources in chrome can increase randomness in execution for multiple reasons: - the external resource may temporary not be available - the external resource may be faster-slower to load - the external server could block some requests because of rate limiting - the network may be unreachable. Moreover, downloading fonts at every execution also slows down the tests A possibility to solve the issue was to block the network on runbot, in the dockers. The main problem
Original PR description
Accessing external resources in chrome can increase randomness in execution for multiple reasons: - the external resource may temporary not be available - the external resource may be faster-slower…
Accessing external resources in chrome can increase randomness in execution for multiple reasons: - the external resource may temporary not be available - the external resource may be faster-slower to load - the external server could block some requests because of rate limiting - the network may be unreachable. Moreover, downloading fonts at every execution also slows down the tests A possibility to solve the issue was to block the network on runbot, in the dockers. The main problem with this solution is that it wouldn't be the same behavior locally. It is also hard to adapt all versions at the same time. This commit introduced another solution, using Fetch.enable in the chrome developers tools. This will allow to have a callback on every external request, allowing to enable/disable/give an alternate answer to the request. All local request are allowed, all external request should be either blocked or an alternative answer given. This could be costly but at first glance it looks like it had no visible negative impact on performances. The first version was blocking all external requests, leading to a lot of failing tests, most of them already seen in nighties. It is hard to say since depending on when it happens it could create different error message, at least a few dozens of error related to this where found, maybe a few hundreds looking at the kind of patterns it can cause. Following this attempts a fix was to vendor all needed sources leading to ~130 cached url, with more than 100 fonts. This list was furthered reduced to have default fonts that would be returned reducing the load. A test was made to return a 404 instead and it was actually enough, and it is the same for most requests (stripe, ayden, ...). Only a few of them needs a answer close to reality. - The gooleapis css can be emty but not a 404 because it may make some of the css computation fail (website.backend_assets_all_wysiwyg.min.css) One of the failling test is TestCustomSnippet.test_01_run_tour This final version returns a 404 for most resources. A version returning 500 also works fine. This pr could impact other cis (odoosh, other runbot) but the impact is expected to be slow wince only two tests needed to be adapted outside tests/common.py. It would be still possible to make Fetch.enable optional using an environment variable. Targeting 18.0 looks reasonable for a start, could be backported to 16.0 later Note that this pr may make some random error more frequent, #207469 was needed to make this pr green. The assumption is that the speedup of the loading of some resources (or possible slowdown of local request) may change the timing of the execution revealing making some error more frequent. Forward-Port-Of: odoo/odoo#207157
Steps to reproduce the bug: - Create a service product “S1” - Create a repair order: - In the parts: - Click on the catalog Problem: You can select a service product, whereas the products in the repair parts should be restricted to consumable-type products only: https://github.com/odoo/odoo/blob/f2923dec56b5ba2436bc244337c1e430a85e7e94/addons/stock/models/stock_move.py#L45-L48 opw-4687472 Forward-Port-Of: odoo/odoo#206521 Forward-Port-Of: odoo/odoo#204527
Original PR description
Steps to reproduce the bug:
- Create a service product “S1”
- Create a repair order:
- In the parts: - Click on the catalog
Problem:
You can select a service product, whereas the products in the repair parts should be restricted to consumable-type products only:
https://github.com/odoo/odoo/blob/f2923dec56b5ba2436bc244337c1e430a85e7e94/addons/stock/models/stock_move.py#L45-L48
opw-4687472
Forward-Port-Of: odoo/odoo#206521
Forward-Port-Of: odoo/odoo#204527[FIX] accounting: missing chart line "758 Indemnités et autres produits" was missing Steps to reproduce: ------------------- * French Fiscal Localization * Open the Chart of Accounts * Line 758 missing Why the fix: ------------ Based on French government documentation https://www.anc.gouv.fr/files/anc/files/1_Normes_fran%C3%A7aises/Plans%20comptables/Plan-de-comptes-PCG-2025.pdf opw-4699235 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/
Original PR description
[FIX] accounting: missing chart line "758 Indemnités et autres produits" was missing Steps to reproduce: ------------------- * French Fiscal Localization * Open the Chart of Accounts * Line 758 missing Why the fix: ------------ Based on French government documentation https://www.anc.gouv.fr/files/anc/files/1_Normes_fran%C3%A7aises/Plans%20comptables/Plan-de-comptes-PCG-2025.pdf opw-4699235 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207312 Forward-Port-Of: odoo/odoo#205552
Issue Before This Commit: ------------------------------ The 'company' field was required but not validated in relevant triggers for scrap orders. This allowed operations to proceed even when the 'company' field was unset, leading to unexpected issues and inconsistent behavior. Steps to reproduce: ------------------------------ 1. Enable multi-step routes. 2. Create a new scrap order and add a product. 3. Remove the company from the company field. With This Commit: -----------------
Original PR description
Issue Before This Commit: ------------------------------ The 'company' field was required but not validated in relevant triggers for scrap orders. This allowed operations to proceed even when the 'company' field was unset, leading to unexpected issues and inconsistent behavior. Steps to reproduce: ------------------------------ 1. Enable multi-step routes. 2. Create a new scrap order and add a product. 3. Remove the company from the company field. With This Commit: ------------------------------ - Added a check for 'company' in relevant triggers to ensure that operations only proceed if a company is set. - This fix guarantees that the 'company' field is always set (required), preventing errors and maintaining consistent behavior in scrap orders. task-4497387 Forward-Port-Of: odoo/odoo#194702
https://runbot.odoo.com/odoo/error/163640 Forward-Port-Of: odoo/odoo#207642
Original PR description
https://runbot.odoo.com/odoo/error/163640 Forward-Port-Of: odoo/odoo#207642
Steps: === - Open Restaurant in POS system. - Create an order with preset as `Takeout` and select desired time. - validate it. - open that order in backend. - Observe the takeout date & time—it differs from the originally selected time. Issue: === - The POS system stores the preset_time in local time directly to the database, but the backend consider it as UTC, leading to mismatched times when displayed. Fix: === - The frontend now sets preset_time in UTC before saving, ensuring
Original PR description
Steps: === - Open Restaurant in POS system. - Create an order with preset as `Takeout` and select desired time. - validate it. - open that order in backend. - Observe the takeout date & time—it differs from the originally selected time. Issue: === - The POS system stores the preset_time in local time directly to the database, but the backend consider it as UTC, leading to mismatched times when displayed. Fix: === - The frontend now sets preset_time in UTC before saving, ensuring consistent time handling across the system. Task: 4477402 Related: odoo/enterprise#77558 Forward-Port-Of: odoo/odoo#194058
The certificate and keys models were added in 18.0. A few docstrings could help devs using those methods. Furthermore, a few more checks and robustness were added. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202253
Original PR description
The certificate and keys models were added in 18.0. A few docstrings could help devs using those methods. Furthermore, a few more checks and robustness were added. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#202253
Despite #205190 we still have sometimes a broken cursor, most of the time because of a websocket request. This is because this stable solution cannot catch a cursor without cookie that is executed after the browser closes, or during the next test. Checking the logs: 2025-04-11 05:18:04,048 13 INFO 78181227-16-0-all odoo.tests.common: Opening a test cursor without specified test on request /websocket in /knowledge/tests/test_knowledge_form_ui.py:TestKnowledgeUI.test_knowledge_main_flow 20
Original PR description
Despite #205190 we still have sometimes a broken cursor, most of the time because of a websocket request. This is because this stable solution cannot catch a cursor without cookie that is executed…
Despite #205190 we still have sometimes a broken cursor, most of the time because of a websocket request. This is because this stable solution cannot catch a cursor without cookie that is executed after the browser closes, or during the next test. Checking the logs: 2025-04-11 05:18:04,048 13 INFO 78181227-16-0-all odoo.tests.common: Opening a test cursor without specified test on request /websocket in /knowledge/tests/test_knowledge_form_ui.py:TestKnowledgeUI.test_knowledge_main_flow 2025-04-11 04:56:57,155 13 INFO 78181121-16-0-all odoo.tests.common: Opening a test cursor without specified test on request /websocket in /test_sale_product_configurators/tests/test_sale_product_configurator.py:TestProductConfiguratorUi.test_02_product_configurator_advanced That indicates that we are in the case where the request don't have a cookie, despite the route being called from a chrome. It is most likely due to the fact that the browser cookie are cleared at the end of a browser js call, before navigating to about:blank 2025-04-11 04:56:57,119 13 INFO 78181121-16-0-all odoo.addons.test_sale_product_configurators.tests.test_sale_product_configurator.TestProductConfiguratorUi: Deleting cookies and clearing local storage It is actually easy to reproduce by adding a sleep before navigating to about:blank in browser.clear(). We can see that the websocket route is still called periodically at the end of a test. This error will occur when this request is made just between the cookies are cleared and the page navigates to about:blank. One possibility is to avoid to clear the cookie since the user profile is deleted after the browser is stopped, but unfortunately in this version the browser is kept between tests of the same class. It is maybe not sufficient but navigating to a blank page before removing the cookies should reduce the possibility of having a request without cookie reaching the server. In this case a sleep after about:blank, before clearing the cookie shows that we don't have repeated call to /websocket anymore. Another possibility is to check if the request is a websocket request and to not open a cursor in that case if we don't have a cookie identifying the test. This cannot be done for all requests since it is possible that some call are made when generating a pdf, or any call that would open a TestCursor without being inside a browser_js or url_open Combining both solution should hopefully highly reduce this error. A final decision was made to also forbid any request coming after a browser_js. - browser_js is the main source of request reaching the server asynchronously. Other ways to create a request on the server is synchronous with the test and will wait for the result. - After a browser js, it is unlikely to make another request outside an url_open or browser_js. It was the case for some xmlrpc requests, the dirty solution was to make the test non strict during this request. Those tests could still be a small cause of randomness. Note: The explicit deletion of the session cookie is also removed, it is not needed since all cookies are cleared just after, and having a request that could reach the server without session cookies feels a little like a good solution to have random access error. Forward-Port-Of: odoo/odoo#206933 Forward-Port-Of: odoo/odoo#206006
### Steps to reproduce: - Create a leave type that creates timesheet - Create a leave for a flexible employee for 4 days - Check the timesheet created for this leave - Notice the amount of this timesheet is 83 hours not 32 ### Cause: When creating a timesheet or a work entry for a leave we get the difference between the start and the end date in milliseconds and divide it by 3600 to get the hours. Timesheet: https://github.com/odoo/odoo/blob/c3c63c3d00852010be4fe61a6f2314a099d9
Original PR description
### Steps to reproduce: - Create a leave type that creates timesheet - Create a leave for a flexible employee for 4 days - Check the timesheet created for this leave - Notice the amount of this…
### Steps to reproduce: - Create a leave type that creates timesheet - Create a leave for a flexible employee for 4 days - Check the timesheet created for this leave - Notice the amount of this timesheet is 83 hours not 32 ### Cause: When creating a timesheet or a work entry for a leave we get the difference between the start and the end date in milliseconds and divide it by 3600 to get the hours. Timesheet: https://github.com/odoo/odoo/blob/c3c63c3d00852010be4fe61a6f2314a099d99215/addons/resource/models/resource_mixin.py#L208-L213 Work entry: https://github.com/odoo/odoo/blob/c3c63c3d00852010be4fe61a6f2314a099d99215/addons/resource/models/resource_calendar.py#L522-L525 This doesn't work for flexible hours as when fetching attendance intervals for flexible employee we return one big block for the whole period as there is no attendance intervals for the flexible employees. https://github.com/odoo/odoo/blob/c3c63c3d00852010be4fe61a6f2314a099d99215/addons/resource/models/resource_calendar.py#L370-L376 ### Fix: When fetching the attendance intervals for flexible employee we return the hours per day as duration hours not the diff between the start and the end date of the period. We only use the diff between the dates in case of fully flexible. Then we use this duration hours in timesheet and work entry creation opw-4628296 Forward-Port-Of: odoo/odoo#207299 Forward-Port-Of: odoo/odoo#206252
It seems it was an error of https://github.com/odoo/odoo/commit/077f6d449a660ee6961cce8174c9c6caaf5bc23f. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207465
Original PR description
It seems it was an error of https://github.com/odoo/odoo/commit/077f6d449a660ee6961cce8174c9c6caaf5bc23f. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207465
…ds) account move line text, based on pos orders **Description of the issue/feature this PR addresses:** During the close of the PoS session, account move are generated. the text of the lines depends on the sales (and refund). for the time being, some part of text are not translatable. **Current behavior before PR:**  **Desired behavior after PR is merged:** Text can be translated. + fre
Original PR description
…ds) account move line text, based on pos orders **Description of the issue/feature this PR addresses:** During the close of the PoS session, account move are generated. the text of the lines depends on the sales (and refund). for the time being, some part of text are not translatable. **Current behavior before PR:**  **Desired behavior after PR is merged:** Text can be translated. + french translation added. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#205755 Forward-Port-Of: odoo/odoo#174511
There was an issue in the `PropertyDefinition:state.propertyDefinition`, which could sometimes not be updated properly, resulting in a traceback after multiple property definition changes. ### How to reproduce: - Open a CRM Lead form view and add a property of type `tags`. - Save and fully reload the form view. - Change the property type to `separator` - Change the property name to another value. - Click outside the popover to close it. => Traceback ``` Cannot read properties of und
Original PR description
There was an issue in the `PropertyDefinition:state.propertyDefinition`, which could sometimes not be updated properly, resulting in a traceback after multiple property definition changes. ### How to…
There was an issue in the `PropertyDefinition:state.propertyDefinition`, which could sometimes not be updated properly, resulting in a traceback after multiple property definition changes. ### How to reproduce: - Open a CRM Lead form view and add a property of type `tags`. - Save and fully reload the form view. - Change the property type to `separator` - Change the property name to another value. - Click outside the popover to close it. => Traceback ``` Cannot read properties of undefined (reading 'type') at PropertiesField.onPropertyDefinitionChange ``` ### Technical explanation: The `propertyDefinition` argument given to `onChange` props of `PropertyDefinition` component is expected to be modified in place, since it is used as the `propertyDefinition` state value. `pick` function creates a shallow copy, therefore using it on `propertyDefinition` in `PropertiesField:onPropertyDefinitionChange` and applying changes on that copy (i.e. in `_regeneratePropertyName`) will prevent these changes to be registered in the `PropertyDefinition:state.propertyDefinition`, resulting in inconsistent values with `PropertyField:propertyList`, which would manifest at the next definition change, since `_getPropertyIndex` would not be able to find the index of the now obsolete `propertyDefinition`. task-4743860 Forward-Port-Of: odoo/odoo#206977 Forward-Port-Of: odoo/odoo#206871
task-4715664 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#205388
Original PR description
task-4715664 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#205388
Since the widget for non trailing zeros float is used in payroll and payroll does not depend on hr_holidays now, we move the widget to core hr Forward-Port-Of: odoo/odoo#207441
Original PR description
Since the widget for non trailing zeros float is used in payroll and payroll does not depend on hr_holidays now, we move the widget to core hr Forward-Port-Of: odoo/odoo#207441
Steps: ----- 1. Make an order from a time zone such that does not have the same local date as UTC. For instance, from Mexico at 23h. The next day, the order date will say "Today" instead of yesterday's date. Reason: ------- We were not taking into consideration the current timezone when checking if the UTC date corresponds to the local today's date. Fix: ---- Convert the UTC date to a local date before proceeding with our conditional checks. opw-4699263 Forward-Port-Of: odoo/o
Original PR description
Steps: ----- 1. Make an order from a time zone such that does not have the same local date as UTC. For instance, from Mexico at 23h. The next day, the order date will say "Today" instead of yesterday's date. Reason: ------- We were not taking into consideration the current timezone when checking if the UTC date corresponds to the local today's date. Fix: ---- Convert the UTC date to a local date before proceeding with our conditional checks. opw-4699263 Forward-Port-Of: odoo/odoo#206827
steps to reproduce: 1. create an accrual plan that is accrued in hours (`added_value_type = 'hours'`) 2. create a time off type that can only be taken in days 3. create an accrual allocation with the plan and that time off type The calculation in the dashboard shows the amount of hours as days. The issue is that the amount of time off allocated is shown for the time off type request which is not true in this case. task: 4076800 --- I confirm I have signed the CLA and read the PR
Original PR description
steps to reproduce: 1. create an accrual plan that is accrued in hours (`added_value_type = 'hours'`) 2. create a time off type that can only be taken in days 3. create an accrual allocation with the plan and that time off type The calculation in the dashboard shows the amount of hours as days. The issue is that the amount of time off allocated is shown for the time off type request which is not true in this case. task: 4076800 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207145 Forward-Port-Of: odoo/odoo#176765
This error is generated when a user tries to `create new equipment`. Steps to Reproduce : 1. Install the `MRP` and `Maintenance` modules 2. Go to Settings and set the `Barcode Nomenclature` to `Default GS1 Nomenclature`. 3. In Maintenace > Equipments > Machine & Tools > New. `TypeError: expected string or bytes-like object, got 'bool'` The error occurs when the system attempts to parse a False value through `parse_barcode`, which expects a string. This commit resolves the error
Original PR description
This error is generated when a user tries to `create new equipment`. Steps to Reproduce : 1. Install the `MRP` and `Maintenance` modules 2. Go to Settings and set the `Barcode Nomenclature` to `Default GS1 Nomenclature`. 3. In Maintenace > Equipments > Machine & Tools > New. `TypeError: expected string or bytes-like object, got 'bool'` The error occurs when the system attempts to parse a False value through `parse_barcode`, which expects a string. This commit resolves the error by returning the original condition if a value is false. Sentry:6544673924 OPW : 4725056 Forward-Port-Of: odoo/odoo#206268
Currently the IoT Box are being infested with logs like `2025-04-17 11:30:46,925 13649 WARNING ? odoo.addons.hw_drivers.websocket_client: message type not supported: bundle_changed` This PR removes them as they aren't useful information task-4735615 Forward-Port-Of: odoo/odoo#206503
Original PR description
Currently the IoT Box are being infested with logs like `2025-04-17 11:30:46,925 13649 WARNING ? odoo.addons.hw_drivers.websocket_client: message type not supported: bundle_changed` This PR removes them as they aren't useful information task-4735615 Forward-Port-Of: odoo/odoo#206503