Tuesday, May 20, 2025
38 changes · saas-18.1
Resolved issues and error corrections
The mail composer now correctly hides the file upload option when uploads are disabled, such as when adding comments in spreadsheets. This prevents unnecessary attachment controls from appearing and keeps the comment experience cleaner for users.
Original PR description
## Description In spreadsheet, the mail composer is used to write comments on cells. In this context, the file upload button is unnecessary. However, setting props allowUpload: false or overriding the allowUpload getter was not hiding the upload button as expected. This issue was caused by a missing allowUpload check in the composer actions logic. This PR adds the missing condition and refactors related checks into their respective modules, improving modularity. Task: [4708400](https://www.odoo.com/odoo/project/2328/tasks/4708400) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures the event sales abandoned cart reminder test has an email address available when demo data is not installed. It prevents false test failures and helps keep release validation reliable without changing customer-facing behavior.
Original PR description
Versions -------- - saas-18.1 - saas-18.2 Steps ----- 1. Install `website_event_sale` without demo data; 2. run `test_sold_out_event_cart_reminder`. Issue ----- Test fails. Cause ----- The test uses `base.partner_admin` to test sending an email. As of saas-18.1, this partner record no longer gets created with an email value when demo data is disabled. This causes the test to fail unexpectedly, as it cannot send an email without email address. Solution -------- Ensure the record has an `email` value. runbot-223119
This update fixes a typo in the archive and restore buttons shown in the UTM campaign kanban menu. It improves clarity for users managing marketing campaigns without changing any underlying functionality.
Original PR description
This commit addresses a typo in the archive and restore buttons within the kanban menu, introduced in this commit https://github.com/odoo/odoo/commit/d220bb4c872d3660d15373d15565c846e3a35d9f --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
This reverts commit d413a9895742594d064084cd6dafbf1f2ec97221. This fix was decided after https://github.com/odoo/enterprise/pull/74127 that was trying to prevent invoicing users to see accounting features, when it seemed to be unwanted to have the two property accounts fields required while having no CoA installed. The issue is, now when having Accounting installed, we can create a user without having CoA as these two fields are not required anymore, but we end up with a error message when cre
Original PR description
This reverts commit d413a9895742594d064084cd6dafbf1f2ec97221. This fix was decided after https://github.com/odoo/enterprise/pull/74127 that was trying to prevent invoicing users to see accounting…
This reverts commit d413a9895742594d064084cd6dafbf1f2ec97221.
This fix was decided after https://github.com/odoo/enterprise/pull/74127
that was trying to prevent invoicing users to see accounting features,
when it seemed to be unwanted to have the two property accounts fields
required while having no CoA installed.
The issue is, now when having Accounting installed, we can create a user
without having CoA as these two fields are not required anymore, but
we end up with a error message when creating an invoice ('no CoA
installed') although we could be have added accounts manually instead
of installing a CoAi (which is not possible for invoicing user).
In this situation, we should be able to create a contact, and having these
fields required will force the user to create them.
Finally, it is ok to revert the full chain, as the original issue is
fixed by this commit https://github.com/odoo/enterprise/commit/68f6c1f9fd3ff6762c98e1a405ade035129efce0
Forward-Port-Of: odoo/odoo#210452
Forward-Port-Of: odoo/odoo#209832This change uses python set subtraction over recordset \_\_sub\_\_ on calendar.attendees. Before this change, when doing a large calendar synchronization such as setting up Google Calendar, notified_attendees could be a large recordset of calendar.attendees. When performing a recordset subtraction in _notify_attendees, this uses \_\_sub\_\_ and browse multiple times. Synchronizing around 5000 events took about ~350 seconds (on my own calendar data), where _notify_attendees took ~313 seconds (
Original PR description
This change uses python set subtraction over recordset \_\_sub\_\_ on calendar.attendees. Before this change, when doing a large calendar synchronization such as setting up Google Calendar, notified_attendees could be a large recordset of calendar.attendees. When performing a recordset subtraction in _notify_attendees, this uses \_\_sub\_\_ and browse multiple times. Synchronizing around 5000 events took about ~350 seconds (on my own calendar data), where _notify_attendees took ~313 seconds (83%). After this change, _notify_attendees takes ~1 second operating on the same synchronization. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#210271
To reproduce the issue: 1) Create a Belgian company, with CoA installed 2) Make a foreign VAT fiscal position in France for this company 3) Click on the button in the fiscal position's banner to generate the French taxes => Some of the generated taxes are cash basis. All of them should have a transition account, but it's not the case (some have, some haven't). This is due to the fact 0% cash basis taxes exist in France, and they are treated before some other taxes due to the order we d
Original PR description
To reproduce the issue: 1) Create a Belgian company, with CoA installed 2) Make a foreign VAT fiscal position in France for this company 3) Click on the button in the fiscal position's banner to…
To reproduce the issue: 1) Create a Belgian company, with CoA installed 2) Make a foreign VAT fiscal position in France for this company 3) Click on the button in the fiscal position's banner to generate the French taxes => Some of the generated taxes are cash basis. All of them should have a transition account, but it's not the case (some have, some haven't). This is due to the fact 0% cash basis taxes exist in France, and they are treated before some other taxes due to the order we declare them in in the csv. When creating those 0% taxes, the transition account had to be mapped. Since Belgium does not have any cash basis taxe, we relied on the first account used in the tax repartition of the tax to convert. However, those 0% taxes obviously had no account there (since they're 0% anyway), so we ended up not entering this condition https://github.com/odoo/odoo/blob/18.0/addons/account/models/chart_template.py#L970 and mapping the transition account to None. Because of that, we did not create any equivalent for that account, for any of the taxes using it. This commit solves that by sorting the tax templates to first treat those with accounts in their tax repartition. We also fix here the fact that instantiating such cash basis taxes did not enable the "cash basis" setting on the company ; which didn't make any sense, and caused an error message when trying to edit the settings afterwards. Forward-Port-Of: odoo/odoo#210070
Steps to Reproduce: 1. Go to the To-do module. 2. Create a link. 3. Select the entire content using Ctrl + A. 4. Change the font style from 'Normal' to another (e.g., 'Header 1'). 5. A traceback is thrown, although the link’s font style is changed. Description of the issue/feature this PR addresses: - The issue was caused by the presence of a `FEFF` (zero-width no-break space) character inside the selected text. This caused a conflict during selection restoration after the font styl
Original PR description
Steps to Reproduce: 1. Go to the To-do module. 2. Create a link. 3. Select the entire content using Ctrl + A. 4. Change the font style from 'Normal' to another (e.g., 'Header 1'). 5. A traceback is…
Steps to Reproduce: 1. Go to the To-do module. 2. Create a link. 3. Select the entire content using Ctrl + A. 4. Change the font style from 'Normal' to another (e.g., 'Header 1'). 5. A traceback is thrown, although the link’s font style is changed. Description of the issue/feature this PR addresses: - The issue was caused by the presence of a `FEFF` (zero-width no-break space) character inside the selected text. This caused a conflict during selection restoration after the font style change. The clean handler was being triggered after the font change attempt, which led to an invalid cursor state. Current behavior before PR: - A Traceback occurred when changing the font style of a selected link text. Desired behavior after PR is merged: - The clean handler is now explicitly called before the font change tries to restore the cursor, avoiding the invalid range or selection error. task-4743390 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207202
When posting the vendor bill before validating the receipt, and the currency rate changed between the bill and receipt: - An Exchange diff account move would be created, and the Stock Input Account would not be balanced This is because the balance of the receipt would perfectly match the balance of the vendor bill, but not the Amount in currency. So, when we try to reconcile the 2 lines, because they are in the same currency, we are reconciling the Amount in Currency. Hence, the exchange rat
Original PR description
When posting the vendor bill before validating the receipt, and the currency rate changed between the bill and receipt: - An Exchange diff account move would be created, and the Stock Input Account…
When posting the vendor bill before validating the receipt, and the currency rate changed between the bill and receipt:
- An Exchange diff account move would be created, and the Stock Input Account would not be balanced
This is because the balance of the receipt would perfectly match the balance of the vendor bill, but not the Amount in currency. So, when we try to reconcile the 2 lines, because they are in the same currency, we are reconciling the Amount in Currency. Hence, the exchange rate journal entry is created, and a discrepancy in the Stock Input Account balance is introduced.
When the bill is posted before the receipt is validated, we want the receipt to have the value of the bill, and there is no reason to have only the balance or the amount in currency from the bill, so we can take both of them.
https://github.com/user-attachments/assets/c6dc5e72-8f5b-4c0f-99fa-c5e98a9574ff
## How to reproduce:
- Install stock_account,purchase
- Create product P:
* Valued in AVCO automated.
* Control Policy to 'On ordered quantities'
- Add currency rates for the EUR currency:
* 2.0 on the 2025-01-01
* 2.1 today
- Create and Confirm a new purchase for 1 unit of P and a price of 100 Euros
- Create the Bill:
* Set the bill's accounting date & bill date to the 2025-01-01
* Confirm the bill
=> Amount in Currency: 100 Euros - Balance: $50 USD - Rate used: 2.0
- Go back to the PO and receive the product.
=> Amount in Currency: 105 Euros - Balance: $50 USD - Rate used: 2.1
- Check the created Journal Entries:
=> Currency exchange rate difference: $2.38
=> (105 - 100) / 2.1
OPW-4631348
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#210182
Forward-Port-Of: odoo/odoo#209118Add a tracking flag to the payments state to be logged into the chatter. task-4531618 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199967
Original PR description
Add a tracking flag to the payments state to be logged into the chatter. task-4531618 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#199967
Description of the issue/feature this PR addresses: The "Quantities Available" field (shown in the product form vie smart button and the prognosis) can sometimes over-estimate the amounts actually available due to rounding. For example in the following case: Product-A is made via Kit-BoM from 2 Units of Product-B. There are 3 units of Product-B in stock. The precision of the "Unit" UoM, used for Product-A, is set to 1 (only integer amounts). The actual amount of units available is 1.5, this is
Original PR description
Description of the issue/feature this PR addresses: The "Quantities Available" field (shown in the product form vie smart button and the prognosis) can sometimes over-estimate the amounts actually…
Description of the issue/feature this PR addresses: The "Quantities Available" field (shown in the product form vie smart button and the prognosis) can sometimes over-estimate the amounts actually available due to rounding. For example in the following case: Product-A is made via Kit-BoM from 2 Units of Product-B. There are 3 units of Product-B in stock. The precision of the "Unit" UoM, used for Product-A, is set to 1 (only integer amounts). The actual amount of units available is 1.5, this is rounded as Half-Up to 2 Units. This is misleading, since only one unit of Product-A could be shipped. Current behavior before PR: For Kit-BoM Products, the quantities in _compute_quantities_dict() are all rounded with HALF-UP, potentially rounding up and claiming a higher availability than actually supported. Desired behavior after PR is merged: _compute_quantities_dict() rounds down to ensure it doesn't over-promise. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208575 Forward-Port-Of: odoo/odoo#208374
When using shiplater in PoS and creating a backorder from the original picking, the COGS would be duplicated when validating the backorder. Steps to reproduce: ------------------- * Create 2 products, one with a cost of 20 and one with a cost of 0 * Create a PoS order with 2 lines, one for each product * Validate the order using the shiplater option * Close the session and go to the picking created * Validate the delivery only for the product with a cost of 20 and make a backorder for t
Original PR description
When using shiplater in PoS and creating a backorder from the original picking, the COGS would be duplicated when validating the backorder. Steps to reproduce: ------------------- * Create 2…
When using shiplater in PoS and creating a backorder from the original picking, the COGS would be duplicated when validating the backorder. Steps to reproduce: ------------------- * Create 2 products, one with a cost of 20 and one with a cost of 0 * Create a PoS order with 2 lines, one for each product * Validate the order using the shiplater option * Close the session and go to the picking created * Validate the delivery only for the product with a cost of 20 and make a backorder for the product with a cost of 0 * Go to the session accounting entries and check the COGS entries, you should see one entry for the product we just processed * Validate the backorder > Observation: A second COGS entry is created for the product with a cost of 20 Why the fix: ------------ Instead of creating the COGS entries based on the PoS order lines, we now create them based on the stock move lines. This way, we only create the COGS entries for the stock move lines that are actually processed. We also avoid creating COGS entries for the stock move lines that have no cost. opw-4597430 Forward-Port-Of: odoo/odoo#210435 Forward-Port-Of: odoo/odoo#207075
When you settle a sale order that has a payment term, it was always ignored in the PoS. But it should only be ignored when the payment term has an early discount. Steps to reproduce: ------------------- * Create a sale order with a payment term that has no early discount * Go to the PoS and settle the sale order * Invoice and validate the order > Observation: In the backend, the sale order has the payment term applied on the invoice Why the fix: ------------ Some modules needs
Original PR description
When you settle a sale order that has a payment term, it was always ignored in the PoS. But it should only be ignored when the payment term has an early discount. Steps to reproduce: ------------------- * Create a sale order with a payment term that has no early discount * Go to the PoS and settle the sale order * Invoice and validate the order > Observation: In the backend, the sale order has the payment term applied on the invoice Why the fix: ------------ Some modules needs the invoice to have payment terms set (l10n_mx for example). But the PoS invoice was always ignoring it. We should only ignore it if the payment terms has an early discount. opw-4670234 Forward-Port-Of: odoo/odoo#209999 Forward-Port-Of: odoo/odoo#207231
- Configure a payment method (e.g. `"demo"`) with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment. - Create a partner on the website using an incognito window. In the backend change their default property_account_receivable_id. Assign them a fiscal position where the receivable account is mapped to another account. - Make a purchase using the `"demo"` payment method with the new partner. The ge
Original PR description
- Configure a payment method (e.g. `"demo"`) with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment. -…
- Configure a payment method (e.g. `"demo"`) with an outstanding receipt account in the bank journal used by the website (automatic invoicing enabled). Enable Automatic Invoice for online payment. - Create a partner on the website using an incognito window. In the backend change their default property_account_receivable_id. Assign them a fiscal position where the receivable account is mapped to another account. - Make a purchase using the `"demo"` payment method with the new partner. The generated invoice and its corresponding journal entry do not share the same `account_id` (Account Receivable). The invoice uses the `account_id` computed in `_compute_account_id` of `account.move.line`, which is not necessarily the same as the `account_id` set on the partner. After this commit, the payment uses the same `account_id` as the related invoice, (same as _create_payment_vals_from_wizard) avoiding any discrepancy. opw-4669927 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209318 Forward-Port-Of: odoo/odoo#204489
…count value Steps to reproduce: 1. Create an invoice with a product 2. Set quantity to 3, price to 11.34 3. Confirm & get the invoice PDF 4. Upload the PDF in accounting app 5. Check the "discount" value Issue: Visually the result is correct, but the stored value (in db) is not -2.220446049250313e-14 != 0.0 Cause: ``` >>> 3 * 11.34 34.019999999999996 ``` Creating a slight error of -0.0000000000002 opw-4675079 Forward-Port-Of: odoo/odoo#209728 Forward-Port-Of: odoo/odoo
Original PR description
…count value Steps to reproduce: 1. Create an invoice with a product 2. Set quantity to 3, price to 11.34 3. Confirm & get the invoice PDF 4. Upload the PDF in accounting app 5. Check the "discount" value Issue: Visually the result is correct, but the stored value (in db) is not -2.220446049250313e-14 != 0.0 Cause: ``` >>> 3 * 11.34 34.019999999999996 ``` Creating a slight error of -0.0000000000002 opw-4675079 Forward-Port-Of: odoo/odoo#209728 Forward-Port-Of: odoo/odoo#206107
Before this commit it was not possible to start the Ace editor (via its owl wrapper codeEditor) with an initial cursor position. After this commit it is now possible to do just that. This comes handy in the use case where: - one makes modification on the edited resource. - saves the result. This could mean that the codeEditor must be restarted from scratch (reloading all the data) - functionally stay on the saved resource at the right position. Note that the onChange call back now recei
Original PR description
Before this commit it was not possible to start the Ace editor (via its owl wrapper codeEditor) with an initial cursor position. After this commit it is now possible to do just that. This comes handy in the use case where: - one makes modification on the edited resource. - saves the result. This could mean that the codeEditor must be restarted from scratch (reloading all the data) - functionally stay on the saved resource at the right position. Note that the onChange call back now received the position at which the edition *started*. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208803
### Steps to reproduce: - Navigate to Time off app -> Reporting -> By type - Access any leave record - Notice it will open an allocation record form ### Cause: This is happening as the query we are using to fetch hr.leave.report is not ordered correctly when it comes to fetching the columns. https://github.com/odoo/odoo/blob/c0f3bff835cc8dbe63d5369de43c76e83ca0018e/addons/hr_holidays/report/hr_leave_report.py#L51-L53 https://github.com/odoo/odoo/blob/c0f3bff835cc8dbe63d5369de43c7
Original PR description
### Steps to reproduce: - Navigate to Time off app -> Reporting -> By type - Access any leave record - Notice it will open an allocation record form ### Cause: This is happening as the query we are using to fetch hr.leave.report is not ordered correctly when it comes to fetching the columns. https://github.com/odoo/odoo/blob/c0f3bff835cc8dbe63d5369de43c76e83ca0018e/addons/hr_holidays/report/hr_leave_report.py#L51-L53 https://github.com/odoo/odoo/blob/c0f3bff835cc8dbe63d5369de43c76e83ca0018e/addons/hr_holidays/report/hr_leave_report.py#L68-L70 in those two sub-queries the order of fetching the allocation_id and leave_id is not the same which cause that leave_id column will be always null and every id value -either leave_id or allocation_id- will be stored in allocation_id column. ### Fix: Since columns' order matter when fetching sub-queries we unified the order in both queries. opw-4723952 Forward-Port-Of: odoo/odoo#208773
Versions -------- - 17.0+ Steps ----- 1. Have a company partner with a credit limit; 2. add an employee partner to the company; 3. create a sales order for the employee; 4. have the total amount exceed the credit limit; 5. confirm order; 6. create a copy. Issue ----- The credit warning isn't updated with the new order's amount. Cause ----- The `credit` field gets computed on the `commercial_partner_id` while `credit_to_invoice` gets computed on the current partner. Solut
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Have a company partner with a credit limit; 2. add an employee partner to the company; 3. create a sales order for the employee; 4. have the total amount exceed the credit limit; 5. confirm order; 6. create a copy. Issue ----- The credit warning isn't updated with the new order's amount. Cause ----- The `credit` field gets computed on the `commercial_partner_id` while `credit_to_invoice` gets computed on the current partner. Solution -------- Compute the `credit_to_invoice` on the `commercial_partner_id`. Also, search sales orders on `partner_invoice_id` instead of `partner_id` to compute `credit_to_invoice`. opw-4654476 Forward-Port-Of: odoo/odoo#210582 Forward-Port-Of: odoo/odoo#210177
*: account,l10n_hu_edi,l10n_sa,purchase,purchase_stock,sale When a Shipping Address is displayed inside the `information_block` there is no spacing to differentiate it from the Invoicing Address, making it harder to read. The `:` character is inconsistent with other reports, but will be removed in the master forward port to avoid overriding stable translation. task-4730464 Enterprise PR: https://github.com/odoo/enterprise/pull/84281 | Issue solved in this PR | |--------| | | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207725
**Issue** For example, in the case of a working schedule from 8:00 to 17:00 with a 1 hour lunch period, 8 hours of work are expected. By taking the lunch interval into account, the auto check out will happen at 17:00 if the company's tolerance in the attendance's setting is set at 0. Previously, it would happen at 16:00, resulting in only 7 worked hours for the attendance while the user may expect the attendance's worked hours to match the expected working hours of the schedule. **Solu
Original PR description
**Issue** For example, in the case of a working schedule from 8:00 to 17:00 with a 1 hour lunch period, 8 hours of work are expected. By taking the lunch interval into account, the auto check out…
**Issue** For example, in the case of a working schedule from 8:00 to 17:00 with a 1 hour lunch period, 8 hours of work are expected. By taking the lunch interval into account, the auto check out will happen at 17:00 if the company's tolerance in the attendance's setting is set at 0. Previously, it would happen at 16:00, resulting in only 7 worked hours for the attendance while the user may expect the attendance's worked hours to match the expected working hours of the schedule. **Solution** - include lunch attendances (not taken into account by `duration_hours`) in the total time that needs to be exceeded before an `hr.attendance` is automatically checked out. Note that this solution manages the case where `hr.attendance` are outside lunch periods (e.g. 8-12 and 13-17, but no attendance between 12-13). Though in that case, the automatic check out will be delayed by at least 1h. Note: a change was also made to account for 2 weeks calendars. opw-4402321 Forward-Port-Of: odoo/odoo#197395
### Approach: - When the entire content of a single table cell is selected, store the `ev.clientX` value once the cell content is fully selected. Afterward, if the mouse moves in the direction of the selection (left or right) by a sensitivity threshold of 5px, the entire cell is selected. ### Steps to Reproduce: - Create a table (e.g., using /table). - Add multiple blocks with varying text lengths inside a cell. - Try selecting all the content inside the cell using the mouse. - Obser
Original PR description
### Approach: - When the entire content of a single table cell is selected, store the `ev.clientX` value once the cell content is fully selected. Afterward, if the mouse moves in the direction of the selection (left or right) by a sensitivity threshold of 5px, the entire cell is selected. ### Steps to Reproduce: - Create a table (e.g., using /table). - Add multiple blocks with varying text lengths inside a cell. - Try selecting all the content inside the cell using the mouse. - Observe that the cell does not get selected. ### Description of the issue/feature this PR addresses: - The cell does not get selected when all content inside the cell is selected with the mouse. ### Desired behavior after PR is merged: - The entire cell is selected when the content is fully selected. task-4743170 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207028
Usecase: - Create a new company without warehouse - Create a purchase.order with a dropship type You got a redirect warning asking for a warehouse. But in this case it's not needed and force the user to create a warehouse. (which is not the purpose of commit 6516ab61927a63e3f2d804cf1b5baa43a151ca19) Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidel
Original PR description
Usecase: - Create a new company without warehouse - Create a purchase.order with a dropship type You got a redirect warning asking for a warehouse. But in this case it's not needed and force the user to create a warehouse. (which is not the purpose of commit 6516ab61927a63e3f2d804cf1b5baa43a151ca19) Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194897
Steps to reproduce: - Install accounting, Sales apps - Setup two companies for the current user with two diff currencies - In company A, make a SO on a product and create an invoice - Validate and confirm the invoice. - Go to accounting, reporting, invoice analysis, and add group for the product - Select the report of that specific invoice posted - Observe the values untaxed_total, avg_price, inventory_value and price_margin - Switch to company B, and add a currency rate between both cur
Original PR description
Steps to reproduce: - Install accounting, Sales apps - Setup two companies for the current user with two diff currencies - In company A, make a SO on a product and create an invoice - Validate and…
Steps to reproduce: - Install accounting, Sales apps - Setup two companies for the current user with two diff currencies - In company A, make a SO on a product and create an invoice - Validate and confirm the invoice. - Go to accounting, reporting, invoice analysis, and add group for the product - Select the report of that specific invoice posted - Observe the values untaxed_total, avg_price, inventory_value and price_margin - Switch to company B, and add a currency rate between both currencies to observe a difference - Make sure that you are selecting both companies, but B as the main company - Go again to the report of the same Invoice. - Observe the values again. Issue: When changing the currency, the fields untaxed_total and price_avg are updated using the currency rate of the current main company. However, inventory_value is not updated. This inconsistency affects the calculation of price_margin, which relies on both untaxed_total and inventory_value. As a result, price_margin is computed incorrectly. opw-4582973 Forward-Port-Of: odoo/odoo#210453 Forward-Port-Of: odoo/odoo#206582
Versions -------- - 17.0+ Steps ----- 1. Create a coupon that grants a discount; 2. add a second reward giving free products; 3. use a product tag to turn it into a multiproduct reward; 4. save program, generate coupons, and copy a code; 5. add the free product tag to two or more products; 6. go to eCommerce; 7. add any product to cart and go to checkout; 8. apply coupon code; 9. claim a reward. Issue ----- - Claiming a free product results in a traceback. - Claiming the dis
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Create a coupon that grants a discount; 2. add a second reward giving free products; 3. use a product tag to turn it into a multiproduct reward; 4. save…
Versions -------- - 17.0+ Steps ----- 1. Create a coupon that grants a discount; 2. add a second reward giving free products; 3. use a product tag to turn it into a multiproduct reward; 4. save program, generate coupons, and copy a code; 5. add the free product tag to two or more products; 6. go to eCommerce; 7. add any product to cart and go to checkout; 8. apply coupon code; 9. claim a reward. Issue ----- - Claiming a free product results in a traceback. - Claiming the discount does not apply the discount. Cause ----- Commit db3ffae3ef5a5 modified the reward claiming logic to allow for multiproduct rewards, but overlooked the possibility of the program having multiple rewards, multiproduct being one of them. It therefore passes all of the coupon's rewards to `_apply_reward`, which only expects a single reward. This is also a consequence of commit 6525d5fba40c, which moved part of the `claim_reward` logic to `pricelist`, without passing which reward was claimed to `pricelist`. Solution -------- Add an optional `reward_id` parameter to `pricelist`, letting it know which reward we intend to claim. opw-4778945 Forward-Port-Of: odoo/odoo#210214 Forward-Port-Of: odoo/odoo#209610
Scenario: - add a form with studio - change its action to "Create a Task" - delete the field "Full Name" - send the form with an unknown email Result: an error happens Cause: if the email does not find a user, the code expects the partner_name to always be present, even if it is an optional field. Fix: make the code work without partner_name field. opw-4773357 Forward-Port-Of: odoo/odoo#210160
Original PR description
Scenario: - add a form with studio - change its action to "Create a Task" - delete the field "Full Name" - send the form with an unknown email Result: an error happens Cause: if the email does not find a user, the code expects the partner_name to always be present, even if it is an optional field. Fix: make the code work without partner_name field. opw-4773357 Forward-Port-Of: odoo/odoo#210160
Problem: In case of programmatic selection change (e.g., on paste), the selection may be set on an invisible range, like: `setSelection({anchorNode: <div>, anchorOffset: 1});` This case was not properly handled by the `scrollToSelection` function. Solution: When encountering an invisible collapsed range, use the `anchorNode`'s closest element to calculate offset and perform scrolling. This prevents unnecessary scrolling when the selection is already inside the viewport and within an elemen
Original PR description
Problem:
In case of programmatic selection change (e.g., on paste), the selection may be set on an invisible range, like:
`setSelection({anchorNode: <div>, anchorOffset: 1});` This case was not properly handled by the `scrollToSelection` function.
Solution:
When encountering an invisible collapsed range, use the `anchorNode`'s closest element to calculate offset and perform scrolling. This prevents unnecessary scrolling when the selection is already inside the viewport and within an element.
Steps to reproduce:
1. Add enough text to make the editable area scrollable.
2. Insert a list (any type).
3. Copy some text and paste it into the last list element. → Even if the selection is in the viewport, it still scrolls
incorrectly.
opw-4745939
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#207673The issue is only reproducible from version 18.0 onwards, even if the `position-absolute` class still exists in earlier versions because the regression was introduced by [[1]](https://github.com/odoo/odoo/commit/189a7c96e6e26825dc05c0c6466576fe63aa091e), where the scroll handling was moved out of `div#wrapwrap`, which inadvertently affected the positioning of notifications. Steps to Reproduce: - Install `website_sale` and enable the 'Add to Cart' button from the website editor on the `/shop`
Original PR description
The issue is only reproducible from version 18.0 onwards, even if the `position-absolute` class still exists in earlier versions because the regression was introduced by…
The issue is only reproducible from version 18.0 onwards, even if the `position-absolute` class still exists in earlier versions because the regression was introduced by [[1]](https://github.com/odoo/odoo/commit/189a7c96e6e26825dc05c0c6466576fe63aa091e), where the scroll handling was moved out of `div#wrapwrap`, which inadvertently affected the positioning of notifications. Steps to Reproduce: - Install `website_sale` and enable the 'Add to Cart' button from the website editor on the `/shop` page - Navigate to the shop page and scroll to the last product - Add the last product to the cart - The pop-up does not appear unless you scroll back up Issue: - The add to cart pop-up is not visible when the user is scrolled down on the page Root cause: - The CSS class `position-absolute` restricts the pop-up to a specific location in the scrollable content Fix: - Replace `position-absolute` with `position-fixed` to keep the pop-up visible regardless of scroll position opw-4686886 Affected version - 18.0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208973
When user tries to open accrued expense entry in purchase order, A traceback will appear. Steps to reproduce the error: - Install ``accountant`` and ``purchase`` module - Create a new Bill > Add a line > Don't add a product > Save > Purchase matching > Select your bill > Add to PO > Add Down Payment > New PO will be created - Actions > Accrued Expense Entry Traceback: ``` AssertionError: precision_rounding must be positive, got 0.0 ``` https://github.com/odoo/odoo/blob/834e
Original PR description
When user tries to open accrued expense entry in purchase order, A traceback will appear. Steps to reproduce the error: - Install ``accountant`` and ``purchase`` module - Create a new Bill > Add a…
When user tries to open accrued expense entry in purchase order, A traceback will appear. Steps to reproduce the error: - Install ``accountant`` and ``purchase`` module - Create a new Bill > Add a line > Don't add a product > Save > Purchase matching > Select your bill > Add to PO > Add Down Payment > New PO will be created - Actions > Accrued Expense Entry Traceback: ``` AssertionError: precision_rounding must be positive, got 0.0 ``` https://github.com/odoo/odoo/blob/834eff6e770280e911bb99e2abab4ea42d4ca8ff/addons/account/wizard/accrued_orders.py#L170 Here, when ``is_purchase`` is true, ``is_downpayment`` will not be evaluated. As a result, down payment lines in purchase orders are not excluded. Since down payment lines do not have a ``product_uom``. so ``rounding`` will be 0.0 So, it will lead to the above traceback. sentry-6576645089 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208254
- Remove _get_extra_billing_info_route method, as it is unnecessary. The user should always be redirected to the checkout step first, regardless of the existence of an invoicing info step. Enterprise PR: https://github.com/odoo/enterprise/pull/85094 opw-4738797 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209221
Original PR description
- Remove _get_extra_billing_info_route method, as it is unnecessary. The user should always be redirected to the checkout step first, regardless of the existence of an invoicing info step. Enterprise PR: https://github.com/odoo/enterprise/pull/85094 opw-4738797 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#209221
1. Create a quote using a quote template that uses the quote calculator (e.g. the demo one, works fine), 2. Modify it using the quote calculator, 3. Duplicate it, 4. Open the quote calculator in the new quote -> it's filled with default values instead of the one from the other quote you dpulicated one could expect after duplication (and so if you save without changing anything in the spreadsheet, you 'reset' the quote even though it's probably not what you wanted to do), Expected behaviour
Original PR description
1. Create a quote using a quote template that uses the quote calculator (e.g. the demo one, works fine), 2. Modify it using the quote calculator, 3. Duplicate it, 4. Open the quote calculator in the…
1. Create a quote using a quote template that uses the quote calculator (e.g. the demo one, works fine), 2. Modify it using the quote calculator, 3. Duplicate it, 4. Open the quote calculator in the new quote -> it's filled with default values instead of the one from the other quote you dpulicated one could expect after duplication (and so if you save without changing anything in the spreadsheet, you 'reset' the quote even though it's probably not what you wanted to do), Expected behaviour: the quote calculator spreadsheet is duplicated for the new quote with the same values. Implementation note: Why not just `copy=True` on field `spreadsheet_ids`? Because the spreadsheet should be copied, but not only! The `spreadsheet.revision` linked to the spreadsheet also need to be copied. If they are not copied, revisions which are not part of the last snapshot will be lost on the new spreadsheet record and it won't lead to the same spreadsheet data. Task: 4801418 Forward-Port-Of: odoo/enterprise#85746
## Description This PR fixes several issues related to comments in spreadsheet cells: - **Dark Mode Styling** The comment styles were broken in dark mode because the dark SCSS file was in the wrong asset bundle. It's now removed from `assets_backend` and added to `assets_web_dark` to fix the issue. - **Focus Issue When Using Keyboard** When using the keyboard to move around the spreadsheet, opening a comment popup would focus the composer, stopping navigation. The composer now
Original PR description
## Description This PR fixes several issues related to comments in spreadsheet cells: - **Dark Mode Styling** The comment styles were broken in dark mode because the dark SCSS file was in the wrong…
## Description This PR fixes several issues related to comments in spreadsheet cells: - **Dark Mode Styling** The comment styles were broken in dark mode because the dark SCSS file was in the wrong asset bundle. It's now removed from `assets_backend` and added to `assets_web_dark` to fix the issue. - **Focus Issue When Using Keyboard** When using the keyboard to move around the spreadsheet, opening a comment popup would focus the composer, stopping navigation. The composer now doesn’t take focus, so keyboard navigation keeps working smoothly. - **Upload Button & Error Fixes** - The upload button was showing for spreadsheet cell comments but didn’t work. This was caused by missing allowUpload checks in composer actions. The condition is now correctly handled, and the upload button is hidden where it’s not applicable. - There was also an error when editing a comment because `this.thread` wasn’t always available. Now it falls back to `this.message?.thread` when editing the message. - **Popover Visibility Fix** When posting the first comment and hovering over it, the action buttons (edit, favorite, delete) were partly cut off. This is now fixed by adding some padding to the thread style.  **Task**: [4708400](https://www.odoo.com/odoo/project/2328/tasks/4708400) Forward-Port-Of: odoo/enterprise#84334 Forward-Port-Of: odoo/enterprise#83410
**Steps to reproduce:** 1. Install `website_sale_renting` 2. Go to the website editor. 3. Drag and drop the `rental search` snippet. 4. Set the rental timing to `hour` **Issue:** - The default date was always set to the next day with the current time, making it impossible for users to select the current date without adjusting the time manually. https://github.com/odoo/enterprise/blob/a6ec35e94bdd4f721982c32716f716948f74c875/website_sale_renting/static/src/js/website_sale_renting_dateran
Original PR description
**Steps to reproduce:** 1. Install `website_sale_renting` 2. Go to the website editor. 3. Drag and drop the `rental search` snippet. 4. Set the rental timing to `hour` **Issue:** - The default date was always set to the next day with the current time, making it impossible for users to select the current date without adjusting the time manually. https://github.com/odoo/enterprise/blob/a6ec35e94bdd4f721982c32716f716948f74c875/website_sale_renting/static/src/js/website_sale_renting_daterangepicker.js#L147-L148 **Solution:** - Updated the logic for hourly rentals to set the default date next day with adding one hour from the current time, to allow customers to select the current date. - For daily rentals, the logic remains unchanged and defaults to the next day. opw-4770823 Forward-Port-Of: odoo/enterprise#85613
* Hide smart buttons when there are no elements and include `in process` payments to the collections smart button. * Consider all payments linked to a mandate as Collections not only the ones have journal entries * Log in the payment chatter the inclusion/exclusion of the payment in a batch. * Validate only in process payments task-4531618 Forward-Port-Of: odoo/enterprise#80494
Original PR description
* Hide smart buttons when there are no elements and include `in process` payments to the collections smart button. * Consider all payments linked to a mandate as Collections not only the ones have journal entries * Log in the payment chatter the inclusion/exclusion of the payment in a batch. * Validate only in process payments task-4531618 Forward-Port-Of: odoo/enterprise#80494
The xsd changed. Now the rounding needs to be to 2 decimals everywhere. The official xsd does not mention it, but the field submit_more must appear on the xml. Also, while it's not blocking directly, the declaration will be rejected if the special deduction is filled without specifying the special %age. So we add a banner warning the user of it. opw-4789154 Forward-Port-Of: odoo/enterprise#85593 Forward-Port-Of: odoo/enterprise#85464
Original PR description
The xsd changed. Now the rounding needs to be to 2 decimals everywhere. The official xsd does not mention it, but the field submit_more must appear on the xml. Also, while it's not blocking directly, the declaration will be rejected if the special deduction is filled without specifying the special %age. So we add a banner warning the user of it. opw-4789154 Forward-Port-Of: odoo/enterprise#85593 Forward-Port-Of: odoo/enterprise#85464
…ve and reload sources In the reportEditor edit the xml, modify a view's arch and save. Before this commit, the cursor position in the XMLEditor was reset to [0,0]. After this commit, we restore the position of the cursor according to the start position of the last edition. opw-4745895 Forward-Port-Of: odoo/enterprise#84877
Original PR description
…ve and reload sources In the reportEditor edit the xml, modify a view's arch and save. Before this commit, the cursor position in the XMLEditor was reset to [0,0]. After this commit, we restore the position of the cursor according to the start position of the last edition. opw-4745895 Forward-Port-Of: odoo/enterprise#84877
Follow the changes made in community commit. When a Shipping Address is displayed inside the `information_block` there is no spacing to differentiate it from the Invoicing Address, making it harder to read. Note: there are leftovers `:` characters that will be removed on master forwardport to avoid wiping existing translation on stable (not worth) task-4730464 Community PR: https://github.com/odoo/odoo/pull/207725 Forward-Port-Of: odoo/enterprise#84281
Original PR description
Follow the changes made in community commit. When a Shipping Address is displayed inside the `information_block` there is no spacing to differentiate it from the Invoicing Address, making it harder to read. Note: there are leftovers `:` characters that will be removed on master forwardport to avoid wiping existing translation on stable (not worth) task-4730464 Community PR: https://github.com/odoo/odoo/pull/207725 Forward-Port-Of: odoo/enterprise#84281
**Steps to reproduce:** - Install Planning app - Set the type of view to Gantt - (Create a shift if there is none) - Click on `Publish` button - The period end date doesn't take the last day into account (time is 00:00) **Issue:** Gantt model default `_buildMetaData` computation behavior was changed multiple times during previous refactoring: Previously used: ``` export function computeRange(scale, date) { let start = date; let end = date; if (scale === "week") {
Original PR description
**Steps to reproduce:** - Install Planning app - Set the type of view to Gantt - (Create a shift if there is none) - Click on `Publish` button - The period end date doesn't take the last day into…
**Steps to reproduce:**
- Install Planning app
- Set the type of view to Gantt
- (Create a shift if there is none)
- Click on `Publish` button
- The period end date doesn't take the last day into account (time is 00:00)
**Issue:**
Gantt model default `_buildMetaData` computation behavior was changed multiple times during previous refactoring:
Previously used:
```
export function computeRange(scale, date) {
let start = date;
let end = date;
if (scale === "week") {
// startOf("week") does not depend on locale and will always give the
// "Monday" of the week... (ISO standard)
const { weekStart } = localization;
const weekday = start.weekday < weekStart ? weekStart - 7 : weekStart;
start = start.set({ weekday }).startOf("day");
end = start.plus({ weeks: 1, days: -1 }).endOf("day");
} else {
start = start.startOf(scale);
end = end.endOf(scale);
}
return { start, end };
}
```
Which became:
```
export function getRangeFromDate(rangeId, date) {
const startDate = localStartOf(date, rangeId);
const stopDate = startDate.plus({ [rangeId]: 1 }).minus({ day: 1 });
return { focusDate: date, startDate, stopDate, rangeId };
}
```
**Fix:**
Added `localStartOf` function in the context setup of PlanningGanttModel.
To avoid overwriting current changes for other modules (which could be intended), this was done instead of :
```
export function getRangeFromDate(rangeId, date) {
const startDate = localStartOf(date, rangeId);
const stopDate = localEndOf(startDate, rangeId);
return { focusDate: date, startDate, stopDate, rangeId };
}
```
related commits:
https://github.com/odoo/enterprise/commit/d18639785e622d97102227103d62ddb3a2716be6 https://github.com/odoo/enterprise/commit/c175a848369057cc69596737dcd9d21dd24c9d5c
opw-4580458
Forward-Port-Of: odoo/enterprise#85608The tours fails because when we edit the value in the input field of customer it clicks on the field and then fills out the value and then a change event is propagated and text based autocomplete results are shown (and m2o fields with partner autocomplete wizard are a tad bit slower), after that tours moves to next step and the new result dropdown menu is not loaded and it gets its reference from older menu which got closed in between and tries click it and no change is reflected but the n
Original PR description
The tours fails because when we edit the value in the input field of customer it clicks on the field and then fills out the value and then a change event is propagated and text based autocomplete…
The tours fails because when we edit the value in the input field of customer it clicks on the field and then fills out the value and then a change event is propagated and text based autocomplete results are shown (and m2o fields with partner autocomplete wizard are a tad bit slower), after that tours moves to next step and the new result dropdown menu is not loaded and it gets its reference from older menu which got closed in between and tries click it and no change is reflected but the new menu is not closed and tour continues to industry_fsm_report where we create a worksheet from a many2one field using create and edit so we click on the m2o input and wait for options but as partner field loaded dropdown is loaded it clicks on click and edit trying to create a new partner and opening thus fails the tour. Fix: - After entering the text to instantly load the dropdown by clicking on it and give time for loading of menu. task-4800194 Forward-Port-Of: odoo/enterprise#85622
*= mx/cl Steps to reproduce: 1.Set the website's company to Mexico or Chile. 2.As a guest user, add any deliverable product to the cart. 3.In the address form, select Mexico or Chile as the country. 4.Submit the address form. Issue: - The user is redirected directly to the invoicing info step, skipping the checkout step. Cause: - When submitting the address form, if the address type is 'billing' and the invoicing info step is available, the flow redirects there immediately. Fix
Original PR description
*= mx/cl Steps to reproduce: 1.Set the website's company to Mexico or Chile. 2.As a guest user, add any deliverable product to the cart. 3.In the address form, select Mexico or Chile as the country. 4.Submit the address form. Issue: - The user is redirected directly to the invoicing info step, skipping the checkout step. Cause: - When submitting the address form, if the address type is 'billing' and the invoicing info step is available, the flow redirects there immediately. Fix: - Removed the _get_extra_billing_info_route method, as it is unnecessary. The user should always be redirected to the checkout step first, regardless of the existence of an invoicing info step. See also: - https://github.com/odoo/odoo/pull/209221 opw-4738797 Forward-Port-Of: odoo/enterprise#85094