Daily updates from Odoo
Thursday, June 18, 2026
248 changes
3 changes
Enhancements to existing features
This update integrates with the new Gmail Chrome and Firefox extension to automatically capture email data (sender, recipients, etc.). Odoo then uses this information to provide more relevant suggestions for timesheet entries, connecting email activity with project and task assignments.
Original PR description
[IMP] timesheet_grid: Gmail watcher In this commit, Odoo now consumes data from the new Gmail Chrome and Firefox web extension, which captures the from, to, cc, and bcc fields of read and composed emails and sends them to Activity Watch. Odoo retrieves these events, extracts the emails, searches for partners linked to projects and/or tasks, and adds them to suggestions as keyEvents. task-5956040 Forward-Port-Of: odoo/enterprise#112014
Resolved issues and error corrections
This update resolves an issue where required fields on the customer form within the Point of Sale (POS) system were disappearing due to a change in how the form was displayed. The fix maintains the simplified view while allowing localization teams to easily re-enable these fields, ensuring accurate invoicing and customer data. This change was implemented to streamline the POS form without impacting core functionality.
Original PR description
*: l10n_{ar,co,in,pe,uy}_pos **Problem:** The POS "Edit/Create customer" Form was switched to a standalone, hardcoded form view (view_partner_form_pos_ui) that inherits nothing during [1], in the…
*: l10n_{ar,co,in,pe,uy}_pos
**Problem:**
The POS "Edit/Create customer" Form was switched to a standalone, hardcoded form view (view_partner_form_pos_ui) that inherits nothing during [1], in the attempt to simplify the view when accessed from the PoS.
Every field that localizations and other modules add to the partner form by inheriting base.view_partner_form therefore disappeared when accessed from PoS. Some of the fields are required, for example, to invoice.
**Solution:**
Keep the simplified view as the default, but route the view selection through an overridable hook that localization can tweak case by case. The override is applied to the affected POS bridges (see module list).
Add a test to prevent future regression.
**Note:**
Another possibility is to re-inherit for each localization the new
standalone view, but this fix would need to update the module to work,
while this one works with just a restart.
There are still ongoing discussion with PoS team to see if we really
want to go back to each localization needing to inherit backend views.
[1]: https://github.com/odoo/odoo/pull/230721/changes#diff-66cd201e7e8cfff5218a9fa93efd72f0bd77659b87359f2ca8763702462aaf92R26
opw-6244777 (many more)
Forward-Port-Of: odoo/odoo#268158This update resolves an issue where required fields on customer forms within the Point of Sale (PoS) system were disappearing for certain localization modules (Brazil, Chile, etc.). The fix temporarily keeps the simplified view while introducing a mechanism for localization teams to easily re-enable these fields. This ensures accurate invoicing and customer data.
Original PR description
*: br,cl,ec,gt,it,ke,mx **Problem:** The POS "Edit/Create customer" Form was switched to a standalone, hardcoded form view (view_partner_form_pos_ui) that inherits nothing during [1], in the attempt…
*: br,cl,ec,gt,it,ke,mx **Problem:** The POS "Edit/Create customer" Form was switched to a standalone, hardcoded form view (view_partner_form_pos_ui) that inherits nothing during [1], in the attempt to simplify the view when accessed from the PoS. Every field that localizations and other modules add to the partner form by inheriting base.view_partner_form therefore disappeared when accessed from PoS. Some of the fields are required, for example, to invoice. **Solution:** Keep the simplified view as the default, but route the view selection through an overridable hook that localization can tweak case by case. The override is applied to the affected POS bridges (see module list). Add a test to prevent future regression. **Note:** Another possibility is to re-inherit for each localization the new standalone view, but this fix would need to update the module to work, while this one works with just a restart. There are still ongoing discussion with PoS team to see if we really want to go back to each localization needing to inherit backend views. [1]: https://github.com/odoo/odoo/pull/230721/changes#diff-66cd201e7e8cfff5218a9fa93efd72f0> opw-6244777 (many more) Forward-Port-Of: odoo/enterprise#119316
20 changes
New functionality added to Odoo
This update introduces new invoice types within the Odoo accounting system specifically designed to meet Jordan's VAT regulations. These types – transit, foreign trade, and free zone transfer – allow businesses handling international transactions to accurately categorize their invoices. The system now validates that these specialized invoice types are only accessible to registered Jordanian taxpayers.
Original PR description
Extend l10n_jo_edi_invoice_type with JoFotara scope codes (3-5): transit (3), foreign trade (4), and free zone transfer (5). Validate that scope codes 3-5 are only available to registered taxpayers. task-4769255 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269632 Forward-Port-Of: odoo/odoo#268839
Enhancements to existing features
This update adjusts the checksum within the EU IoT Scale Certification module to ensure compatibility with a recent update in the core Odoo system. This change aligns the module with the latest Odoo version, preventing potential issues and maintaining proper functionality. It's a routine maintenance update.
Original PR description
This commit simply adjusts the checksum to align with the changes in odoo/odoo#269211. task-6273412
This update enhances the visual appearance of both customer receipts and preparation tickets within the Point of Sale system. Specifically, font styling has been improved, and table numbers on preparation tickets now include floor information, making them easier to read and understand for staff.
Original PR description
In this commit - --------------- Enhanced font styling for receipt and preparation ticket Added floor information next to table number on preparation ticket Task - 6125322 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269850 Forward-Port-Of: odoo/odoo#260559
Resolved issues and error corrections
This update resolves issues preventing users from accessing payslip lists within the employee departure workflow. Specifically, the code was adjusted to correctly identify departure IDs and prevent unintended modifications to payslip selections. Moving currency data to the list view also resolves a related error.
Original PR description
Bug 1: In the departure tab of the Employee, you can't open the payslip list Fix: Added a check to get the correct departure id depending on the model we are in Bug 2: You can select payslips for other employees than the departing employee and the payslips list is not affected Fix: made fields `l10n_be_payslip_n_ids` and `l10n_be_payslip_n1_ids` readonly so they can't be modified in the UI without being saved Bug 3: You get an error because you can't read `currency_id` when opening n payslips (happens when the monetary fields are shown in the list) Fix: moved the `currency_id` to be inside the list instead of the parent form task-id: 6265648
This update improves the way our system communicates scale information. Now, when a scale is set to 'tare,' the frontend receives this status update, ensuring accurate weight readings. This change enhances the reliability of weight data for inventory management.
Original PR description
See: https://github.com/odoo/enterprise/pull/119960 Before this commit, there was no way for the frontend to know if the tare function on the connected scale was active, despite the driver keeping track in the `tare_mode` variable. After this commit, we optionally send the `tare_mode` alongside the weight when `read_once` is called. By default it still returns just the weight for backwards compatibility. The `tare_mode` is now also updated by the status command, allowing it to be set as soon as tare is pressed, instead of after weight is applied. task-6273412 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where the duration field was incorrectly returning 0 due to a formula not being properly processed. Now, the field accurately calculates duration and displays an error indication when invalid input is provided, ensuring accurate time tracking.
Original PR description
Before this commit, using a formula in the duration field was returning 0. Now, it resolves the formula. TASK-6150460 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update enhances the Timesheet Assistant by streamlining suggestions, improving usability with shortcuts and hotkeys, and correcting a bug where leave time was incorrectly included in total hours. It also removes irrelevant task suggestions, ensuring a more accurate and efficient timesheet experience.
Original PR description
## Expected Behavior After Commit - Remove the green highlight when selecting a suggestion. - Add shortcuts for timesheet creation buttons. - Allow calendar events to be considered side activities - Exclude leave time from total hours, as leave time is already counted in the timesheet. - Do not show to‑do tasks (tasks without a project) in suggestions. - Restore previous suggestions for to‑do tasks when they later become linked to a project. - Add a default name for suggestions that do not have one. - Add hotkeys to Timesheet Assistant task-[6191451](https://www.odoo.com/odoo/project/4105/tasks/6191451)
This update resolves a problem preventing tests for a key manufacturing workflow (TestMultistepManufacturingWarehouse) when only the 'mrp' module is installed. The fix ensures the necessary product routes are available, allowing the test to run successfully. This improves the reliability of our testing process.
Original PR description
Launch any test of the `TestMultistepManufacturingWarehouse` by installing only mrp and teh setupCalss will fail since `route_ids` is not present in the view of the `product.template` as there is no product selectable routes with only mrp installed: https://github.com/odoo/odoo/blob/66127f790ec591456c2a562b7c224f81e6ec7b57/addons/stock/views/product_views.xml#L210-L220 However, products are created and edited using the Form class in the setupClass: https://github.com/odoo/odoo/blob/66127f790ec591456c2a562b7c224f81e6ec7b57/addons/mrp/tests/test_warehouse_multistep_manufacturing.py#L22-L40 runbot-238777 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug in the calculation of DPV (disabled period verification) for employees with extended absences. Specifically, it ensures accurate tracking of sick leave assimilation periods, particularly when transitioning between long and partial incapacities. This improves the accuracy of payroll calculations and reporting.
This update resolves an issue where timesheet billable project settings (is_billable) were not saved after closing and reopening the timesheet systray. Now, the selected settings are retained, ensuring accurate tracking of billable hours. This improves the reliability of timesheet reporting.
Original PR description
## Behavior before PR 1. Open the timesheet systray. 2. Select a billable project. 3. Toggle the is_billable field. 4. Close and reopen the systray. 5. The is_billable value resets to its default instead of keeping the updated value. ## Expected Behavior After this PR The systray now correctly retains the is_billable value after being closed and reopened. ### Technical Notes The issue occurred because the systray view loads a sudo record that triggers compute methods, which overwrite the stored is_billable value. The fix ensures that after compute methods run, the saved is_billable value is preserved.
This update fixes a limitation in the CRM Lead data enrichment process. Previously, changes made to enriched lead records couldn't be saved. Now, updated records are returned, allowing users to override and keep the most current information. This ensures data accuracy and a better user experience.
Original PR description
Return the enriched records to allow overrides. task-id: 5186595 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where stock valuations were incorrectly calculated for products without assigned value. The fix ensures that all products are considered during valuation replays, resulting in accurate inventory accounting. This prevents discrepancies in reported stock values.
Original PR description
Usecase to reproduce: - Create two average product A and B - Delele all the product.value for B - Receipt both units at 10$ - Set the price unit of A to 20$ - Receipt both units at 20$ Check the value at date to trigger a replay of valuation Expected behavior: - Product A -> 20 units at 20$ -> 400$ - Product B -> 20 units at 15$ -> 300$ Current behavior: - Correct for A but B is 200$ It happens because when we replay the history, we check for the minimal product.value and we replay valuation from this date (with moves). However in our case, the product B has no product value and thus we replay from A product.value. However it arrives after the first receipt of B and thus we only consider the second receipt for B. This is fixed by ensuring we have a product.value for all products in order to add a date domain on the moves. Forward-Port-Of: odoo/odoo#255787
This update ensures that binary files uploaded through forms now store their original filenames. Previously, this feature was limited to manual fields, causing issues with mimetype guessing and hindering migration to SaaS modules. This change improves file handling and reliability.
Original PR description
Description of the issue/feature this PR addresses: Since [1], studio binary fields uploaded through a form store their filename. Due to the condition of [1], this behaviour is restricted to manual…
Description of the issue/feature this PR addresses: Since [1], studio binary fields uploaded through a form store their filename. Due to the condition of [1], this behaviour is restricted to manual fields, which limits the usage of those fields in standard and is particularly problematic when Saas modules that use this feature are migrated to Python. Not storing the filename can lead to incorrect mimetype guesses. Given that a more appropriate condition has already been added in [2], it should no longer be necessary to restrict this feature to manual fields. This commit removes that restriction to allow standard binary fields to store their filename when uploaded through a form. Current behavior before PR: When uploading a file to a non-manual binary field that has a related '_filename' field, the filename will not be stored, which can later lead to incorrectly guessing the mimetype of the file. Desired behavior after PR is merged: Uploading a file to a non-manual binary field that has a related '_filename' field stores the filename of the file. Task related to this issue: https://www.odoo.com/odoo/project.task/5917543 [1] https://github.com/odoo/odoo/commit/0e2f3b144581c47d25a99cecdd7e058a3d55bcc3 [2] https://github.com/odoo/odoo/commit/1bcab2f42eebf98127416e54f31cd6e351938b7f --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268014
This update fixes an issue where the system incorrectly canceled down payments when sending CFDI cancellation requests. The change ensures that only invoices with a '04' origin type are used for CFDI cancellations, aligning with Mexican regulations and preventing unintended down payment cancellations. This improves data accuracy and compliance.
Original PR description
**Steps to reproduce:** - Install Sales, Accounting and l10n_mx_edi - Switch to a Mexican company (e.g. ZAPATERIA URTADO ÑERI) - Create a SO: * Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA) * Payment Way: Efectivo * Payment Policy: PUE * Product: [any product with a UNSPSC Category] * Taxes: [any] (e.g. 16%) - Confirm the SO - Create a down payment (e.g. 60%) - Confirm the down payment - Send it to CFDI - Copy the fiscal folio - Go back to SO - Create the final invoice - Set the copied fiscal folio prepend with "07|" as CFDI Origin - Confirm the invoice - Send to CFDI **Issue:** A cancellation request is sent to CFDI for the down payment. "07" origin code is used to link the invoice to a down payment. It should not cancel the down payment. It should only be done with "04" origin code used for substitution of a previous invoice. opw-6266678 Forward-Port-Of: odoo/enterprise#120757
This update resolves an issue where the l10n_sa_edi E-invoicing module would fail to install correctly if certain taxes were missing from the system configuration. The fix filters out missing taxes during installation, ensuring a smoother and more reliable module setup process.
Original PR description
**Issue:** Installing the l10_sa_edi E-invoicing module causes an error in versions 19.1 and above if any of the taxes in the account.tax-sa.csv are missing. This behavior was previously avoided via the post init function _l10n_sa_edi_post_init(), which no longer works due to the change made to ir_module.py fetching the template data during the module installation (made in commit 64f9dcb). **Reproduction Steps:** Install Accounting Configuration > Settings > Change "Fiscal Localization" to Saudi Arabia Configuration > Taxes > Delete 0% "Not Subject to VAT" tax Try to install l10n_sa_edi Saudi Arabia - E-invoicing **Fix:** Updated '_get_sa_edi_account_tax()to filter out taxes that don't already exist on the database. Removed the_l10n_sa_edi_post_init()` function since it should now be obsolete. Related ticket: opw-6293740 Forward-Port-Of: odoo/odoo#270336
This update resolves an issue where creating approval requests could trigger access errors when using supplier pricelists with inaccessible vendors. The fix ensures that the system correctly handles situations where a user lacks access to certain suppliers, preventing errors during the approval process. This improves the reliability of the approval workflow.
Original PR description
**Issue** Having supplier pricelists with at least one vendor inaccessible to the current user can trigger an access error when creating an RFQ approval request. **Steps to reproduce** - Have two…
**Issue** Having supplier pricelists with at least one vendor inaccessible to the current user can trigger an access error when creating an RFQ approval request. **Steps to reproduce** - Have two companies A and B and two users u1 and u2 - user u2 only have access to company A - With user u1: - Create two vendors v1 and v2 without any company assigned - Create vendor pricelists for a product for each vendor and assign the company A to the pricelist - Add the company B for the vendor v2 - With user u2: - Open approval application - Try to create an approval for an RFQ for that product (the vendor v1 will be automatically selected) - Save it -> An access error is thrown **Cause** Saving the approval request computes `has_no_seller`, which calls `_select_seller`: https://github.com/odoo/enterprise/blob/03c737685ff6dfc95a8bc72491646774fc426b1f/approvals_purchase/views/approval_product_line_views.xml#L9 https://github.com/odoo/enterprise/blob/03c737685ff6dfc95a8bc72491646774fc426b1f/approvals_purchase/models/approval_product_line.py#L32 https://github.com/odoo/enterprise/blob/03c737685ff6dfc95a8bc72491646774fc426b1f/approvals_purchase/models/approval_product_line.py#L62-L70 Which filtered the right seller https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_product.py#L759 By preparing the sellers: https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_product.py#L721 https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_product.py#L712 Please note that `self.seller_ids` contains both sellers (even v2) By filtering the suppliers: https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_supplierinfo.py#L104-L105 But at that point, one of the supplier in `self`, can be accessed, thus an access error is thrown while trying to access its associated `partner_id`. opw-6203910 Forward-Port-Of: odoo/odoo#269552
This update resolves an issue where creating RFQ approval requests could trigger access errors when using supplier pricelists with inaccessible vendors. The fix ensures that the system correctly handles vendor access restrictions, preventing errors during approval request creation. This improves the reliability of the approval process.
Original PR description
**Issue** Having supplier pricelists with at least one vendor inaccessible to the current user can trigger an access error when creating an RFQ approval request. **Steps to reproduce** - Have two…
**Issue** Having supplier pricelists with at least one vendor inaccessible to the current user can trigger an access error when creating an RFQ approval request. **Steps to reproduce** - Have two companies A and B and two users u1 and u2 - user u2 only have access to company A - With user u1: - Create two vendors v1 and v2 without any company assigned - Create vendor pricelists for a product for each vendor and assign the company A to the pricelist - Add the company B for the vendor v2 - With user u2: - Open approval application - Try to create an approval for an RFQ for that product (the vendor v1 will be automatically selected) - Save it -> An access error is thrown **Cause** Saving the approval request computes `has_no_seller`, which calls `_select_seller`: https://github.com/odoo/enterprise/blob/03c737685ff6dfc95a8bc72491646774fc426b1f/approvals_purchase/views/approval_product_line_views.xml#L9 https://github.com/odoo/enterprise/blob/03c737685ff6dfc95a8bc72491646774fc426b1f/approvals_purchase/models/approval_product_line.py#L32 https://github.com/odoo/enterprise/blob/03c737685ff6dfc95a8bc72491646774fc426b1f/approvals_purchase/models/approval_product_line.py#L62-L70 Which filtered the right seller https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_product.py#L759 By preparing the sellers: https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_product.py#L721 https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_product.py#L712 Please note that `self.seller_ids` contains both sellers (even v2) By filtering the suppliers: https://github.com/odoo/odoo/blob/c37e76850d3ff790b76493bd1003d80e170bd4bf/addons/product/models/product_supplierinfo.py#L104-L105 But at that point, one of the supplier in `self`, can be accessed, thus an access error is thrown while trying to access its associated `partner_id`. opw-6203910 Forward-Port-Of: odoo/enterprise#120251
This update fixes inaccurate COGS calculations for kit products in Odoo. The change ensures correct COGS are applied when creating sales orders for kits, addressing issues with multiple steps, multiple kit components, and FIFO inventory valuation. The fix unskips tests and improves the accuracy of sales order pricing.
Original PR description
There's a few problems with kits and cogs This PR fixes them and unskips most tests of the test class. **Problems:** - Problem 1 multiple steps delivery - steps to reproduce: - activate 3 steps…
There's a few problems with kits and cogs
This PR fixes them and unskips most tests
of the test class.
**Problems:**
- Problem 1 multiple steps delivery
- steps to reproduce:
- activate 3 steps delivery
- create 2 storable products 'comp A' and 'comp B'
with category standard perpetual
- for both : set a cost of 10 and on on hand quantity
- create a storable kit product with category standard perpetual
- create a kit bom for the kit product with 1 comp A and 1 comp B
- confirm a SO for 1 quantity of the kit prod
- validate only first delivery
- confirm invoice
- Current behaviour:
No cogs line
- expected behaviour :
There should be cogs for 20$
- Problem 2 multiple kits in Bom :
- steps to reproduce:
- (multiple steps delivery not needed)
- use same products as for problem 1 but, in the Bom, set
the number of kit products produced to 2
- confirm a SO for 2 quantity of the kit prod
- validate all pickings
- confirm invoice
- Current behaviour:
Cogs have a value of 10$
- expected behaviour :
There should be cogs for 20$
- Problem 3: fifo comp
- steps to reproduce:
- with 1 step delivery
- create a storable product 'comp A' with fifo perpetual
category
- Confirm a PO and validate receipt for 1 comp A at 10
- Confirm a PO and validate receipt for 1 comp A at 20
- create a storable product 'kit' with fifo perpetual categ
- create a kit bom for the kit product with 1 comp A
- confirm SO for 2 kit
- deliver 1 quantity and create backorder
- confirm invoice for 1
- COGS line are created for 10$ (as expected)
- deliver the backorder
- confirm invoice for 1
- Current Behaviour:
Cogs are created for 15$
- Expected Behaviour:
Cogs should be created for 20$
**Cause of the issues:**
To compute the price_unit used for the cogs we call
_get_cogs_value()
https://github.com/odoo/odoo/blob/f8741728294a5147c7d2427d9997738096386262/addons/stock_account/models/account_move.py#L122
What we want is the price unit for 1 unit of the kit product
So we want :
sum(unit price of each comp * quantity of comp in bom)/ quantity of kit in bom
What is done for now :
Inside the sale_mrp override, for each component of
the bom we call _get_price_unit() on its move and
add the value to 'average_price_unit' and then divide
by the quantity of the kit product in the bom
https://github.com/odoo/odoo/blob/f8741728294a5147c7d2427d9997738096386262/addons/sale_mrp/models/account_move.py#L38-L42
Inside the sale_mrp override of _get_price_unit()
we return _get_kit_price_unit() called on the move,
https://github.com/odoo/odoo/blob/f8741728294a5147c7d2427d9997738096386262/addons/sale_mrp/models/stock_move.py#L15
Inside _get_kit_price_unit(), the variable 'component_qty_per_kit',
contains the quantity of each component as recorded in the bom
times the valued quantity (sale order line quantity).
For each comp :
- we store the return value of _get_price_unit
called on its moves in 'price_unit'.
- we add to 'total_price_unit':
price_unit * component_qty_per_kit/ the kit qty in the bom
we then return total_price_unit / valued quantity
So we actually return:
sum(unit price of each comp * quantity of comp in bom*
valued quantity)/ (quantity of kit in bom * valued quantity)
which is equal to:
sum(unit price of each comp *quantity of comp in bom)
/ quantity of kit in bom
https://github.com/odoo/odoo/blob/38c737c2a4cc29b48235a100cfa9d6152af73826/addons/mrp_account/models/stock_move.py#L40-L44
Problem 1 is caused by the fact that _get_price_unit()
will return 0 if there's only internal moves because
they have a value of 0.
(The problem does not happen with a single component
cause then the fallback on the super method is correct, but
with multiple comp the super method also returns 0
because _get_cogs_price_unit returns 0 when more than
one product).
Problem 2 is caused by the fact that we divide by the
quantity of the kit in the bom (kit_bom.product_qty) here
(inside _get_kit_price_unit) and again inside _get_cogs_value
as mentionned before.
Problem 3 happens because there is no mechanism
to account for already posted cogs inside the sale_mrp
override of _get_cogs_value(), as qty_invoiced
is computed but never used
https://github.com/odoo/odoo/blob/38c737c2a4cc29b48235a100cfa9d6152af73826/addons/sale_mrp/models/account_move.py#L31
**Fix**
As regards to the super methods (so non kit scenario),
_get_cogs_value() is used to :
- use original invoice if needed
- use standard price of the product if no moves
- deduct already posted cogs
- calls get _get_cogs_price_unit() to compute price_unit
based on the moves
All of this is also wanted for kits and don't need adaptation,
therefore the override should be on the _get_cogs_price_unit
where we do need a different behaviour when the product is a kit
Doing this we benefit from the 'already posted mechanism'
from _get_cogs_value which solves problem 3
Additionally, instead of calling get_price_unit we can directly
call the super method _get_cogs_price_unit as we have
already computed all the components quantities needed
for our computation and therefore don't need
_get_kit_price_unit to recompute all of this.
Also, _get_cogs_price_unit will fall back on the product
standard price if the move has no value which solves
problem 1.
That will also prevent dividing twice by the quantity
of kit product in the bom (bom.product_qty)
which solves problem2.
**Tests:**
Out of the 9 existing tests of the class (that were skipped
before this PR) and after adapation to v19 valuation :
- 2 succeeded before and after the fix : this PR unskips them
- 5 failed before the fix and now suceed with the fix : this PR
unskips them
- 2 failed before the fix and after the fix, they were let
skipped
In addition, 2 tests were added to cover problem 1 and 3
(problem 2 is covered in test test_sale_mrp_kit_bom_cogs)
Forward-Port-Of: odoo/odoo#270075This update fixes an issue where the appointment calendar incorrectly displayed 'no slots available' when navigating to future months. The change accounts for appointment lead times, ensuring the calendar accurately reflects available slots regardless of appointment start times. This improves the user experience for scheduling appointments.
Original PR description
The website appointment calendar fills availabilities one month at a time and the update_available_slots route maps the calendar month index to an absolute month from datetime.now(). This only…
The website appointment calendar fills availabilities one month at a time and the update_available_slots route maps the calendar month index to an absolute month from datetime.now(). This only matches the displayed months when the first one is the current month. When the first bookable slot is later, a punctual appointment starting in a future month or any appointment whose "at least X hours before start time" lead time pushes the first slot past the current month, navigating forward requests the wrong month and the reached month renders empty. In update_available_slots, take the lead time into account when computing the reference month so it lands on the first displayed month: the start datetime for a punctual appointment starting in the future, otherwise now plus the minimum schedule hours. The navigated month index is then added to that reference. This extends https://github.com/odoo/enterprise/commit/f0e5b14a823cf97218f4094d287a328e2744fd73 which only handled the future start datetime. Steps to reproduce: 1. Open the Appointments app 2. Open an appointment type, set Schedule to Weekly and Allow Bookings to On specific dates with a range ending a few months out 3. Set the "at least N hours before start time" field to 360 4. Save and click the Preview button in the header 5. Pick a resource or staff member to reach the calendar 6. Click the right arrow to navigate to the next month => the next month shows "Sorry, we have no more slots available for this month" opw-6206293 Forward-Port-Of: odoo/enterprise#120715
This update fixes an issue where the /checklist command was not functioning in the CRM's activity note editor. The change restores the checklist functionality, ensuring users can easily add and manage checklists within their activity notes. This improves workflow efficiency for tracking tasks and follow-ups.
Original PR description
In 19.0 the /checklist command does not appear in the activity note editor. The note fields of activities, the schedule activity wizard and activity plan templates were moved to widget="html_mail" by…
In 19.0 the /checklist command does not appear in the activity note editor. The note fields of activities, the schedule activity wizard and activity plan templates were moved to widget="html_mail" by https://github.com/odoo/odoo/commit/2f61560ab45576191394510016c38a7442b95ec8, https://github.com/odoo/odoo/commit/35d673dccdc0f0c2a06cb0732e3148370f035af9 and https://github.com/odoo/odoo/commit/4d3a6156d07dc47bb2399d1907e2a47869827933 to render attachment overviews statically instead of with embedded components. html_mail is made for email bodies, it inlines the content on save and it disables the checklist since https://github.com/odoo/odoo/commit/f94f695ca9fc9a894a837640df2e4160e561f1ab because checklists do not survive the inlining of outgoing emails. The activity note is not an email body, so it gets both side effects for nothing. Keep the default html widget on these note fields and pass the embedded_components option as false, which is the only part of html_mail the attachment commits needed. The checklist works again, the note is not inlined on save anymore, and the attachment overview still renders statically. The widgets used for real email bodies keep the checklist disabled. Steps to reproduce: 0. Install the CRM module. 1. Open a lead from the CRM pipeline. 2. Click Activity to open the Schedule Activity dialog. 3. Click inside the Log a note field and type /checklist. => Checklist doesn't appear. Ticket [link](https://www.odoo.com/odoo/project.task/6139971) opw-6139971 Forward-Port-Of: odoo/odoo#261071
4 changes
Resolved issues and error corrections
This update resolves an issue where focusing on the end date within a daterange widget incorrectly modified the start date. The fix ensures that the correct date field is updated when a user interacts with the input fields, improving data accuracy and reliability. This change impacts the daterange widget functionality.
Original PR description
When a daterange widget is used (e.g., `deferred_start_date` coupled with `deferred_end_date`), focusing on the end date input was incorrectly modifying the start date field. This occurred because the `focusin` event was resolving the field name from the parent widget rather than the specific input focused. This commit updates `onFocusFieldWidget` and `getFullFieldName` to accept and evaluate the specific `event.target`. For `o_field_daterange` widgets, it now extracts the correct field name from the target's `data-field` attribute, ensuring the correct date field is updated. opw-6250048 Forward-Port-Of: odoo/enterprise#120684
This update resolves a bug that caused the manual correction tool to crash when filling in bank statement lines. The issue stemmed from a missing context variable, preventing the correct journal from being assigned, leading to an error during line modifications.
Original PR description
When the manual correction tool was used to fill in the lines, we weren't passing the active context when creating the new records. In the case of bank statements, it could be an issue as the `default_journal_id` key is expected to be present to set the correct journal on the newly created bank statement line. Without this key in the context, it would default to the first journal with a valid type (see function `_search_default_journal`). If the journal found this way didn't match the current journal, a crash would occur when modifying the newly created lines. opw-[6294117](https://www.odoo.com/odoo/unassigned-tasks/6294117) Forward-Port-Of: odoo/enterprise#120745
Code cleanup and technical improvements
This update enhances the Odoo system by making a key component, `fragment_to_query_string`, more accessible to all modules. Previously, it was limited to the auth_oauth module, but now it's been updated to be more reliable and compliant with industry standards, improving overall system stability and testability. This change ensures consistent behavior across the Odoo platform.
Original PR description
## [MOV] odoo,auth_oauth: fragment_to_query_string The aim of this commit is to allow module unrelated to auth_oauth to import fragment_to_query_string. task-id: 6071808 ## [REF] odoo: JUC compliant fragment_to_query_string The aim of this commit is to make `fragment_to_query_string` JUC compliant by: - documenting the behavior - clarifying the code - reducing possible side effect - testing the behavior - add a route to be able to test it manually task-id: 6071808 Forward-Port-Of: odoo/odoo#270834
This update ensures that the system continues to accurately use a recently moved function related to handling URLs. The change is a technical refactoring to maintain consistency within the Odoo codebase. It doesn't impact users directly.
Original PR description
The aim of this commit is to keep referencing fragment_to_query_string correctly as it is moved into `http.py`. task-id: 6071808 Forward-Port-Of: odoo/enterprise#121019
2 changes
Resolved issues and error corrections
This update ensures that binary files uploaded through forms now correctly store their filenames. Previously, this feature was limited to manual fields, causing issues with mimetype guessing and potential problems when migrating SaaS modules. This change improves the reliability of file uploads and supports broader usage across Odoo.
Original PR description
Description of the issue/feature this PR addresses: Since [1], studio binary fields uploaded through a form store their filename. Due to the condition of [1], this behaviour is restricted to manual…
Description of the issue/feature this PR addresses: Since [1], studio binary fields uploaded through a form store their filename. Due to the condition of [1], this behaviour is restricted to manual fields, which limits the usage of those fields in standard and is particularly problematic when Saas modules that use this feature are migrated to Python. Not storing the filename can lead to incorrect mimetype guesses. Given that a more appropriate condition has already been added in [2], it should no longer be necessary to restrict this feature to manual fields. This commit removes that restriction to allow standard binary fields to store their filename when uploaded through a form. Current behavior before PR: When uploading a file to a non-manual binary field that has a related '_filename' field, the filename will not be stored, which can later lead to incorrectly guessing the mimetype of the file. Desired behavior after PR is merged: Uploading a file to a non-manual binary field that has a related '_filename' field stores the filename of the file. Task related to this issue: https://www.odoo.com/odoo/project.task/5917543 [1] https://github.com/odoo/odoo/commit/0e2f3b144581c47d25a99cecdd7e058a3d55bcc3 [2] https://github.com/odoo/odoo/commit/1bcab2f42eebf98127416e54f31cd6e351938b7f --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268014
This update fixes a potential issue related to how Odoo handles direct debit mandates for bank partners. The change adds a constraint to ensure that direct debits are only created for partners with valid bank accounts, improving data accuracy and reducing the risk of errors in payment processing. This enhances the reliability of our SEPA direct debit functionality.
Original PR description
Forward-Port-Of: odoo/enterprise#120921 Forward-Port-Of: odoo/enterprise#120901
15 changes
Security fixes and vulnerability patches
This update enhances the security of our Gemini integration by moving the API key from a URL parameter to a header. This change reduces the risk of exposing the key in logs or browser history, aligning with best practices for sensitive data. The update is a critical security improvement.
Original PR description
Task-6306377 Forward-Port-Of: odoo/enterprise#120680
New functionality added to Odoo
This update adds a keyboard shortcut to the Pay Now button within the account payment workflows. This will allow users to initiate payments more quickly and efficiently, streamlining the payment process and reducing the time spent navigating the interface.
Original PR description
Self explanatory. No task ID
Enhancements to existing features
This update adds helpful tooltips to key lines within the French fiscal declaration reports. These tooltips provide users with immediate context and explanations for each line, improving understanding and reducing potential errors when preparing these important financial reports. This enhancement supports compliance and simplifies the reporting process.
Original PR description
In order to help users understand the meaning of some lines of the fiscal declaration reports, we are adding tooltips on some of them. Task ID: 6159842
This update enhances the ECO report and its associated form, making it easier for users to review and understand changes. Key improvements include a simplified report layout, a more user-friendly form with a non-mandatory description field, and a smart button that only appears when changes are present, streamlining the approval process.
Original PR description
- ADD title : ECO Changes Summary - ADD subtitle : name of the ECO - The description field is not mandatory anymore - The smart button `Review changes` is only visible if there are changes to review, otherwise it is hidden. Task-6208775
This update enhances the AI chat experience by allowing conversations to be stored for 30 days after the last message, enabling users to resume chats and gather feedback. A new 'AI' category has been added to the discuss app for easy access, alongside features for managing and deleting AI chat sessions.
Original PR description
\* = crm_livechat, livechat, website Purpose: -------- Instead of deleting AI chat channels when closing the chat window, they are deleted 30 days after that the last message was sent (they are still…
\* = crm_livechat, livechat, website Purpose: -------- Instead of deleting AI chat channels when closing the chat window, they are deleted 30 days after that the last message was sent (they are still deleted on close if no message was sent), allowing users to resume their AI conversations as well as allowing to gather feedback and evaluate the agents that are used in livechats. To ease the access to these AI conversations, a new discuss category has been introduced (making them visible in the sidebar of the discuss app). When an ai chat is expanded in full view, this category is automatically unfolded and all the other ones are folded. A new thread action "delete-ai-chat" has also been added to give the users the ability to delete their AI conversations themselves. For this purpose, the `/ai/close_ai_chat` route which was previously used every time an ai chat was closed to delete the channel if needed has been replaced by a simple unlink (the checks are now done on the client side), because only used for internal users: the channel is already deleted if a guest leaves an empty livechat channel, and one should keep the ones where a guest sent a message. ACLs have been added so that users can unlink their own AI chat channels. Some other related changes have been done such as adding a new AI category in the messaging menu, showing the AI agent partner on the livechat session's kanban cards,... Task-6007887
This update streamlines the process of submitting CIS returns by automatically generating them when applicable. Instead of a separate report submission, the system now integrates CIS return generation with the existing account return flow, improving efficiency and accuracy. This ensures compliance with UK tax regulations.
Original PR description
* Generate CIS returns automatically if period had move lines with CIS tax tags used. * Instead of submitting the CIS return via report, integrate cis submission with account return flow. task-5481774
This update changes the color of the 'To Review' status badge on employee records from grey to orange. This improves readability, particularly in dark mode, ensuring that HR staff can quickly identify and address outstanding tasks.
Original PR description
The 'To Review' status on employees uses a grey badge ('secondary'), which has poor contrast and is nearly invisible in dark mode.
Update the 'review_state' field options to change '2_to_review' to 'warning' (orange). This ensures the badge is readable in both light and dark modes.
Task: 6289919
Forward-Port-Of: odoo/enterprise#120486
Forward-Port-Of: odoo/enterprise#120268This update enhances the integration with UrbanPiper by dynamically syncing product tags based on tax configurations. Now, users can define relevant tags for their products, ensuring UrbanPiper receives the correct information and improving data accuracy for orders.
Original PR description
Before this commit: ------------------------------------------ - The UrbanPiper payload used a hardcoded tag when the tax percentage was not 5%. - There was no mechanism to add additional tags based on providers, even though UrbanPiper supports multiple tags. After this commit: ------------------------------------------ - Tags are now dynamically handled using the Tag field in the product. - Users can define tags according to their tax configurations and aggregator requirements. - UrbanPiper only accepts relevant tags (default or provider-specific). task - 5154061 Forward-Port-Of: odoo/enterprise#118827 Forward-Port-Of: odoo/enterprise#96742
Resolved issues and error corrections
This update corrects a technical error in the Odoo Enterprise payroll module that was causing incorrect cache behavior when rule parameters were missing from the database. The fix ensures that the system correctly identifies missing parameters, preventing errors and improving the stability of payroll calculations. This resolves a potential issue impacting payroll accuracy.
Original PR description
After https://github.com/odoo/enterprise/commit/1ee878fea4e5985852960bb4640a32abfa95ac9e: `_get_cached_parameter_from_code` returns `SENTINEL` when a rule parameter doesn't exist in the DB. `CacheLayer.__getitem__` uses that same `SENTINEL` to detect absent keys. When the stored value IS `SENTINEL`, it is indistinguishable from a missing key; so every subsequent lookup falls through to the parent and raises `KeyError` which `ormcache.lookup()` treats as a miss. applied fix: make _get_cached_parameter_from_code use different object than Sentinel for missing parameters.
This update prevents deleting a batch payment once linked payments have been marked as 'sent' and an XML export file has been generated. This ensures continued compliance with SEPA regulations, which require payments to remain marked as sent. Disallowing deletion maintains the integrity of export files for reporting.
Original PR description
When you create a batch payment, linked payments are marked as sent, and an export file is generated (XML). But if you delete the batch payment, the payments will remain marked as sent, meaning you won't be able to re-generate a new XML file for those payments. As we don't want to unmarked them as sent (we can't for SEPA payments), we decided to disallow the batch payment deletion in those cases. task-6117210 Forward-Port-Of: odoo/enterprise#117748
This update corrects a technical issue in the l10n_ch_reports module that was causing errors during financial report processing. The problem stemmed from a removed subformula not being reset to a default value, leading to incorrect calculations. This fix ensures accurate report generation by setting the subformula value to False.
Original PR description
The subformula was [removed](https://github.com/odoo/enterprise/pull/117601) without resetting its value to False, leaving existing values in the database. This causes errors when processing records that still contain a subformula value. ```.py Invalid subformula in expression "balance" of line "Treasury shares": -sum ``` To prevent these errors, existing subformula values are reset to False opw-6297901 Forward-Port-Of: odoo/enterprise#120663
This update fixes a minor visual issue in the web studio's property tag display within SelectMenus. Previously, tags were limited to 200px, leaving unused space. Now, tags automatically expand to fill the available width, creating a cleaner and more efficient user experience.
Original PR description
Before: Each tag was limited to 200px, leaving available space unused. After: Each tag now expands to 100% of the available width. task-5226503 Forward-Port-Of: odoo/enterprise#120260
This update resolves an issue that caused a traceback when users deleted the last column from a table within the Odoo Report Editor. The fix prevents a technical error by ensuring the editor handles the scenario where a table has no remaining columns gracefully. This improves the overall stability and reliability of the report design process.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696 Forward-Port-Of: odoo/enterprise#119502
This update fixes a display issue where the AI button was incorrectly shown in the Mass Mailing builder but not the Website Builder. The fix redirects patching to the Website Builder, ensuring the AI button appears only when using the website functionality. This improves the user experience for website visitors.
Original PR description
__Problem__ When opening the Mass Mailing builder after the Website Builder, the AI button is still shown. Conversely, if we open the Website Builder after the Mass Mailing builder, the AI button is never shown. This happens because Owl mounts the Builder component only once as long as we don't refresh the page. Since we patch the generic HTML Builder to put the AI button in the sidebar, the state of the first time it's mounted is preserved. __Fix__ Patch the Website Builder directly instead, as we only want the AI button to be available in the website. Community PR: odoo/odoo#270266 task-6189057 Forward-Port-Of: odoo/enterprise#120688
Features or functions removed from Odoo
This update removes a technical field related to how messages are fetched within the Helpdesk system. The change streamlines message access by centralizing control through the mail module, improving efficiency and security. This ensures consistent access to messages across different use cases.
Original PR description
This change removes `website_message_ids` field considering: - Toward using a unique route for fetching the messages, the mail module should be the main gateway to restrict access to messages. Since reading a field that contains the whole messages of a record without pagination is not a good idea and considering what `website_message_ids` does (defining domains depending on the share context), this change moves the domain responsibility to a method on `mail.thread`. - There are some use cases (e.g. reading the comments on slides) where the same restriction as fetch route restriction is needed to get the correct data. Those cases would use a same fetch domain method from `PortalWebClientController`. [Community PR](https://github.com/odoo/odoo/pull/261003)
3 changes
Resolved issues and error corrections
This update resolves a minor issue in the marketing automation dashboard by correcting calculations for key engagement metrics. Specifically, the KPI engagement rate and its n-1 counterpart are now accurately calculated using error handling to prevent display issues when data is missing. This ensures more reliable reporting on marketing campaign performance.
Original PR description
This commit fixes two issues:
- KPI engagement rate ('Mailing Statistics'!B16) should be =iferror((B7+B9)/B10),0)
- KPI engagement rate n-1 ('Mailing Statistics'!C16) should be =iferror((C7+C9)/C10),0)
Task: 5418449This update corrects an issue where appointment invitations weren't always sent correctly, particularly when appointments were cancelled or updated. The fix ensures invitations are now sent only for 'booked' or 'requested' appointments, and for new attendees added to existing booked appointments, streamlining communication and improving appointment management.
Original PR description
This PR fix three issues related to the sending of the appointment invitations. Each one has its own commit: - Commit 1 sends invitations only if the event either "booked" or "request". Previously they were sent even if the appointment was cancelled. - Commit 2 prevents the sending of regular invitations and always sends appointment invitation to new attendees of existing booked appointments. - Commit 3 sent appointment invitations if the status of an existing event is set "request". It also add the status change in the log as it would have been if it was done at the creation. Community PR: https://github.com/odoo/odoo/pull/260073 Task-6139036
Code cleanup and technical improvements
This update ensures that references to a key function, `fragment_to_query_string`, are correctly managed as it's integrated into the core HTTP handling within Odoo. This refactoring improves the stability and maintainability of the social media controllers, ensuring consistent behavior across the platform.
Original PR description
The aim of this commit is to keep referencing fragment_to_query_string correctly as it is moved into `http.py`. task-id: 6071808
1 change
Resolved issues and error corrections
This update fixes an issue where rapid changes to product quantities in the product catalog sometimes resulted in incorrect final quantities on Sale Order Lines. The fix ensures that quantity updates are processed sequentially, preventing a race condition that caused data inconsistencies. This improves the accuracy of sales order calculations.
Original PR description
Fix a concurrency race condition in the product catalog where rapid quantity updates could result in incorrect final quantities on Sale Order Lines (SOL). Steps to produce: --- - We need a DB with…
Fix a concurrency race condition in the product catalog where rapid quantity updates could result in incorrect final quantities on Sale Order Lines (SOL). Steps to produce: --- - We need a DB with too many products. Also it might not be easy to reproduce the issue locally. Try runbot. - Open a Sale Order (SO) and open the Product Catalog. - Rapidly change or paste quantities (e.g., changing from 1 to 100) across multiple records very fast. - Return to the SO. Some lines intermittently retain an intermediate quantity (e.g., qty = 1) instead of the final entered value. Cause: --- - This is a concurrency issue. In the faulty cases, the `update_order_line_info` setting quantity to 1 takes a few seconds to resolve, while the update setting quantity to 100 resolves faster (around 200ms). This cause the SOL final quantity set to 1. Fix: --- - We can chain RPC calls to ensure that each request is completed before starting the next one. Backport of ef9554ad95d5e39ab7b550db0d39454373f99aed opw-6282877 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269750