Daily updates from Odoo
Navigate
Branch
Monday, August 5, 2024
41 changes
19 changes
Resolved issues and error corrections
Point of Sale receipts now show the correct base and total amounts when a tax is already included in the product price. This prevents customers and cashiers from seeing misleading tax details on receipts for these sales.
Original PR description
Currently, when buying a product with a division tax using price included the base price used to compute the total is not correct and will show a wrong total value. Steps to reproduce:…
Currently, when buying a product with a division tax using price included the base price used to compute the total is not correct and will show a wrong total value. Steps to reproduce: ------------------- * Go into the **Accounting** app * Under **Configuration** select **Taxes** * Create a new Tax * Tax Computation: `Percentage of Price Tax Included` * Amount 10% * Advenced Options > Included in price: `True` * Go to the **Point of sale** App * Create a new product. * Price: 200 * Tax: the one just created * Open shop session * Create an order with the new product and pay it > Observation: On the receipt, on the tax details, we can see: Tax: 10%, Amount: 20, Base: 200, Total: 220. This is not correct, the client paid 200 as tax is included in price. Why the fix: ------------ Currently the Base value on the receipt is given `taxValues.base`. The same quantity is also used for the computation of the Total shown. https://github.com/odoo/odoo/blob/49cecec35421cc36258f900d99c1040596601167/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/order_receipt.xml#L75-L76 However, if we look where the `taxValues` come from we see that they correspond to `tax_details` in `export_for_printing`. https://github.com/odoo/odoo/blob/49cecec35421cc36258f900d99c1040596601167/addons/point_of_sale/static/src/app/store/models.js#L1314 When checking the function `get_tax_details` we realize that `taxValues.base` actually refers to the `display_base` https://github.com/odoo/odoo/blob/49cecec35421cc36258f900d99c1040596601167/addons/point_of_sale/static/src/app/store/models.js#L2228 As disucssed with LAS, here is how the values on the receipt should be computed: ``` Amount = amount = 20 Base = display_base = 200 Total = base + amount = 180 + 20 ``` Technically, prior to the fix, here is how the value shown are computed: ``` Amount = amount = 20 Base = display_base = 200 Total = display_base + amount = 180 + 20 ``` This computation is problematic only in the setting explained earlier as this is the only one which will have a different value for `base` and `display_base`: https://github.com/odoo/odoo/blob/b8baa83e575a36dd539c9fda10d5ffbe3ef01183/addons/account/static/src/helpers/account_tax.js#L408-L411 Why do we write ```<span t-esc="props.formatCurrency(taxValues.display_base || taxValues.base, false)" />``` instead of just ```<span t-esc="props.formatCurrency(taxValues.display_base, false)" />``` with the changes currently applied in `get_Tax_details`? Well, when using the kiosk, information about the `display_base` does not exist in `_compute_tax_details`: https://github.com/odoo/odoo/blob/b8baa83e575a36dd539c9fda10d5ffbe3ef01183/addons/pos_self_order/models/pos_order.py#L41-L61 Thus we avoid an error when using the function `export_for_printing` by using `taxValues.base` as there is no `taxValues.display_base` provided. This is currently the only other time where the function `export_for_printing` sets the value sent for `tax_details`. opw-4032366
Miscellaneous changes
This commit is a follow up of its enterprise part. We add the user_context to the the params of the function to have access to the allowed_companies of the current user later on in the process. affected version: 15.0- master task - 361682 https://www.odoo.com/web#id=3631682&menu_id=4720&cids=1&action=333&active_id=4105&model=project.task&view_type=form Forward-Port-Of: odoo/odoo#171436 Forward-Port-Of: odoo/odoo#147768
Original PR description
This commit is a follow up of its enterprise part. We add the user_context to the the params of the function to have access to the allowed_companies of the current user later on in the process. affected version: 15.0- master task - 361682 https://www.odoo.com/web#id=3631682&menu_id=4720&cids=1&action=333&active_id=4105&model=project.task&view_type=form Forward-Port-Of: odoo/odoo#171436 Forward-Port-Of: odoo/odoo#147768
Steps to reproduce the issue: - Debug mode > Settings > Technical > Decimal Precision > Product Price - Set to another number - Purchase > Any Purchase order - Mobile view, puchased item has a decimal precision of 2 Why is this a bug: Kanban view is the only one to disregard Product Price Precision setting What this fix does: Update the display with correct decimal precision opw-3984082 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr F
Original PR description
Steps to reproduce the issue: - Debug mode > Settings > Technical > Decimal Precision > Product Price - Set to another number - Purchase > Any Purchase order - Mobile view, puchased item has a decimal precision of 2 Why is this a bug: Kanban view is the only one to disregard Product Price Precision setting What this fix does: Update the display with correct decimal precision opw-3984082 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172049
Currently, when a loyalty program has a reward of type product and uses `reward_product_tag_id` (set up for at least 2 products), the addition of rewards to the pos order will have mismatched reward lines when adding the second free product (the first product needed to be added first). Steps to reproduce: ------------------- * Go to **Point of Sale** App * Go to **Products** and add a tag (the same) for two products * Under **Products** select `Discount & Loyalty` * Create a new program
Original PR description
Currently, when a loyalty program has a reward of type product and uses `reward_product_tag_id` (set up for at least 2 products), the addition of rewards to the pos order will have mismatched reward…
Currently, when a loyalty program has a reward of type product and uses `reward_product_tag_id` (set up for at least 2 products), the addition of rewards to the pos order will have mismatched reward lines when adding the second free product (the first product needed to be added first).
Steps to reproduce:
-------------------
* Go to **Point of Sale** App
* Go to **Products** and add a tag (the same) for two products
* Under **Products** select `Discount & Loyalty`
* Create a new program of type **Buy X Get Y**
* Rule:
* Min qty: 2 products $0.00
* Among Products: Put all chairs products for example
* Reward:
* Type: Free Product
* Product: None
* Product tag: The tag put on the products previously
* Open shop session
* Add 2 chairs
* Select reward, add the first one
> Everything ok until now
* Add 2 chairs
* Select reward, add the second one
> Observation: Reward computation is wrong we have the following lines:
```
4 Chairs,
Reward 1,
Reward 2,
Free product reward 1
```
> We are missing the free product line related to the second product added and the button to select reward is still highlighted.
Why the fix:
------------
To explain this fix I will use the example given above.
Here are the steps that have been executed already
* Add 2 chairs
* Add the first reward product
* Add 2 chairs
We are currently in the middle of the step "Add second reward product". During that process, we end up in the function `_computeUnclaimedFreeProductQty` while computing values for the reward line. At this very moment in time, the order has the following lines:
* 4 Chairs
* Product 1
* Free product (related to Product 1)
* Product 2
Where Product 1 and Product 2 are the reward products, having the same tag.
Let's focus on this piece of code, with the current example: https://github.com/odoo/odoo/blob/76023820c4d725c81677d2bf3e010c8cee1edd19/addons/pos_loyalty/static/src/js/Loyalty.js#L1464-L1475
Where `product` in this case is `Product 2`. What is happening here at the end is that we have `available = 1` because of line 4 and `claimed = 1` because of line 3. The program considers that we have already claimed the quantity and is the reason why it is not adding the reward line.
The first idea to fix this issue was to write the condition:
```js
if (reward.reward_product_ids.includes(product.id) && reward.reward_product_ids.includes(line.product.id)) {
```
instead of this one
```js
if (line.get_product().id === product.id) {
```
Now both line 2 and 4 are counted toward the `available` quantity. This way the code knows that we have two availaible free product but only 1 was claimed.
While this fixed the original issue, a new issue was created. Now, when we add the second product, the two reward lines were grouped together, using the price of the first free product added. Why was this happening?
Well, once the fist call to the function `_computeUnclaimedFreeProductQty` was done and the reward line was added we had the following order (temporarily)
* 4 Chairs
* Product 1
* Free product (related to Product 1)
* Product 2
* Free product (related to Product 2)
Which is what we expect but we face an issue when the loyalty programs are updated. When the programs update, we go through the function `_updateRewardLines`. In this function we discard the reward lines from the order and then for each claimed reward (Product 1 and Product 2) we re-apply the reward.
While applying the reward for Product 1, we again go through the function `_computeUnclaimedFreeProductQty`. In this case, the order looks like this:
* 4 Chairs
* Product 1
* Product 2
and the function will say that there are 2 available free product and 0 claimed. Were it is technically true, in this case we want to have the available quantity to 1. We want the initial condition:
```js
if (line.get_product().id === product.id) {
```
In the second passage, for product 2, we have `available = 2` and `claimed = 2`.
opw-3587020
Forward-Port-Of: odoo/odoo#175514
Forward-Port-Of: odoo/odoo#173529Steps to reproduce the bug: - In Website edit mode. - Drag and drop enough snippets to have a vertical scrollbar. - Scroll the page to the top. - Drag and drop a dynamic snippet (e.g. Products) at the bottom of the viewport. - Bug: The page doesn't scroll to the dynanmic snippet. The bug was due to the fact that we needed to know the top position of the snippet to set the scroll value. However, it wasn't possible to get the offset of the element because the dynamic snippets were set to
Original PR description
Steps to reproduce the bug: - In Website edit mode. - Drag and drop enough snippets to have a vertical scrollbar. - Scroll the page to the top. - Drag and drop a dynamic snippet (e.g. Products) at…
Steps to reproduce the bug: - In Website edit mode. - Drag and drop enough snippets to have a vertical scrollbar. - Scroll the page to the top. - Drag and drop a dynamic snippet (e.g. Products) at the bottom of the viewport. - Bug: The page doesn't scroll to the dynanmic snippet. The bug was due to the fact that we needed to know the top position of the snippet to set the scroll value. However, it wasn't possible to get the offset of the element because the dynamic snippets were set to "display: none" when this calculation was made. It's a bug we had before and fixed with this commit [1]. It worked. But since this other commit [2] where dynamic snippets are no longer hidden with the Bootstrap class "d-none" but with the class "o_dynamic_empty", the fix no longer works. [1]: https://github.com/odoo/odoo/commit/963f0ed02eba929fcbc65fe51bef95c2a1dcf2ea [2]: https://github.com/odoo/odoo/commit/63def9c87305dd7773e0592a28fe19d0b63c0878 task-4072655 Forward-Port-Of: odoo/odoo#175207
This fix removes the analytic account distribution as a criteria to split down payments lines (like the taxes are) and weight its distribution according to the line amounts and analytic account distributions. opw-4033706 Forward-Port-Of: odoo/odoo#175513 Forward-Port-Of: odoo/odoo#175078
Original PR description
This fix removes the analytic account distribution as a criteria to split down payments lines (like the taxes are) and weight its distribution according to the line amounts and analytic account distributions. opw-4033706 Forward-Port-Of: odoo/odoo#175513 Forward-Port-Of: odoo/odoo#175078
Avoid setting default value of zero for Integer/Float fields or False for Boolean fields (those are already the fields default) This avoid triggering write on the related models (on multi-companies database with millions on journal entries this speedup the installation of modules from ~8-9 minutes to ~15 seconds) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175597 Forward-Port-Of: odoo/odoo#175585
Original PR description
Avoid setting default value of zero for Integer/Float fields or False for Boolean fields (those are already the fields default) This avoid triggering write on the related models (on multi-companies database with millions on journal entries this speedup the installation of modules from ~8-9 minutes to ~15 seconds) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175597 Forward-Port-Of: odoo/odoo#175585
Numerous terms were missing from the translation template file. Forward-Port-Of: odoo/odoo#175393 Forward-Port-Of: odoo/odoo#175206
Original PR description
Numerous terms were missing from the translation template file. Forward-Port-Of: odoo/odoo#175393 Forward-Port-Of: odoo/odoo#175206
**Description** - From 16.0, while opening invoices of accounting and clicking on the web studio button, it is showing traceback for French localization of the "l10n_fr" module. As per [this](https://github.com/odoo/odoo/pull/171275) file in V16, module [l10n_fr_invoice_addr] has been optimized to adapt the documents as per new French law. Although, the traceback is showing due to the fact that while performing the "l10n_fr_invoice_addr" module's view, the "shipping_field" has set the groups
Original PR description
**Description** - From 16.0, while opening invoices of accounting and clicking on the web studio button, it is showing traceback for French localization of the "l10n_fr" module. As per…
**Description** - From 16.0, while opening invoices of accounting and clicking on the web studio button, it is showing traceback for French localization of the "l10n_fr" module. As per [this](https://github.com/odoo/odoo/pull/171275) file in V16, module [l10n_fr_invoice_addr] has been optimized to adapt the documents as per new French law. Although, the traceback is showing due to the fact that while performing the "l10n_fr_invoice_addr" module's view, the "shipping_field" has set the groups to null in this [account_move.py](https://github.com/odoo/odoo/pull/171275/files#diff-5125aad1cd2220c7e0c4cfe80ec0541acf5e9f4dbce46fb370e94cd281012b36R17) file which should not be the case. Due to this, as per this [condition](https://github.com/odoo/odoo/blob/16.0/odoo/models.py#L1464), it is trying to find groups in V16.0, which will lead to traceback as the groups are set null here. Whereas in stable version 15.0, it was working due to the fact that previously the groups were set to null through the [account_move.xml](https://github.com/odoo/odoo/blob/15.0/addons/l10n_fr_invoice_addr/views/account_move_views.xml#L9) file. - As a result, to resolve this issue this commit will pop the groups of "shipping_field" instead of setting it to null to bypass the traceback for the invoices of "l10n_fr" localization. **Steps to Reproduce (V16.0)** - Change the language to French. - Install "l10n_fr" module - Get an FR company. - Create an invoice, it's partner(customer) should be of FR , then confirm the invoice. - Open the invoice and then click on the web studio button. **Solution** - To resolve this issue this commit will pop the groups of "shipping_field" instead of setting it to null to bypass the traceback for the invoices of "l10n_fr" localization. **Current behavior before PR:**  --- opw-[4044861](https://www.odoo.com/odoo/project.task/4044861?cids=2) I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173162
Previously, there was no clean way to redirect old URLs like /xx.asp?id=xx with the correct HTTP status code. This update adds support for such redirects, allowing people to migrate to Odoo more easily. fiximp-realife --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175188
Original PR description
Previously, there was no clean way to redirect old URLs like /xx.asp?id=xx with the correct HTTP status code. This update adds support for such redirects, allowing people to migrate to Odoo more easily. fiximp-realife --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175188
Add the modelo 130 report for spain localization task-3866238 Linked PR : https://github.com/odoo/enterprise/pull/62197 Forward-Port-Of: odoo/odoo#164946
Original PR description
Add the modelo 130 report for spain localization task-3866238 Linked PR : https://github.com/odoo/enterprise/pull/62197 Forward-Port-Of: odoo/odoo#164946
Description of the issue/feature this PR addresses: Before this fix, It was not possible to issue a credit note code 61 to be applied to an invoice of type '46' when the vendor was foreign. Typically, credit notes for foreign vendors are code 112; however, code 61 is necessary to reverse a type 46 invoice. After this PR: In the validation included in this PR, we allow this credit note type 61, provided there is a reference to a code '46' invoice, included in the document reference model.
Original PR description
Description of the issue/feature this PR addresses: Before this fix, It was not possible to issue a credit note code 61 to be applied to an invoice of type '46' when the vendor was foreign. Typically, credit notes for foreign vendors are code 112; however, code 61 is necessary to reverse a type 46 invoice. After this PR: In the validation included in this PR, we allow this credit note type 61, provided there is a reference to a code '46' invoice, included in the document reference model. This PR corresponds to the odoo/enterprise PR enabling the issuance of type 46 invoices referenced below: this PR replaces: https://github.com/odoo/odoo/pull/166400 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166793
The purpose of this PR is to be able to process a lot of serial numbers at once. In receipt and deliveries In the current situation, the number of serial already in stock has an impact on the perf (due to `update_available_quantity` that do a `_gather` on current stock). All the metrics below are made with 50 000 SN already in stock Before (in seconds): || Receipt | Delivery | |--------|--------|--------| |100| 1.63 | 34.21 | |5000| 87.04 | 242.56 | |30 000| 563.75 | T.O. | After:
Original PR description
The purpose of this PR is to be able to process a lot of serial numbers at once. In receipt and deliveries In the current situation, the number of serial already in stock has an impact on the perf…
The purpose of this PR is to be able to process a lot of serial numbers at once. In receipt and deliveries In the current situation, the number of serial already in stock has an impact on the perf (due to `update_available_quantity` that do a `_gather` on current stock). All the metrics below are made with 50 000 SN already in stock Before (in seconds): || Receipt | Delivery | |--------|--------|--------| |100| 1.63 | 34.21 | |5000| 87.04 | 242.56 | |30 000| 563.75 | T.O. | After: || Receipt | Delivery | |--------|--------|--------| |100| 0.91 | 5.62 | |5000| 47.21 | 56.28 | |30 000| 195.27 | 307.80 | By operations/ receipts (for 5000): | | action_assign | button_validate | total | |--------|--------|--------|--------| | Before patch | 5.38 | 82.02 | 87.04 | | After patch | 3.82 | 43.39 | 47.21 | By operations/ deliveries (for 5000): | | action_assign | button_validate | total | |--------|--------|--------|--------| | Before patch | 180.06 | 62.50 | 242.56 | | After patch | 20.51 |35.77 | 56.28 | The main issues: - The constraint check on quant/stock.move.line are done one by one since there is nothing done in batch, same for computed field (Not fixed here)  - The put away takes an important amount of times without any putaways rules  - The optimisation made in #116803 was a good idea but it was only use in action_assign. `_action_assign` use strict=False in `_gather` (mts case). It means a child_of operator is in the domain, and it will perform an extra query anyway - The lot_name matching to lot_id is made `stock.move.line` by `stock.move.line` on 30 000, half of the time is spent to find them.  After some testing. The quant_cache could contain too many items than needed by the current operation. Example receive 1 serial number (that will not have an existing quant) will use a quant_cache with all the serial number of the products. As a result, the group by will be super slow. Allow to add an extra domain, to limit the cache size. /!\ could be dangerous if it filter out too much  Forward-Port-Of: odoo/odoo#163799 Forward-Port-Of: odoo/odoo#146494
When a downpayment was made in the sales app, it was not imported correctly in PoS when importing the order. Steps to reproduce: ------------------- * Create a sale order * Make a downpayment for the sale order (Create invoice -> downpayment) * Pay the downpayment * Open PoS and try to settle the order > Observation: The downpayment doesn't appear in the PoS Why the fix: ------------ Since this PR #148732 the downpayment product has been removed when doing a downpayment in PoS. It
Original PR description
When a downpayment was made in the sales app, it was not imported correctly in PoS when importing the order. Steps to reproduce: ------------------- * Create a sale order * Make a downpayment for the sale order (Create invoice -> downpayment) * Pay the downpayment * Open PoS and try to settle the order > Observation: The downpayment doesn't appear in the PoS Why the fix: ------------ Since this PR #148732 the downpayment product has been removed when doing a downpayment in PoS. It was causing the downpayment line to be filtered out when importing the order in PoS here https://github.com/odoo/odoo/blob/0592aa98bc582dab6ac739a82bf3f6d9ec372ec8/addons/pos_sale/models/sale_order.py#L61 opw-4021708 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172302
If for some reason you want to apply taxes on the gift card reward, they were not correctly applied. Steps to reproduce: ------------------- * Create a gift card program * Find the gift card reward product in the program * Add some taxes to it * Open a PoS session, add some product and use a gift card > Observation: The tax on the gift card product is not taken into account Why the fix: ------------ When generating the gift card we force all taxes to be included in price this wa
Original PR description
If for some reason you want to apply taxes on the gift card reward, they were not correctly applied. Steps to reproduce: ------------------- * Create a gift card program * Find the gift card reward product in the program * Add some taxes to it * Open a PoS session, add some product and use a gift card > Observation: The tax on the gift card product is not taken into account Why the fix: ------------ When generating the gift card we force all taxes to be included in price this way the value of the gift card is not modified, but the taxes are applied opw-3916989 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173712 Forward-Port-Of: odoo/odoo#170590
Description of the issue/feature this PR addresses: This commit fixes a read access error on the field employee_ids of hr_leave when a user, who is not in group_hr_holidays_user, tries to cancel/refuse a timeoff. The bug only appears when the timeoff crosses a public holiday. Current behavior before PR: An access error pops up when an user , who is not a timeoff officer/admin, tries to cancel a timeoff. The timeoff should cross a public holiday in order for the bug to appear. Desired
Original PR description
Description of the issue/feature this PR addresses: This commit fixes a read access error on the field employee_ids of hr_leave when a user, who is not in group_hr_holidays_user, tries to cancel/refuse a timeoff. The bug only appears when the timeoff crosses a public holiday. Current behavior before PR: An access error pops up when an user , who is not a timeoff officer/admin, tries to cancel a timeoff. The timeoff should cross a public holiday in order for the bug to appear. Desired behavior after PR is merged: The user is able to cancel its timeoff even if he/she is not a timeoff officer/admin. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174682
Filtering devices by name fails if `devices_list` is empty. Type check on devices should prevent from trying to get the value of `name` on a string. PR being fixed: [https://github.com/odoo/odoo/pull/175277](https://github.com/odoo/odoo/pull/175277) Forward-Port-Of: odoo/odoo#175434 Forward-Port-Of: odoo/odoo#175356
Original PR description
Filtering devices by name fails if `devices_list` is empty. Type check on devices should prevent from trying to get the value of `name` on a string. PR being fixed: [https://github.com/odoo/odoo/pull/175277](https://github.com/odoo/odoo/pull/175277) Forward-Port-Of: odoo/odoo#175434 Forward-Port-Of: odoo/odoo#175356
Contact widget was causing a schema.org error on safari for mobile versions in checkout and in payment confirmation, which caused customers to be weary of paying on odoo. Removed the use of contact widget and displayed the address instead opw-4062917 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175524
Original PR description
Contact widget was causing a schema.org error on safari for mobile versions in checkout and in payment confirmation, which caused customers to be weary of paying on odoo. Removed the use of contact widget and displayed the address instead opw-4062917 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175524
### Steps to reproduce * install `l10n_sa` * create a new invoice and add a line with a product and a custom label. * print the invoice You will see in the 'Description' column that the product's display name is shown instead of the label you set opw-4071925 Forward-Port-Of: odoo/odoo#175025
Original PR description
### Steps to reproduce * install `l10n_sa` * create a new invoice and add a line with a product and a custom label. * print the invoice You will see in the 'Description' column that the product's display name is shown instead of the label you set opw-4071925 Forward-Port-Of: odoo/odoo#175025
13 changes
Enhancements to existing features
Users can now select multiple reports directly from the reports list and create a composite report from them. This streamlines report setup by avoiding the previous manual process of creating a new report first and then adding each included report separately.
Original PR description
The current flow to create a composite report is to create a new report, toggle the "Composite Report" boolean field, and then set the different reports in the list below. This task aims at slightly improve the flow by also enabling the user to directly create composite reports from the list view of reports. Users can select desired reports to include in the composite group and initiate an action that generates a new composite report. By default, the newly generated report will include the selected reports as part of the composite group. task-4019381
This update simplifies how translatable text is defined across several Odoo Enterprise screens and dialogs. It helps reduce duplicated code and makes future translation maintenance easier without changing the user experience.
Original PR description
To make it translatable, the content of some props was sometimes placed in the JavaScript code of the component to be wrapped in a call to gettext. With the introduction of the .translate modifier for props, this indirection by the JS code is no longer necessary. This commit converts the code to use .translate as much as possible. It is believed that avoiding indirection is better for code readability, and less prone to result in dead code. Community: https://github.com/odoo/odoo/pull/175378
The payroll accounting test flows now use the newer, human-readable URL format. This keeps automated checks aligned with the updated navigation style and helps maintain smoother validation of Belgian payroll processes.
Original PR description
This commit modifies existing URLs to the new format so that the URL's become more human readable. Community PR: https://github.com/odoo/odoo/pull/174304 Task-3820230
WhatsApp channel users can now view the members of the current channel. Members linked to WhatsApp partners are grouped separately as WhatsApp Users, with a green WhatsApp status icon for easier identification.
Original PR description
**PURPOSE:** User should be able to see members of the current whatsapp channel. **SPECIFICATIONS:** - Enable the Members List for whatsapp channels. - Display the member related to WhatsApp partner into a separate category `WhatsApp User`. - WhatsApp partner's `im_status` icon should be WhatsApp icon in green color. **Related Community PR:** https://github.com/odoo/odoo/pull/167485 **task**-[3524300](https://www.odoo.com/odoo/my-tasks/3524300?debug=&cids=2)
WhatsApp templates must now include a category before they can be saved or used. This aligns Odoo with WhatsApp API requirements and helps prevent template submission issues caused by missing category information.
Original PR description
Since whatsapp category is required by whatsapp API, we should modify the field definition and make it required. task-4080578
Miscellaneous changes
The global filter entries of the side panel were not keeping their "light" theme because we relied on the BS class `bg-white` which is adapted when using the dark mode. Task-4081249 Forward-Port-Of: odoo/enterprise#67537
Original PR description
The global filter entries of the side panel were not keeping their "light" theme because we relied on the BS class `bg-white` which is adapted when using the dark mode. Task-4081249 Forward-Port-Of: odoo/enterprise#67537
In TimerTimesheetGridRenderer, super.onWillStart was not awaited. We take the opportunity to factorize some code and parallelize some rpcs. Forward-Port-Of: odoo/enterprise#67918 Forward-Port-Of: odoo/enterprise#67864
Original PR description
In TimerTimesheetGridRenderer, super.onWillStart was not awaited. We take the opportunity to factorize some code and parallelize some rpcs. Forward-Port-Of: odoo/enterprise#67918 Forward-Port-Of: odoo/enterprise#67864
Before this commit, the subquery provided in _number_of_days_without_weekend() was executed multiple times in _select(), which was decreasing the performance by a lot. After this commit, we build a CTE to ensure that we only execute this subquery once and use its result every time it's needed. task-3902302 Forward-Port-Of: odoo/enterprise#67880
Original PR description
Before this commit, the subquery provided in _number_of_days_without_weekend() was executed multiple times in _select(), which was decreasing the performance by a lot. After this commit, we build a CTE to ensure that we only execute this subquery once and use its result every time it's needed. task-3902302 Forward-Port-Of: odoo/enterprise#67880
To reproduce: Activate Avatax (in Sandbox mode) Create an invoice to a partner from Colorado Put the 0F4000000 code on the Avatax Category of a product Create a line with this product Click on "Compute Taxes" => A tax named "Retail Delivery Fee [08] (29.0000 %)" is created The issue is that if you look on Avatax, it's supposed a fixed 0.29 tax. opw-4036105 Forward-Port-Of: odoo/enterprise#67882 Forward-Port-Of: odoo/enterprise#66973
Original PR description
To reproduce: Activate Avatax (in Sandbox mode) Create an invoice to a partner from Colorado Put the 0F4000000 code on the Avatax Category of a product Create a line with this product Click on "Compute Taxes" => A tax named "Retail Delivery Fee [08] (29.0000 %)" is created The issue is that if you look on Avatax, it's supposed a fixed 0.29 tax. opw-4036105 Forward-Port-Of: odoo/enterprise#67882 Forward-Port-Of: odoo/enterprise#66973
When creating an asset from sub company when both sub company and parent company are selected, the asset's depreciation moves have the parent company instead of the child one. Steps: - Have a parent company P and a child company C - With companies set to P + C, and company set to C - Create an asset and compute board - Click on "Posted Entries" smart button -> Entries have P as company instead of C opw-4059496 Forward-Port-Of: odoo/enterprise#67856 Forward-Port-Of: odoo/enterprise#67126
Original PR description
When creating an asset from sub company when both sub company and parent company are selected, the asset's depreciation moves have the parent company instead of the child one. Steps: - Have a parent company P and a child company C - With companies set to P + C, and company set to C - Create an asset and compute board - Click on "Posted Entries" smart button -> Entries have P as company instead of C opw-4059496 Forward-Port-Of: odoo/enterprise#67856 Forward-Port-Of: odoo/enterprise#67126
To reproduce: ============= - on Salary structure type "Worker" change its "Default Scheduled Pay" to another value than monthly (bi-weekly). - on the contract templates, create a new one for that structure and set hourly Wage = 10$ - onrecruitment applications, generate an offer with that template Check the link > It should show 800$ (which is 10$ an hour * 40 hours a week * 2 for the bi-wkeely frequency) but still mention it is the monthly Salary (which should be 1600$) Problem
Original PR description
To reproduce: ============= - on Salary structure type "Worker" change its "Default Scheduled Pay" to another value than monthly (bi-weekly). - on the contract templates, create a new one for that structure and set hourly Wage = 10$ - onrecruitment applications, generate an offer with that template Check the link > It should show 800$ (which is 10$ an hour * 40 hours a week * 2 for the bi-wkeely frequency) but still mention it is the monthly Salary (which should be 1600$) Problem: ======== - the salary displayed on the salary configurator doesn't take into account the frequency of the salary structure Solution: ========= - change the label to mention the frequency of the salary structure opw-3963698 Forward-Port-Of: odoo/enterprise#64105
The message to buy extra credits is escaped and instead of displaying the message with a link it displays the message with a html and a url, not very human user like. We have to unescape the < and > symbols so that the frontend can properly display the message Ticket [link](https://www.odoo.com/web#model=project.task&id=3864033) opw-3864033 Forward-Port-Of: odoo/enterprise#63364
Original PR description
The message to buy extra credits is escaped and instead of displaying the message with a link it displays the message with a html and a url, not very human user like. We have to unescape the < and > symbols so that the frontend can properly display the message Ticket [link](https://www.odoo.com/web#model=project.task&id=3864033) opw-3864033 Forward-Port-Of: odoo/enterprise#63364
When attempting to create a new template in WhatsApp, leaving the ``Category`` field empty results in an error. Steps to reproduce: - Install the ``WhatsApp`` module - Create a ``WhatsApp Business Account`` - Create a new template and leave the ``Category`` field empty - Click on ``Submit for Approval`` Traceback: ``AttributeError: 'bool' object has no attribute 'upper'`` This error occurs at [1] because ``template_type`` is not found in self. This commit will fix the above err
Original PR description
When attempting to create a new template in WhatsApp, leaving the ``Category`` field empty results in an error. Steps to reproduce: - Install the ``WhatsApp`` module - Create a ``WhatsApp Business Account`` - Create a new template and leave the ``Category`` field empty - Click on ``Submit for Approval`` Traceback: ``AttributeError: 'bool' object has no attribute 'upper'`` This error occurs at [1] because ``template_type`` is not found in self. This commit will fix the above error by raising an error if ``template_type`` is not found in self. [1]- https://github.com/odoo/enterprise/blob/d6e3dcc5a37c82a0c1bfc1267c4e088aedfe8632/whatsapp/models/whatsapp_template.py#L512 sentry-5642705166 Forward-Port-Of: odoo/enterprise#67768 Forward-Port-Of: odoo/enterprise#67359
9 changes
Security fixes and vulnerability patches
This update adds security verification to the public document upload feature to protect against unauthorized access attempts. The change strengthens the system's defenses without requiring any module updates, though custom integrations that directly call the upload route may need adjustment.
Original PR description
This commit add a csrf verification to the public /document/upload route This is change remains stable compliant due to not modifying the template. No module update is require for this change to work. This commit will break some custom implementation that call directly to the route. Forward-Port-Of: odoo/enterprise#67515 Forward-Port-Of: odoo/enterprise#67119
Enhancements to existing features
Users can now reauthorize their bank account connections directly within Odoo when their consent expires, instead of having to navigate away to an external provider. This improvement streamlines the account synchronization process and reduces friction when users need to refresh their banking permissions.
Original PR description
Redirect the user to reauthorize their consent directly from Odoo in a seamless manner if we receive a consent-expired error using the reauthorization endpoint (https://documentation.ibanity.com/ponto-connect/2/api/curl#reauthorization-request). Task: 3208460 Odoofin PR: https://github.com/odoo/odoofin/pull/255 Forward-Port-Of: odoo/enterprise#56901
Resolved issues and error corrections
This fix resolves an issue where automatic transfer calculations were creating journal entries with rounding discrepancies (off by $0.01). The system now rounds transfer amounts at the calculation stage rather than after, ensuring that the amounts used in computations match exactly what gets recorded in journal entries. This prevents errors when processing automatic transfers based on percentages.
Original PR description
**Steps to reproduce:** - Install Accounting - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Create an account (e.g. Test Account) - Go to "Accounting / Accounting /…
**Steps to reproduce:**
- Install Accounting
- Go to "Accounting / Configuration / Accounting / Chart of Accounts"
- Create an account (e.g. Test Account)
- Go to "Accounting / Accounting / Miscellaneous / Journal Entries"
- Create a journal entry:
* Journal Items:
------------
Account | Debit | Credit
--------------------------------------------
Test Account | $0.00 | $410.34
[any] | $410.34 | $0.00
- Post the journal entry
- Go to "Accounting / Accounting / Management / Automatic Transfers"
- Create an automatic transfer:
* Origin Accounts: Test Account
* Automated Transfer:
-----------
Percent (%) | Destination Account
-----------------------------------------------
15.00 | [any]
42.50 | [any, but a different one]
42.50 | [any, but a different one]
- Activate the automatic transfer
- Compute transfer
**Issue:**
A UserError is raised while trying to create a journal entry because of a $0.01 difference between the total credit and the total debit.
**Cause:**
When the amounts of each line are computed from the percentage, they are not rounded.
These amounts are used to create the journal entries generated by the automatic transfer.
However, each created journal entry line is rounded, which can generate a rounding difference.
**Solution:**
Directly round the amounts when they are computed from the percentage to be sure that the amounts used for the computation and the ones that will be set in the journal entries are the same.
opw-3998808
Forward-Port-Of: odoo/enterprise#67693
Forward-Port-Of: odoo/enterprise#67644This fix ensures that custom product attribute values (like custom descriptions) are properly transferred through the entire order chain when using multi-company transactions. Previously, when a sales order in one company triggered a purchase order and then a manufacturing order in another company, the custom attribute information was lost. Now the system correctly preserves these custom details throughout the entire process.
Original PR description
### Steps to reproduce: Have 2 companies: CO1 and CO2 - In the setting, enable Multi-Step Routes and Inter-Company Transactions - With CO1 and CO, enable Synchronize Sales and Purchase Order - Go to…
### Steps to reproduce: Have 2 companies: CO1 and CO2 - In the setting, enable Multi-Step Routes and Inter-Company Transactions - With CO1 and CO, enable Synchronize Sales and Purchase Order - Go to Inventory > Configuration > Warehouse Management > Routes - Unarchive the MTO Route - With CO1 create a route with a buy action and destination CO1/stock - With CO2 create a route with a manufacture action - Go to Inventory > Configuration > Products > Attributes - Create a product attribute with a value that "is_custom" - Create a storable product P with using MTO and tour CO1 and CO2 routes - Set CO2 as a vendor for the product - With CO1, create a SO for 1 unit of your product P - a popup asks you for a custom product attribute value, write "test" - Confirm the SO > Automatically creates a PO (w/ description) - Confirm the PO > Automatically create an SO in CO2 (w/ description) - Confirm the SO in CO2 > Automatically create an MO #### Issue: #### The custom description is missing on the final MO. #### Note: If you were to create an SO directly in CO2 for 1 unit of P, the custom description associated with the custom attribute value would be present on the associated MO. ### Cause of the issue: The MO is created by a procurement generated from the SOL during the call of the `_action_launch_stock_rule` method: https://github.com/odoo/odoo/blob/055184ea033e7068ce33c92390c73ae39b2db259/addons/sale_stock/models/sale_order_line.py#L345 The custom description that will appear on the MO and containing the informations related to the custom attribute values is generated here: https://github.com/odoo/odoo/blob/055184ea033e7068ce33c92390c73ae39b2db259/addons/sale_stock/models/sale_order_line.py#L267 However, this method will return an empty string because the `product_custom_attribute_value_ids` is absent from our SOL https://github.com/odoo/odoo/blob/055184ea033e7068ce33c92390c73ae39b2db259/addons/sale/models/sale_order_line.py#L338-L347 On the other hand, this `product_custom_attribute_value_ids` was set and is still existing on the original SO that started the flow in CO1. The reason that it is not present anymore on the last SO is because this SOL field has no equivalent on the `purchase.order.line` model and the information was therefore forgotten on the MO and has not been transferred directly from the PO of CO1 to the SO of CO2. ### Fix: We rely on the `sale_line_id` field of the `purchase.order.line` model in order to determine the original SOL of the final SOL and update the `product_custom_attribute_value_ids` accordingly. ### Note: As a side effect of our change in `sale_purchase_stock` linking our sol to the pol via the procurement commit 63ef74b can be reverted since the message is already automatically posted (the message is now written by the user who cancelled the SO rather than Odoobot). opw-3998861 --- Forward-Port-Of: odoo/enterprise#67172
This fix improves how house numbers are extracted from customer addresses when creating Sendcloud deliveries. The updated address parsing now correctly handles complex address formats with dashes, slashes, spaces, and letters (like "13/1" or "11 A"), ensuring delivery labels show the complete and accurate house number instead of partial or incorrect values.
Original PR description
### Main Issue: When creating a sales order that triggers a delivery via Sendcloud, the delivery address on the label may be incorrect. It is due to a limited regex when trying to extract the house…
### Main Issue:
When creating a sales order that triggers a delivery via Sendcloud, the delivery address on the label may be incorrect. It is due to a limited regex when trying to extract the house number from the 'street' field of the partner.
### Main change:
Updated the regex pattern used to extract house numbers from postal address lines to increase accuracy and cover more address formats.
### Before:
- Regex Pattern: `([1-9]+\w*)`
- Explanation: This pattern captures one or more digits (not starting with zero) followed by any number of word characters (letters, digits, or underscores).
### After:
- Regex Pattern: `(\d+[-\/]?\d* ?[a-zA-Z]?\d*)(?![a-zA-Z])`
- Explanation: This improved pattern captures a broader range of house number formats, including those with dashes, slashes, spaces, and letters.
### Examples of the Differences:
"Friedrichstr. 13/1"
Before: '13'
After: '13/1'
"Rue du pont 11 A"
Before: '11'
After: '11 A'
"Place Albert 1er 15B"
Before: '1er'
After: '15B'
"123-456 Main Street"
Before: '123'
After: '123-456'
"789 C Oak Avenue"
Before: '789'
After: '789 C'
[opw-4042552](https://www.odoo.com/odoo/project/49/tasks/4042552)
Forward-Port-Of: odoo/enterprise#67286The Trial Balance report was crashing with an error when the Period Comparison option was disabled in accounting report settings. This fix ensures the report properly handles cases where period comparison is turned off, allowing users to generate trial balance reports without encountering errors regardless of their comparison settings.
Original PR description
Issue ----- Trial report assumes the `comparison` key exists when generating report options. However, that won't be the case if `filter_period_comparison` (Period Comparison option) is false. Steps ----- - Go to Accounting -> Configuration -> Accounting Reports. - Choose Trial Balance then go to Options and disable 'Period Comparison'. - Now generate a trial balance report by going to Reporting -> Audio Reports -> Trial Balance. - A `KeyError` is thrown. opw-3991886 Forward-Port-Of: odoo/enterprise#66049
A bug in the StarshipIT delivery integration prevented packages from being automatically archived when shipments were cancelled in Odoo. The issue was caused by an incorrect method name with a leading underscore that prevented the system from recognizing the cancellation. This fix corrects the method name so packages are now properly archived when cancellations occur.
Original PR description
The cancel_shipment method name is incorrect, due to the leading _ which causes it to not be picked up when cancelling a picking. This means that starshipit packages do not get archived automatically when cancelling then in Odoo, as you would expect them to be. Task id # 4074169
The global filter entries in the spreadsheet's side panel were not displaying correctly when dark mode was enabled. This fix ensures the filter panel maintains its intended light appearance regardless of the user's theme preference, improving the visual consistency and usability of the spreadsheet editing interface.
Original PR description
The global filter entries of the side panel were not keeping their "light" theme because we relied on the BS class `bg-white` which is adapted when using the dark mode. Task-4081249
This fix resolves an issue where custom fields with uppercase characters (like x_TEST) were causing errors in the Profit and Loss report's Analytic Group by feature. The problem occurred because the system wasn't properly handling database field name case sensitivity, resulting in database lookup failures. This fix ensures custom fields work correctly regardless of how they are named.
Original PR description
### Steps to Reproduce 1. Install the `account_reports` module. 2. Enable Analytic Accounting in the settings. 3. Create a new field for the Journal Items model with a name containing uppercase characters (e.g., `x_TEST`). 4. Navigate to the 'Profit and Loss' report and attempt to use the 'Analytic Group by' feature. ### Current Behavior The following error occurs: ``` psycopg2.errors.UndefinedColumn: column account_move_line.x_test does not exist ``` ### Cause In PostgreSQL, unquoted identifiers are automatically converted to lowercase, leading to issues when fields contain uppercase characters. opw-4086902 opw-4082082 opw-4086627 Forward-Port-Of: odoo/enterprise#67807