Saturday, June 1, 2024
17 changes · saas-17.2
Resolved issues and error corrections
Sales orders in multi-company setups now show a clear validation message when the company is removed instead of causing a system error. This helps users understand what needs to be fixed and prevents confusing traceback screens during order entry.
Original PR description
Problem: In a multi-company environment, deselecting a company on the sales order throws a traceback error that no company can be found. Purpose: No traceback error should occur. Instead, a ValidationError should display requiring the user to set a company. Steps to Reproduce on Runbot: 1. Install Sales and Invoice 2. Create a sale orders with a company and save. 3. Deselect the company to be empty and try to save 4. Traceback error occurs opw-3915943 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
How to reproduce the issue: - create a leave type that allows negative amounts - create an accrual plan (demo seniority plan works) - create an accrual allocation for an employee on the leave type - set the number of days to 1 - go on the employee dashboard for time off - create a leave in the near future (in the current month) - create a second leave in the same period - ensure with the balance on the day of the latest leave that the balance is negative - run the cron "Time Off: Cance
Original PR description
How to reproduce the issue: - create a leave type that allows negative amounts - create an accrual plan (demo seniority plan works) - create an accrual allocation for an employee on the leave type - set the number of days to 1 - go on the employee dashboard for time off - create a leave in the near future (in the current month) - create a second leave in the same period - ensure with the balance on the day of the latest leave that the balance is negative - run the cron "Time Off: Cancel invalid leaves" Behaviour prior to this commit: The latest leave is cancelled. Intended behaviour: Since the leave is valid according to the leave type configuration, it should not have been cancelled. The leave cancelled should only be made in the case of an excess over the limit in negatives. task-3879156 Forward-Port-Of: odoo/odoo#166929 Forward-Port-Of: odoo/odoo#162643
When you have many UTM values (campaign, medium, source), the link tracker screen was simply not possible to use: 1. The page loading is slow, indeed we loaded all the values during the page load, even after javascript lazy loading. 2. The select2 lib (that we are currently getting rid of) simply cannot handle searches in pre-loaded large dataset. It probably creates many DOM elements which make the screen freeze. 3. If you search for "Roadshow" as an UTM campaign but you have many camp
Original PR description
When you have many UTM values (campaign, medium, source), the link tracker screen was simply not possible to use: 1. The page loading is slow, indeed we loaded all the values during the page load,…
When you have many UTM values (campaign, medium, source), the link tracker screen was simply not possible to use: 1. The page loading is slow, indeed we loaded all the values during the page load, even after javascript lazy loading. 2. The select2 lib (that we are currently getting rid of) simply cannot handle searches in pre-loaded large dataset. It probably creates many DOM elements which make the screen freeze. 3. If you search for "Roadshow" as an UTM campaign but you have many campaigns called "Roadshow XXX", it is impossible to find the exact match "Roadshow" if it was created after. To solve all of that: 1. We do not preload anything. 2. We query the database after each user search, with a small enough (still big though) limit. 3. We order results by size and with "results that start with the search term" first, basically making any exact match first, followed by closest matches. task-3933262 Forward-Port-Of: odoo/odoo#167117 Forward-Port-Of: odoo/odoo#166388
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated payment total and payment difference will be wrong. Current behavior before PR: If I have two Bills, both for $25.00 where one falls within the parameters of a discount for 2% in 10 Days and the other doesn't, and I select both of them and click register payment, and the select "Group Payments" (g
Original PR description
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated…
Description of the issue/feature this PR addresses: If the user has two invoices/bills selected where one falls within the parameters of a discounted payment and the other does not, the calculated payment total and payment difference will be wrong. Current behavior before PR: If I have two Bills, both for $25.00 where one falls within the parameters of a discount for 2% in 10 Days and the other doesn't, and I select both of them and click register payment, and the select "Group Payments" (group_payment), the "Amount" (amount) will be $0.50 and the Payment Difference (payment_difference) will be $49.50. Desired behavior after PR is merged: In the same scenario, I would expect the "Amount" to be $49.50 and the "Payment Difference" to be $0.50 To Reproduce: - Create Payment Term "2% 10, Net 30" this payment term should be configured to have a discount of 2% if paid in the first 10 days, and then 100% of the bill is due in 30 Days. - Create two Purchase Orders (doesn't matter which products you purchase), receive products, and create bills. Make sure one has the new payment term you created and its bill date puts it within the discount parameters. The other bill should either have a different payment term that doesn't have a discount or the same term but not be within the parameters to have the discount apply (bill is older than 10 days in this case) - Go to Accounting --> Vendors --> Bills and select both of these new bills and click "Register Payment" - In the wizard, click "Group Payments" and you will see the amount and payment difference are incorrect. **This process can also be done with sale orders instead, you will get the same result with two invoices for customers. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167214 Forward-Port-Of: odoo/odoo#165539
Before this fix, when a spreadsheet contained any odoo link (to an action, a menu or a XML Id), when a public user opened the spreadsheet and clicked on the link, he had a nonsensical page because the parser and resolver of the link is never loaded for the public user (he would not have access to the menu data anyway). After this fix, we replace the odoo links by their label, so the link itself is removed. Task: 3925333 --- I confirm I have signed the CLA and read the PR guid
Original PR description
Before this fix, when a spreadsheet contained any odoo link (to an action, a menu or a XML Id), when a public user opened the spreadsheet and clicked on the link, he had a nonsensical page because the parser and resolver of the link is never loaded for the public user (he would not have access to the menu data anyway). After this fix, we replace the odoo links by their label, so the link itself is removed. Task: 3925333 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167352 Forward-Port-Of: odoo/odoo#166843
Since python 3.11, the patch.dict method changed [0] to use pkgutil to resolve names. This new method is not able to patch our `odoo.tools.config.options`. Fixed by using the object instead of a string literal. [0]: python/cpython@ab7fcc8fbdc11091370deeb000a787fb02f9b13d Forward-Port-Of: odoo/odoo#167306
Original PR description
Since python 3.11, the patch.dict method changed [0] to use pkgutil to resolve names. This new method is not able to patch our `odoo.tools.config.options`. Fixed by using the object instead of a string literal. [0]: python/cpython@ab7fcc8fbdc11091370deeb000a787fb02f9b13d Forward-Port-Of: odoo/odoo#167306
The test web:TestImage.test_04_web_content_filename_secure is failing on the runbot for the version 16 (16.0, saas-16.3 and saas-16.4). The error is 'str' object has no attribute 'removeprefix' and this method has been introduced in python 3.9 while version 16 only support python 3.7. To solve the problem we replace that method call with a supported equivalent in python 3.7. Task-3944583 Forward-Port-Of: odoo/odoo#167303
Original PR description
The test web:TestImage.test_04_web_content_filename_secure is failing on the runbot for the version 16 (16.0, saas-16.3 and saas-16.4). The error is 'str' object has no attribute 'removeprefix' and this method has been introduced in python 3.9 while version 16 only support python 3.7. To solve the problem we replace that method call with a supported equivalent in python 3.7. Task-3944583 Forward-Port-Of: odoo/odoo#167303
To handle some advanced taxes setups, we changed the behavior of the 'Update taxes' so that it would recompute the prices before recomputing the taxes, but some business do not expect that recomputation, despite modifying the taxes. The businesses needing the prices recomputation will have to trigger it manually, and shouldn't rely on the Update Taxes button for that. Introduced by 537df32897494f94962637bd2b45d2618ff83e7c opw-3953806 --- I confirm I have signed the CLA and read th
Original PR description
To handle some advanced taxes setups, we changed the behavior of the 'Update taxes' so that it would recompute the prices before recomputing the taxes, but some business do not expect that recomputation, despite modifying the taxes. The businesses needing the prices recomputation will have to trigger it manually, and shouldn't rely on the Update Taxes button for that. Introduced by 537df32897494f94962637bd2b45d2618ff83e7c opw-3953806 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167321
Before this PR -------------------- When creating a new company and selecting the country localisation available to install `alert` was visible, on clicking the install button it installed the l10n modules available for that country but the COA was not set After this PR ----------------- The alert has been removed once the country is selected on company and it is saved the available `l10n` modules are installed and sets the COA as per the country --- I confirm I have signed t
Original PR description
Before this PR -------------------- When creating a new company and selecting the country localisation available to install `alert` was visible, on clicking the install button it installed the l10n modules available for that country but the COA was not set After this PR ----------------- The alert has been removed once the country is selected on company and it is saved the available `l10n` modules are installed and sets the COA as per the country --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156650
Make the pricelist dropdown for events tickets visible on smaller screens, if not, users will be stuck with the default pricelist and won't be able to change to the one they need to use. ## Steps to reproduce: 1. Create an event with selling tickets. 2. Make sure you have more than 1 pricelist available. 3. Go to order a ticket, and in the dialog, make sure our screen size is below 992px. 4. The dropdown to select pricelist is no longer visible. opw-3889376 Forward-Port-Of: odoo/odo
Original PR description
Make the pricelist dropdown for events tickets visible on smaller screens, if not, users will be stuck with the default pricelist and won't be able to change to the one they need to use. ## Steps to reproduce: 1. Create an event with selling tickets. 2. Make sure you have more than 1 pricelist available. 3. Go to order a ticket, and in the dialog, make sure our screen size is below 992px. 4. The dropdown to select pricelist is no longer visible. opw-3889376 Forward-Port-Of: odoo/odoo#164605
If user claimed ewallet in confirm order stage, it would redirect them back to review order stage with wrong calculation if shipping had cost. opw-3825880 Forward-Port-Of: odoo/odoo#166324 Forward-Port-Of: odoo/odoo#161620
Original PR description
If user claimed ewallet in confirm order stage, it would redirect them back to review order stage with wrong calculation if shipping had cost. opw-3825880 Forward-Port-Of: odoo/odoo#166324 Forward-Port-Of: odoo/odoo#161620
Issue: ====== Currently you can delete content inside contenteditable=false elements Steps to reproduce the issue: ============================= - Go to website, edit mode, drag a text block - Add `contenteditable="false"` to a `p` element - Select a word in that `p` element and press on any character, it will be deleted Origin of the issue: ==================== Theres is no check if the element is inside a contenteditable=false or not. Solution: ========= We need to check
Original PR description
Issue: ====== Currently you can delete content inside contenteditable=false elements Steps to reproduce the issue: ============================= - Go to website, edit mode, drag a text block - Add `contenteditable="false"` to a `p` element - Select a word in that `p` element and press on any character, it will be deleted Origin of the issue: ==================== Theres is no check if the element is inside a contenteditable=false or not. Solution: ========= We need to check if the selection is in editable or not to be able to apply commands. task-3605829 Forward-Port-Of: odoo/odoo#167016 Forward-Port-Of: odoo/odoo#155758
Since lxml 5.2 (https://github.com/lxml/lxml/commit/73778681f14359fe6d16644e69aaca276eba525a) lxml_html_clean is in another package We can adapt the requirements after python 3.12 (based on ubuntu 24.04) We can use | operator in debian/control We may need to adapt documentation since the current sed script will fail This pr proposes an alternative script to avoid to use a sed Current sed: `sed -n -e '/^Depends:/,/^Pre/ s/ python3-\(.*\),/python3-\1/p' debian/control` This sed wi
Original PR description
Since lxml 5.2 (https://github.com/lxml/lxml/commit/73778681f14359fe6d16644e69aaca276eba525a) lxml_html_clean is in another package We can adapt the requirements after python 3.12 (based on ubuntu 24.04) We can use | operator in debian/control We may need to adapt documentation since the current sed script will fail This pr proposes an alternative script to avoid to use a sed Current sed: `sed -n -e '/^Depends:/,/^Pre/ s/ python3-\(.*\),/python3-\1/p' debian/control` This sed will fail and give the result `python3-lxml-html-clean | python3-lxml` for the lxml line, we need to remove the spaces Forward-Port-Of: odoo/odoo#167350 Forward-Port-Of: odoo/odoo#163788
Steps to reproduce: - Have two companies selected (i.e. San Francisco & Chicago) - Have 'Storage Locations' option enabled - Create a product then 'Update Quantity' - Create a quant and try to select the stock of the other company Issue: Only the locations in the first company will be shown. Moreover, in the case of tracked products, if the last quant created was one to a 'transit' location without company (e.g. 'Inter-company transit'), then only internal/transit location without compan
Original PR description
Steps to reproduce: - Have two companies selected (i.e. San Francisco & Chicago) - Have 'Storage Locations' option enabled - Create a product then 'Update Quantity' - Create a quant and try to select…
Steps to reproduce: - Have two companies selected (i.e. San Francisco & Chicago) - Have 'Storage Locations' option enabled - Create a product then 'Update Quantity' - Create a quant and try to select the stock of the other company Issue: Only the locations in the first company will be shown. Moreover, in the case of tracked products, if the last quant created was one to a 'transit' location without company (e.g. 'Inter-company transit'), then only internal/transit location without companies will be shown. The issue comes from the `check_company` clause on the `location_id` field. This will make a check against the `company_id` of the record, which itself is a related field from the location This doesn't make much sense, as for checking if the company of a location is correct, we check if the company of the location is within the company of the location. This also introduces the issue mentionned above, as `check_company` will enforce to have ONLY that company & no-company, or just no-company depending on the company of the default location found. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167233
The issue: When importing a FEC file, the created COAs lack correct translation for languages other than English. This discrepancy arises because the xml_id generated during COA creation does not match the xml_id produced by the _load_translations function. The new COAs' xml_id is a composite of the module ('l10n_fr_fec_import' in this case), company ID, prefix ('account' in this case), and a key derived from the account number code in the CSV file (not Odoo's default code). Consequently, when
Original PR description
The issue: When importing a FEC file, the created COAs lack correct translation for languages other than English. This discrepancy arises because the xml_id generated during COA creation does not…
The issue:
When importing a FEC file, the created COAs lack correct translation for languages other than English. This discrepancy arises because the xml_id generated during COA creation does not match the xml_id produced by the _load_translations function. The new COAs' xml_id is a composite of the module ('l10n_fr_fec_import' in this case), company ID, prefix ('account' in this case), and a key derived from the account number code in the CSV file (not Odoo's default code). Consequently, when calling the _load_translations function, it attempts to update translations using a different xml_id, causing failure in locating records.
The fix:
Include the template_data, if available, during COA translation, as it is more efficient than loading and parsing the entire CSV file. This template data already contains the necessary information, including the correct xml_id. Additionally, introduce a key 'is_xml_generated' in the context to prevent the generation of an incorrect xml_id.
Enterprise PR: https://github.com/odoo/enterprise/pull/55537
opw-3646861
Forward-Port-Of: odoo/odoo#152090Removed odoo domain from blacklist, so that emails from odoo.com can be used for enrichment for demo/testing purposes. Task-3939876 Forward-Port-Of: odoo/odoo#166239
Original PR description
Removed odoo domain from blacklist, so that emails from odoo.com can be used for enrichment for demo/testing purposes. Task-3939876 Forward-Port-Of: odoo/odoo#166239
Steps to reproduce: - Install the hr_timesheet module. - Create a Project with timesheets selected. - Create a Task and set the allocated time to 5. - Add a timesheet entry with hours set to 23. - Open the task in the portal view. Currently, the progress field value is not rounded, and a large number of decimal places are displayed in the portal view. We have fixed this issue by adding the float widget. task-3888878 Forward-Port-Of: odoo/odoo#163924
Original PR description
Steps to reproduce:
- Install the hr_timesheet module.
- Create a Project with timesheets selected.
- Create a Task and set the allocated time to 5.
- Add a timesheet entry with hours set to 23.
- Open the task in the portal view.
Currently, the progress field value is not rounded, and a large number of decimal places are
displayed in the portal view. We have fixed this issue by adding the float widget.
task-3888878
Forward-Port-Of: odoo/odoo#163924