Thursday, December 12, 2024
19 changes · saas-17.2
Resolved issues and error corrections
A web interface test was adjusted to match a recent change in keyboard shortcut behavior. This helps keep automated checks reliable without changing the product experience for users.
Original PR description
fix test broken by: https://github.com/odoo/odoo/pull/189163/commits/be23ed0ef17d0e5522c2cadc6267799f0a690fdb --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Options dict is not supposed to contain date objects. Forward-Port-Of: odoo/enterprise#75588
Original PR description
Options dict is not supposed to contain date objects. Forward-Port-Of: odoo/enterprise#75588
### Steps to reproduce: - Activate developer mode - Install the 'l10n_ec' module and switch to an Ecuadorian company - In Settings > Technical > Database Structure > Decimal Accuracy change the number of decimals for "Product Price" to 4 for example - In Accounting, create a new Customer Invoice - Select 'Instituto Ecuatoriano' as Customer - Add a line with a price with 4 decimals - Select 'Sin utilization del sistema financiero' as Payment Method - Confirm - On the blue popup at the to
Original PR description
### Steps to reproduce: - Activate developer mode - Install the 'l10n_ec' module and switch to an Ecuadorian company - In Settings > Technical > Database Structure > Decimal Accuracy change the…
### Steps to reproduce: - Activate developer mode - Install the 'l10n_ec' module and switch to an Ecuadorian company - In Settings > Technical > Database Structure > Decimal Accuracy change the number of decimals for "Product Price" to 4 for example - In Accounting, create a new Customer Invoice - Select 'Instituto Ecuatoriano' as Customer - Add a line with a price with 4 decimals - Select 'Sin utilization del sistema financiero' as Payment Method - Confirm - On the blue popup at the top of the page, click 'process now' to get the XML in the chatter - In the XML the "precioUnitario" field only has 2 precision digits, it has been rounded - When adding a discount of 100% this field has all precision digits needed ### Cause: The price_unit is calculated differently if the discount is 100%. The "precioUnitario" field should always have the number of precision digits specified in the settings. ### Solution: We need to find the unit price without the discount, but without the included. This value is not computed. As the values computed in the account.move.line are already rounded based on the currency (2 digits) we need to recompute the values using `compute_all` and multiplying by the `price_digits` to not round in `compute_all`. The way the rounding is made here is by taking the decimal precision from the settings and making it a power of 10 in `price_digits` (4 decimals results in price_digits = 10000). Then we compute the taxes with `price_unit * price_digits`. As, per definition, `price_unit` has the number of digits used in the calculation of `price_digits`, we end up with an integer. But after the results of `compute_all` may no longer be an integer. We need an integer to keep the decimal precision. This is why, in the result, there is a call to `round()`. The call to `float_round()` is to make sure there are not more decimals than 6. This is needed as the number displayed in the XML will always be of 6 decimals, so if the client set a number of decimals greater than 6, it will be rounded in the XML but not on the invoice. To ensure that both values are the same, we round the value here. Some tests had "precioUnitario" with strange values that did not match the actual price_unit. It was because the precedent way to calculate this field was not perfect, I guess. opw-4120341 Forward-Port-Of: odoo/enterprise#68555
`*` = [sale_subscription] Before this commit: In the mobile and form view, when a checkbox field had a long label, the checkbox would appear on top, with the label text displayed below. After this commit: In the mobile and form view, checkbox fields with long labels are now properly aligned, with the checkbox and label text displayed. Task-4269578 Forward-Port-Of: odoo/enterprise#74561
Original PR description
`*` = [sale_subscription] Before this commit: In the mobile and form view, when a checkbox field had a long label, the checkbox would appear on top, with the label text displayed below. After this commit: In the mobile and form view, checkbox fields with long labels are now properly aligned, with the checkbox and label text displayed. Task-4269578 Forward-Port-Of: odoo/enterprise#74561
When a grid view is removed we should cascade the removal to the window actions mapping. Grid views are considered experimental. They do not have a `_get_default_grid_view` method, and crafting an acceptable general one is close to impossible due to grid views' requirements in terms of the model fields. Allowing the grid mapping for window actions have been proven to cause issues during upgrades if clients uninstall one of the few modules providing grid views (like analytic_enterprise). Forw
Original PR description
When a grid view is removed we should cascade the removal to the window actions mapping. Grid views are considered experimental. They do not have a `_get_default_grid_view` method, and crafting an acceptable general one is close to impossible due to grid views' requirements in terms of the model fields. Allowing the grid mapping for window actions have been proven to cause issues during upgrades if clients uninstall one of the few modules providing grid views (like analytic_enterprise). Forward-Port-Of: odoo/enterprise#74912
Issue: Clicking the space between buttons but no click on any buttons, a input of "123456789*0#" will be generated. Fix: Do nothing when click in this situation, only generate input when clicking on buttons. Forward-Port-Of: odoo/enterprise#75444
Original PR description
Issue: Clicking the space between buttons but no click on any buttons, a input of "123456789*0#" will be generated. Fix: Do nothing when click in this situation, only generate input when clicking on buttons. Forward-Port-Of: odoo/enterprise#75444
### Steps to reproduce the issue: 1. Create two Companies, one in EUR, the other in USD 2. In EUR Company, create two Invoices with the following settings: - Total price of 1000 - Invoice date: today and one month ago - You must be able to isolate them using Partner Ledger filters (not date) 3. In USD Company, add EUR Rates as follows: - Today: 1USD = 1EUR - One month ago: 1USD = 0.9EUR 4. In USD Company, open General Ledger and isolate the Invoices 5. First, set
Original PR description
### Steps to reproduce the issue: 1. Create two Companies, one in EUR, the other in USD 2. In EUR Company, create two Invoices with the following settings: - Total price of 1000 - Invoice date: today…
### Steps to reproduce the issue:
1. Create two Companies, one in EUR, the other in USD
2. In EUR Company, create two Invoices with the following settings:
- Total price of 1000
- Invoice date: today and one month ago
- You must be able to isolate them using Partner Ledger filters (not date)
3. In USD Company, add EUR Rates as follows:
- Today: 1USD = 1EUR
- One month ago: 1USD = 0.9EUR
4. In USD Company, open General Ledger and isolate the Invoices
5. First, set the timeframe from beginning last month to end of this month
6. The Invoice of last month is using the current rate, with an amount of 1000$
7. Second, set the timeframe to the current month only
8. The Initial Balance is using the previous rate, with an amount of 1111.11$
### Explanation:
The initial balance is the balance of the company before the start of the currently reviewed timeframe. To calculate it, we must update the options to target the time before the current timeframe. Since we retrieve the rate used for this calculation using the updated options, we use the last rate before the current timeframe instead of the rate used in the current timeframe.
### Fix reasoning:
Since every amount must be calculated using the current rate, we will retrieve it using the main options and not the updated ones.
opw-4299153
Forward-Port-Of: odoo/enterprise#75441An error can occur when the email subject contains line breaks when the audit trail is enabled. For example, steps to reproduce using follow-up reports: 1. Add or modify the "Payment Reminder" mail template to add a line break in the subject, like {{ '\n' } 2. Install the 'account_audit_trail' module. 3. Enable audit trail in the settings 4. Attempt to send a follow-up report email to the partner 5. An error will occur: "You cannot remove parts of the audit trail. Archive the record
Original PR description
An error can occur when the email subject contains line breaks when the audit trail is enabled.
For example, steps to reproduce using follow-up reports:
1. Add or modify the "Payment Reminder" mail template to add a line break in the subject, like {{ '\n' }
2. Install the 'account_audit_trail' module.
3. Enable audit trail in the settings
4. Attempt to send a follow-up report email to the partner
5. An error will occur: "You cannot remove parts of the audit trail.
Archive the record instead."
The issue arises because the subject is considered different from the original message, prompting Odoo to attempt an update.
New behavior:
We allow any subject whitespace modifications to be ignored whenchecking for changes in the audit trail.
opw-4317844
Forward-Port-Of: odoo/odoo#187429The mail module override of `_invalidate_im_status` is calling the wrong super method. This PR fixes the issue. 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#190238
Original PR description
The mail module override of `_invalidate_im_status` is calling the wrong super method. This PR fixes the issue. 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#190238
Previously, the fields in the calendar popover were misaligned. This fix ensures proper alignment of the fields. Task-4315829 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190234 Forward-Port-Of: odoo/odoo#188757
Original PR description
Previously, the fields in the calendar popover were misaligned. This fix ensures proper alignment of the fields. Task-4315829 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190234 Forward-Port-Of: odoo/odoo#188757
Defines dataset directly on website elements such that it can be overridden by other modules if necessary. This was done due to the override in the `test_themes` module completely overriding all attributes of the website_switcher's dropdown items. Runbot Error 106501 Forward-Port-Of: odoo/odoo#190366 Forward-Port-Of: odoo/odoo#187391
Original PR description
Defines dataset directly on website elements such that it can be overridden by other modules if necessary. This was done due to the override in the `test_themes` module completely overriding all attributes of the website_switcher's dropdown items. Runbot Error 106501 Forward-Port-Of: odoo/odoo#190366 Forward-Port-Of: odoo/odoo#187391
Using the fields `lot_ids` on `stock.move` will create a line with the given serial. However, it will use the move's location as reference. But the serial could be in a sublocation. Currently the user has a warning that display the real location of the serial but it's annoying to do it when the sytem know. So set the current location as default and remove the warning for this case. opw-4342448 Description of the issue/feature this PR addresses: Current behavior before PR: Desired
Original PR description
Using the fields `lot_ids` on `stock.move` will create a line with the given serial. However, it will use the move's location as reference. But the serial could be in a sublocation. Currently the user has a warning that display the real location of the serial but it's annoying to do it when the sytem know. So set the current location as default and remove the warning for this case. opw-4342448 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#188061
Incorporate Eduardo Martinez (emtz10) as Vauxoo's contributor. I confirm I have signed the CLA and read the PR guidelines at http://www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190149
Original PR description
Incorporate Eduardo Martinez (emtz10) as Vauxoo's contributor. I confirm I have signed the CLA and read the PR guidelines at http://www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190149
Issue: ====== url autocomplete doesn't work in mass mailing Steps to reproduce the issue: ============================= - Install website - Create a new mass mailing - Choose welcome message - Select some text and click on the link icon on the toolbar in the snippets sidebar - You will see the hint of `type / to search ....` - If you type that nothing happens Origin of the issue: ==================== The behavior of autocomplete was added only in website but the hint was added f
Original PR description
Issue: ====== url autocomplete doesn't work in mass mailing Steps to reproduce the issue: ============================= - Install website - Create a new mass mailing - Choose welcome message - Select some text and click on the link icon on the toolbar in the snippets sidebar - You will see the hint of `type / to search ....` - If you type that nothing happens Origin of the issue: ==================== The behavior of autocomplete was added only in website but the hint was added for the linkTools in general. Solution: ========= Patch linkTools to include the behavior too. opw-4318224 Forward-Port-Of: odoo/odoo#186741
**Steps to reproduce:** - Create a new mailing - Add a link with "Link" widget - Enter a link with the same domain (e.g. a link to an event) - Insert the link **Issue:** The link is automatically converted to a relative link. This may cause some issue in a multi-company environment where each company has a website (i.e. has its own domain url) and "web.base.url" is configured with the domain of the other company. **Cause 1:** The "Autoconvert to relative link" checkbox is never displ
Original PR description
**Steps to reproduce:** - Create a new mailing - Add a link with "Link" widget - Enter a link with the same domain (e.g. a link to an event) - Insert the link **Issue:** The link is automatically…
**Steps to reproduce:** - Create a new mailing - Add a link with "Link" widget - Enter a link with the same domain (e.g. a link to an event) - Insert the link **Issue:** The link is automatically converted to a relative link. This may cause some issue in a multi-company environment where each company has a website (i.e. has its own domain url) and "web.base.url" is configured with the domain of the other company. **Cause 1:** The "Autoconvert to relative link" checkbox is never displayed and is always applied as it is checked by default. The display toggle is done in "_onURLInput" function of "Link" component, but it is never called by the override function in "LinkDialog". **Cause 2:** Even if the "Autoconvert to relative link" checkbox is displayed, the link will be stripped from its domain as soon as an URL is inputted and save in "this.state.url". When the checkbox is unchecked, "this.state.url" stays unchanged because it is not possible to retrieve the stripped domain from "this.state.url". **Solution 1:** Call the super function in "_onURLInput" function of "LinkDialog". **Solution 2:** Retrieve the URL from the input when the domain should not be stripped and update "this.state.url" with it. opw-4357095 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189351
Consider this situation: - Customer invoice. - All invoice lines use a tax type with l10n_es_type=no_sujeto_loc. - The sum of the invoice is 0€. - Sent to SII. Before this patch, the process would raise a wrong `UserError`. If the process was being executed by the cron, **no invoice would be sent**, even if there was only one failing. After this patch, the invoice will be notified nevertheless. If there's any kind of real validation problem, the SII servers will return an error that wi
Original PR description
Consider this situation: - Customer invoice. - All invoice lines use a tax type with l10n_es_type=no_sujeto_loc. - The sum of the invoice is 0€. - Sent to SII. Before this patch, the process would raise a wrong `UserError`. If the process was being executed by the cron, **no invoice would be sent**, even if there was only one failing. After this patch, the invoice will be notified nevertheless. If there's any kind of real validation problem, the SII servers will return an error that will get logged in the invoice. No exceptions raised in Odoo. The process can continue. Faulty invoices are marked; others work. Apart from that, there's also the fix to support the specific case outlined above. @moduon MT-7949 OPW-4344661 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189529
**Current behavior:** When computing the total cost for a kit product in a POS order, extra stock moves are included if another POS order line has a product that shares the same components. This results in an incorrect total cost displayed on the POS order, which does not match the computed price from the BOM shown on the product page. **Expected behavior:** The total cost for the POS order should match the computed BOM price shown on the product page. **Steps to reproduce:** 1. Creat
Original PR description
**Current behavior:** When computing the total cost for a kit product in a POS order, extra stock moves are included if another POS order line has a product that shares the same components. This…
**Current behavior:** When computing the total cost for a kit product in a POS order, extra stock moves are included if another POS order line has a product that shares the same components. This results in an incorrect total cost displayed on the POS order, which does not match the computed price from the BOM shown on the product page. **Expected behavior:** The total cost for the POS order should match the computed BOM price shown on the product page. **Steps to reproduce:** 1. Create two products: Product 1 and Product 2. 2. Set both products to be tracked by "quantity" or make them "storable" and assign them to a product category with "average cost" as the costing method (instead of "standard price"). 3. Create a Bill of Materials for each product, ensuring they share at least one component. Make sure BoM Type is 'kit' - Tip: For better visibility of the error, assign a quantity of 10 or more to the shared component in Product 2's BOM, and set the shared component’s `standard_price` (cost) to 5 or higher. This will make the discrepancy in the total cost more apparent. 4. Create the shared component as a new product and assign it a price. 5. Open a new POS order, add Product 1 and Product 2, and close the order. 6. Locate the order and observe that the "total cost" is incorrect. **Cause of the issue:** The stock move filter does not consider that stock moves for BOM lines need to belong to the current product. As a result, if two kit products share components, the stock moves for one product are mistakenly included in the calculation for the other, leading to an incorrect total cost. **Fix:** When filtering out the stock moves, ensure they are correctly associated with the current product by verifying that each stock move’s BOM line belongs specifically to the current product and does not include nested BOMs. opw-4274532 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187130
`*` = [hr_expense, pos_loyalty, product, sale_loyalty , website_sale_loyalty] Before this commit: In the mobile and form view, when a checkbox field had a long label, the checkbox would appear on top, with the label text displayed below. Also, Long labels extend beyond the boundaries of the form view, appearing outside of it. After this commit: Checkbox fields with long labels are now properly aligned in the mobile and form views. The checkbox and its label text are displayed corr
Original PR description
`*` = [hr_expense, pos_loyalty, product, sale_loyalty , website_sale_loyalty] Before this commit: In the mobile and form view, when a checkbox field had a long label, the checkbox would appear on top, with the label text displayed below. Also, Long labels extend beyond the boundaries of the form view, appearing outside of it. After this commit: Checkbox fields with long labels are now properly aligned in the mobile and form views. The checkbox and its label text are displayed correctly, Task-4269578 Forward-Port-Of: odoo/odoo#187980
When preparing final outgoing email, partner email is normalized. We take their formatted email, which is their name and their normalized email. However email_to and email_cc are taken from input using 'email_split(_and_format)', which finds emails but do not format them. This leads to incoherent behavior as most emails are normalized as we generally always use partners, but not all. In this commit we now split, normalize and format email_to and email_cc in outgoing emails. This fixes a fi
Original PR description
When preparing final outgoing email, partner email is normalized. We take their formatted email, which is their name and their normalized email. However email_to and email_cc are taken from input…
When preparing final outgoing email, partner email is normalized. We take their formatted email, which is their name and their normalized email. However email_to and email_cc are taken from input using 'email_split(_and_format)', which finds emails but do not format them. This leads to incoherent behavior as most emails are normalized as we generally always use partners, but not all. In this commit we now split, normalize and format email_to and email_cc in outgoing emails. This fixes a first issue where name are lost if a formatted email was entered in email_cc field. Only address was kept, now the name is correctly found and put back. This also fixes an issue for validated email detection, in order to compare normalized emails. This was introduced at odoo/odoo#185793 and may skip valid emails entered in email_to or email_cc. This commit backports a tool introduced at odoo/odoo@dd4709e579841672b0c2a57d5f2941f3ce770801 which aims at allowing a quick convert from a string holding emails to a list of nicely formatted emails, using normalize version of email addresses. This is the standard we use in most flows. Task-4376876 Followup of task-3704658 Forward-Port-Of: odoo/odoo#190033 Forward-Port-Of: odoo/odoo#189409