Daily updates from Odoo
Navigate
Branch
Friday, January 31, 2025
45 changes
17 changes
Resolved issues and error corrections
The spreadsheet component was updated to a newer version with fixes for number parsing and row resizing. This helps users in locales that use dots as thousand separators avoid incorrect values, and improves spreadsheet behavior when automatically resizing rows.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/0bffee921 [REL] 17.2.34 Task: 0 https://github.com/odoo/o-spreadsheet/commit/0cb28d1e8 [FIX] locale: wrong parsing with "." thousand separator Task: 4525746 https://github.com/odoo/o-spreadsheet/commit/230ca8ae2 [FIX] ui_sheet: batch resize commands in `AUTORESIZE_ROWS` Task: 4504918 Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Miscellaneous changes
The $0 placeholder in templates is highly useful, but it is not considered when saving a view. For instance, the search icon in the shop search bar has an incorrect xpath: `/data/xpath[3]/form/t[1]/div[1]/button[1]/i[1]`, where the inner `t[1]` actually points to another view through a `<t>$0</t>` containing the inherited view. The method responsible for handling this replacement fails when the element is editable, causing a crash. This commit ensures that when an xpath jumps to another t
Original PR description
The $0 placeholder in templates is highly useful, but it is not considered when saving a view. For instance, the search icon in the shop search bar has an incorrect xpath: `/data/xpath[3]/form/t[1]/div[1]/button[1]/i[1]`, where the inner `t[1]` actually points to another view through a `<t>$0</t>` containing the inherited view. The method responsible for handling this replacement fails when the element is editable, causing a crash. This commit ensures that when an xpath jumps to another template, it disallows the branding. task-3609835 Forward-Port-Of: odoo/odoo#187760
Email clients have begun implementing security measures to protect users from phishing by analyzing email links, and interacting with them (see task-3972953). This has the side effect of automatically unsubscribing email recipients from mailing lists by clicking the link in the footer of the emails. This commit adds an intermediate step to the process, by requiring users to click on a button before they are unsubscribed. task-4364446 Forward-Port-Of: odoo/odoo#195643 Forward-Port-Of: o
Original PR description
Email clients have begun implementing security measures to protect users from phishing by analyzing email links, and interacting with them (see task-3972953). This has the side effect of automatically unsubscribing email recipients from mailing lists by clicking the link in the footer of the emails. This commit adds an intermediate step to the process, by requiring users to click on a button before they are unsubscribed. task-4364446 Forward-Port-Of: odoo/odoo#195643 Forward-Port-Of: odoo/odoo#189561
Steps to Reproduce: - Go to the website editor. - Add a form to the page. - Select the form and change the default action from "Send an email" to "Create an opportunity." - Select the "Subject" field. - Set the visibility condition of the "Subject" field to "visible only if the phone number is set." - Since this is a mandatory field, define a default value for the "Subject" field. - Save the changes. - Fill out the form but leave the phone number field empty so that the "Subject" field
Original PR description
Steps to Reproduce: - Go to the website editor. - Add a form to the page. - Select the form and change the default action from "Send an email" to "Create an opportunity." - Select the "Subject" field. - Set the visibility condition of the "Subject" field to "visible only if the phone number is set." - Since this is a mandatory field, define a default value for the "Subject" field. - Save the changes. - Fill out the form but leave the phone number field empty so that the "Subject" field does not appear. - Attempt to submit the form. - Bug: the form is not sent and there is an error message. The error occurs preventing the record from being created because all required fields are not present, we should use the default value as it has been provided. This commit prevents adding the "disabled" attribute to inputs that are required for models. opw-4447039 Forward-Port-Of: odoo/odoo#195331 Forward-Port-Of: odoo/odoo#194902
Before this commit, with a slow internet connection, if a user added an item to the order and pressed the pay button very quickly (before completing the price loading), it would bypass the payment step and directly give the receipt. opw-4305214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186960
Original PR description
Before this commit, with a slow internet connection, if a user added an item to the order and pressed the pay button very quickly (before completing the price loading), it would bypass the payment step and directly give the receipt. opw-4305214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186960
Steps to reproduce: - In V17.0 drag and drop an "Image Gallery" block into the page. - Upgrade to 18.0 - Click on the last "Image Gallery" indicator and then quickly on the first one. - Traceback: "TypeError: Cannot read properties of null (reading 'classList') at Carousel._setActiveIndicatorElement ..." This issue is caused by the front-end code of the image gallery, which updates the active indicator during a slide event. When the crash happens, it cannot find the active slide in the
Original PR description
Steps to reproduce: - In V17.0 drag and drop an "Image Gallery" block into the page. - Upgrade to 18.0 - Click on the last "Image Gallery" indicator and then quickly on the first one. - Traceback: "TypeError: Cannot read properties of null (reading 'classList') at Carousel._setActiveIndicatorElement ..." This issue is caused by the front-end code of the image gallery, which updates the active indicator during a slide event. When the crash happens, it cannot find the active slide in the DOM. After investigation, everything already works with Bootstrap, and the purpose of this code remains unclear. However, in the stable version, we are not taking any risks and will not modify it. In this commit, we simply added a return; in case the active slide is not found. opw-4519455 Forward-Port-Of: odoo/odoo#195606
Steps: - Install `purchase` or any other model with analytic_mixin - Install `analytic` - Install `web_studio` - Enable analytic in configuration - Add a new approval on 'button_confirm' in `purchase.order` - Set a domain with analytic_distribution e.g - - e.g. ("order_line.analytic_distribution", "=", "Administrative") - Click on Refresh button - The refresh button preview shows x records - Create a new purchase.order - Add analytic on op
Original PR description
Steps: - Install `purchase` or any other model with analytic_mixin - Install `analytic` - Install `web_studio` - Enable analytic in configuration - Add a new approval on 'button_confirm' in…
Steps:
- Install `purchase` or any other model with analytic_mixin
- Install `analytic`
- Install `web_studio`
- Enable analytic in configuration
- Add a new approval on 'button_confirm' in `purchase.order`
- Set a domain with analytic_distribution e.g
- - e.g. ("order_line.analytic_distribution", "=", "Administrative")
- Click on Refresh button
- The refresh button preview shows x records
- Create a new purchase.order
- Add analytic on optional column
- Add a new product with analytic_distribution Administrative
- Try to use `button_confirm`
- Approval is not working while the refresh shows record is available
The json fields, in particular the `analytic_distribution` fields, are not designed to be searched via a `filtered_domain` (which is what studio approval uses to check whether or not a button can be used by the current user), this is currently a technical limitation.
To avoid any future problems, this commit prevents users from using a json field to search on them, since this is not supported.
opw-4416646
Forward-Port-Of: odoo/odoo#195765Those tests are sometimes failing since [1]. This commit is essentially a partial backport of [2], from the hoot suite to the qunit one. The other suites changed in [2] were already fixed in this version. [1] odoo/odoo#189147 [2] odoo/odoo#190157 runbot issue-109694 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
Original PR description
Those tests are sometimes failing since [1]. This commit is essentially a partial backport of [2], from the hoot suite to the qunit one. The other suites changed in [2] were already fixed in this version. [1] odoo/odoo#189147 [2] odoo/odoo#190157 runbot issue-109694 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#195197
Upon zooming in on the elearning slides view from the mobile by finger pinch, the whole page zooms in and not just the content, which causes the content quality to be still blurry. To Reproduce on Runbot: 1.Go to eLearning module. 2.Go to "Edit" on any of the courses. 3.Add a pdf content. 4.From the phone, go to the website elearning for the same course. 4.Click on the pdf content we uploaded. 5.Try finger pinch zooming in, the document gets still blurry. 6.The issue seems to be that
Original PR description
Upon zooming in on the elearning slides view from the mobile by finger pinch, the whole page zooms in and not just the content, which causes the content quality to be still blurry. To Reproduce on Runbot: 1.Go to eLearning module. 2.Go to "Edit" on any of the courses. 3.Add a pdf content. 4.From the phone, go to the website elearning for the same course. 4.Click on the pdf content we uploaded. 5.Try finger pinch zooming in, the document gets still blurry. 6.The issue seems to be that there's no finger pinch zoom in and out, and when you try doing that the whole page zooms in and out, not changing the quality of the document. So, the solution was to make zoom in and out icon available on small screen devices as well. opw-3893275 Forward-Port-Of: odoo/odoo#178655
**Steps to Reproduce:** - Navigate to /shop . - Open editor mode and select a product. - Use the reorder widget from the editor panel to change the product's position. - Notice the product jumps 2 positions instead of 1 when reordered. **Issue:** - Two products, 'Warranty' and 'Chair Floor Protection', have the same website_sequence. This causes the reorder logic to malfunction, making products jump 2 positions when one is placed in front or behind these two. **Fix:** - Updated the w
Original PR description
**Steps to Reproduce:** - Navigate to /shop . - Open editor mode and select a product. - Use the reorder widget from the editor panel to change the product's position. - Notice the product jumps 2 positions instead of 1 when reordered. **Issue:** - Two products, 'Warranty' and 'Chair Floor Protection', have the same website_sequence. This causes the reorder logic to malfunction, making products jump 2 positions when one is placed in front or behind these two. **Fix:** - Updated the website_sequence of conflicting products to ensure all products have unique values. **Affected Versions:** 16.0~master opw-4150099 Forward-Port-Of: odoo/odoo#191297
[FIX] survey: fix final leaderboard layout - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the question correctly - On the survey manager, go to the end of the survey (Final leaderboard) The stats only occupies a small portion of the width and the button are very cl
Original PR description
[FIX] survey: fix final leaderboard layout - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple…
[FIX] survey: fix final leaderboard layout - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the question correctly - On the survey manager, go to the end of the survey (Final leaderboard) The stats only occupies a small portion of the width and the button are very close to the title. We solve the problem by enlarging the stats like the previous result screens to get a layout similar as in v16.0. [FIX] documents: fix close buttons - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the question correctly - On the survey manager, go to the end of the survey (Final leaderboard) - Click on the "Close" button Nothing happens while it should close the session and get back to the survey form. Actually, the code was closing the session but failed to get back to the survey as it was using "window.history.back()" and the button "create session" launches the session in a new tab that has no history as all the survey happens on the same URL. We solve the problem by reloading the page instead. As the session is closed, the page then displays "Thank you". We change slightly the tour as it expects that at the end, the close button leads to the survey back-end form (as it checks the presence of the button "Create Session" which is the action "action_start_session"). But as the session is started in a new tab, we have decided that it is better to display the final "Thank you" screen rather than returning to the back-end survey form as this is meant to be displayed in public. [FIX] documents: fix infinite line when max score is 0 How to reproduce: - Create a live survey - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the wrong answer to the question At the end of the survey, the score bar size is very big (multiple time of the screen width). We solve the problem by avoiding dividing by 0. Task-4381603 Forward-Port-Of: odoo/odoo#190442
Steps to reproduce: - Edit a page - open "Optimize SEO" dialog - Add a tag with a parenthesis. eg. "Webinar Tools (OBS, YouTube)" - Save - Reload the page - Reopen the "Optimize SEO" dialog - ... crash Since [1], the application crashes because keywords are dynamically used in a regular expression, and special characters (e.g., parentheses) are not properly escaped. We address the keywords issues by escaping control characters before using them in the regular expression to prevent
Original PR description
Steps to reproduce: - Edit a page - open "Optimize SEO" dialog - Add a tag with a parenthesis. eg. "Webinar Tools (OBS, YouTube)" - Save - Reload the page - Reopen the "Optimize SEO" dialog - ... crash Since [1], the application crashes because keywords are dynamically used in a regular expression, and special characters (e.g., parentheses) are not properly escaped. We address the keywords issues by escaping control characters before using them in the regular expression to prevent crashes. [1]: https://github.com/odoo/odoo/commit/ac55f2bb113ecf7c774fe6e96d28e716184a97d1#diff-b51336c1ad97255bfb3646f013327eca1904ca194078f4ce671e517096233c58 task-4420262 Forward-Port-Of: odoo/odoo#195737 Forward-Port-Of: odoo/odoo#194976
Since [1] and later [2], the activation logic when removing a snippet relied on the `o_snippet_invisible` class to determine whether to activate the previous or next sibling. However, additional classes like `o_snippet_desktop_invisible` and `o_snippet_mobile_invisible` were introduced, making it insufficient to rely solely on `o_snippet_invisible``. This commit ensures that the correct snippet is activated upon removal. Steps to reproduce: - Navigate to Web editor - Drop text snippet
Original PR description
Since [1] and later [2], the activation logic when removing a snippet relied on the `o_snippet_invisible` class to determine whether to activate the previous or next sibling. However, additional classes like `o_snippet_desktop_invisible` and `o_snippet_mobile_invisible` were introduced, making it insufficient to rely solely on `o_snippet_invisible``. This commit ensures that the correct snippet is activated upon removal. Steps to reproduce: - Navigate to Web editor - Drop text snippet 1 - Drop text snippet 2 and hide it for desktop - Drop text snippet 3 - Remove text snippet 3 - Bug => text snippet 1 is not activated as expected [1]: https://github.com/odoo/odoo/commit/2cdd95f140b6ec5f3b95ee19bde2f281de21f337 [2]: https://github.com/odoo/odoo/commit/2de0ad7259993f654ca8d826f5430f78090a28c5 task-4531506 Forward-Port-Of: odoo/odoo#195855 Forward-Port-Of: odoo/odoo#195743
This issue is not directly an Odoo issue, but it can create an issue if a custom module adds a field called journal_id to the account.payment model. There are no knock-on effects of this, because anyway the original developer should have specified the table. Additionally, it seems that there was a mild typo in the line before it that didn't affect anything. I see no harm in fixing it. Description of the issue/feature this PR addresses: Current behavior before PR: No change in behavior.
Original PR description
This issue is not directly an Odoo issue, but it can create an issue if a custom module adds a field called journal_id to the account.payment model. There are no knock-on effects of this, because anyway the original developer should have specified the table. Additionally, it seems that there was a mild typo in the line before it that didn't affect anything. I see no harm in fixing it. Description of the issue/feature this PR addresses: Current behavior before PR: No change in behavior. Desired behavior after PR is merged: No change in behavior. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195494
This commit fixes the width of not available items inside the search results list and the search result dropdown. We achieve the fix by using the same approach used in this commit: https://github.com/odoo/odoo/commit/9ffbc8720b84f51d5d03a7e11c74c19b62cf46c0 opw-4444222 task-4517564 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195316
Original PR description
This commit fixes the width of not available items inside the search results list and the search result dropdown. We achieve the fix by using the same approach used in this commit: https://github.com/odoo/odoo/commit/9ffbc8720b84f51d5d03a7e11c74c19b62cf46c0 opw-4444222 task-4517564 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195316
There were problems reported on some invoices caused by rounding errors. This PR solves these problems, and adds more test cases to the precision unit tests. task-4464702 task-4509607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194813
Original PR description
There were problems reported on some invoices caused by rounding errors. This PR solves these problems, and adds more test cases to the precision unit tests. task-4464702 task-4509607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194813
Previously, opening the product info popup would fail if a product had multiple sellers with the same name but different prices and delays. opw-4472861 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195617
Original PR description
Previously, opening the product info popup would fail if a product had multiple sellers with the same name but different prices and delays. opw-4472861 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195617
28 changes
Enhancements to existing features
The Marketing Automation interface now shows the option to add related items as a kanban card instead of a separate button. This makes the action feel more consistent with the rest of the kanban layout while keeping it available only when adding items is allowed.
Original PR description
This commit, aims change the look of the `Add` button. From now, it's a kanban card at the end of the Kanban. The label is "Add" followed by the model name of the field. The `Add` card appears only when the field match these condition: * not readonly * the kanban has the attribute "create=true" (default value) * the kanban has the attribute "link=true" (default value) * the kanban has no "control" Note we have also adapt some tests and some views due to this change task-4361655
The webclient now starts without waiting for extra IoT session checks, reducing startup delays. This improves the initial loading experience for users while keeping IoT connection details available when needed.
Original PR description
This PR uses the lazy session info mechanism to avoid an additional rpc on webclient startup. Moreover, we ensure that we do not wait for the iot channel information to start the webclient. task-4341388
This update standardizes how Odoo detects when it is running in test mode. It helps several business areas avoid test-only behavior affecting normal operations and makes automated validation more reliable.
Original PR description
A flag on the configuration that indicates whether Odoo was started in a test mode. However, sometimes it is enough to check that we are in the test mode. task-4270485 odoo/odoo#186924
Accounting menu options that open a popup now show an ellipsis, making it clearer to users that another step or confirmation will follow. This improves usability and helps reduce surprises when working with lock dates or 1099 generation.
UrbanPiper login details and API keys are now stored per company instead of globally. This prevents credential conflicts when multiple companies in the same Odoo instance operate in different regions, making multi-company UrbanPiper setups easier and more reliable.
Original PR description
Before this commit: ================= - UrbanPiper provides region-specific credentials (e.g., US-UK, MENA, India). In Odoo, these credentials were stored in system parameters, which caused conflicts when multiple companies from different regions operate in the same Odoo instance. After this commit: ================= - The 'UrbanPiper Username' and 'UrbanPiper API Key' fields are now stored in the `res.company` model instead of system parameters. This ensures that each company can manage its own region-specific credentials independently, avoiding conflicts in multi-company environments. Task-4420432 Related: https://github.com/odoo/upgrade/pull/6969
The map view now updates record ordering using a newer server call that also refreshes the data in the same step. This reduces unnecessary back-and-forth with the server and should make reorder operations in maps more efficient without changing the user workflow.
Original PR description
This commit replaces the use of /web/dataset/resequence by the new web_resequence which does a resequence and a read in one RPC. task-3790638
Resolved issues and error corrections
The WhatsApp Calendar test setup now includes a default phone number for the admin contact. This prevents test failures when demo data is not installed, helping keep quality checks reliable across environments.
Original PR description
Problem: When test cases run without demo data, the admin's phone number is not set, causing `_find_value_from_field_path` to return `''` while creating a WhatsApp message record. This is compared with `False` in the test, leading to a failure. Solution: Set a default phone number for the admin partner in the test setup to ensure consistent behavior regardless of demo data availability.
Fixed an issue where entering an on-hand quantity for a lot-tracked product without specifying a lot or serial number would not update inventory. This helps users keep stock levels accurate when creating inventory lines from barcode-related flows.
Original PR description
### Steps to reproduce: - Create a storable product tracked by lot/serial - Click on "On Hand" - Create a new line with 10 "On Hand Quantity" WITHOUT lot/serial - Go back to the product: The "On…
### Steps to reproduce: - Create a storable product tracked by lot/serial - Click on "On Hand" - Create a new line with 10 "On Hand Quantity" WITHOUT lot/serial - Go back to the product: The "On Hand" quantity is still at 0. - Click back to the "On Hand": the quantity of the line is back to 0. ### Cause of the issue: When a new line is created and the "On Hand Quantity" is edited from the `view_stock_quant_tree` view, we actually performs a create of the stock.quant followed by a write on the `inventory_quantity_auto_apply`. At this point the 'quantity' field of the new quant is not set and the `action_apply_inventory` of the `inventory_quantity_auto_apply` is expected to create and validate a move line in order to update our quant quantities here: https://github.com/odoo/odoo/blob/e041e890b91e5bc515e1827683f073781788f253/addons/stock/models/stock_quant.py#L230-L235 However, this steps will never be performed as we return the call before the `_apply_invetory` because our quant is set without lots: https://github.com/odoo/odoo/blob/e041e890b91e5bc515e1827683f073781788f253/addons/stock/models/stock_quant.py#L447-L449 https://github.com/odoo/odoo/blob/e041e890b91e5bc515e1827683f073781788f253/addons/stock/models/stock_quant.py#L465-L477 ### Master Fix: We remove the wizzard. opw-4428050
This fixes the sales spreadsheet integration so it continues to work after recent spreadsheet platform changes. Business users should see field highlighting and synchronization behave as expected when working with sales-related spreadsheets.
Original PR description
See: - https://github.com/odoo/odoo/pull/195935 - https://github.com/odoo/o-spreadsheet/commit/7c179b457383fff716156acc216ca34999eaa85d
Code cleanup and technical improvements
Several India-specific reporting and finance add-ons have been merged into the main Indian reports module, while the separate documents module has been removed. This simplifies module management and should make Indian compliance features easier to maintain and access from one place.
Original PR description
- Removed the `l10n_in_documents` module. - Merged the following modules into `l10n_in_reports`: - `l10n_in_asset` - `l10n_in_enet_batch_payment` - `l10n_in_qr_code_bill_scan` - `l10n_in_reports_gstr` - `l10n_in_reports_tds_tcs` task: 3980324 **COM PR**: https://github.com/odoo/odoo/pull/190265 **UPGRADE PR**: https://github.com/odoo/upgrade/pull/6931
This update keeps several website sales features working correctly after changes in the core online shop system. It affects cart, pricing, tax, delivery, rental, appointment, subscription, and localization flows so customers continue to see accurate options during checkout.
Original PR description
The access to the cart, pricelist and fiscal position have been changed in the base `website_sale` module. This commits adapts existing code and tests to use the right tools and work as expected.
Miscellaneous changes
The aim of this commit is to avoid having inconsistent data leading to a Traceback while loading the lines of the Profit and Loss report. Context: cbe74884b937f630cf1d2ccf475a04e70b6f4669 changed the structure hierachy. It wasn't a big issue until e96e8d4aa663a4a5305214f2124243070fa797bb resequenced the lines and changed the order of computation in `<account.report>._get_line`. This method assumes the parent lines are going to be computed first and then cached in a dict. Leaving `parent_id`
Original PR description
The aim of this commit is to avoid having inconsistent data leading to a Traceback while loading the lines of the Profit and Loss report. Context: cbe74884b937f630cf1d2ccf475a04e70b6f4669 changed the structure hierachy. It wasn't a big issue until e96e8d4aa663a4a5305214f2124243070fa797bb resequenced the lines and changed the order of computation in `<account.report>._get_line`. This method assumes the parent lines are going to be computed first and then cached in a dict. Leaving `parent_id` made this assumption wrong leading to a KeyError exception throwing a traceback. Before the commit: The data kept the previous `parent_id` which could lead to a traceback due to inconsistent data. After the commit: `parent_id` not being set, the code doesn't try to get it from the cached lines and computes it correctly. task-id: None Forward-Port-Of: odoo/enterprise#78219
### Steps to reproduce the issue: 1. Create an clean Analytic Account and use it in a Budget 2. Create a Purchase Order with Analytic Account in the Distribution and a Discount then Confirm 3. In the Budget report, the Committed Amount does not include the Discount ### Explanation: In the `purchase.order.line` side of the calculation of the committed amount of the budget report, we are using `unit_price` as base, because of it having a `not null` constraint, then adding a lot of other
Original PR description
### Steps to reproduce the issue: 1. Create an clean Analytic Account and use it in a Budget 2. Create a Purchase Order with Analytic Account in the Distribution and a Discount then Confirm 3. In the Budget report, the Committed Amount does not include the Discount ### Explanation: In the `purchase.order.line` side of the calculation of the committed amount of the budget report, we are using `unit_price` as base, because of it having a `not null` constraint, then adding a lot of other variables to extract the correct amount: `currency_rate`, `analytic_distribution`, `product_qty` and `qty_invoiced`. This does not include `discount` nor price-included `taxes_id`. ### Fix reasoning: To avoid an issue regarding down payment lines, which have no `price_subtotal`, we will prioritize the field with a fallback on `price_unit`. opw-4391098 Forward-Port-Of: odoo/enterprise#75902
Envia is a delivery aggregator for North and South America that supports a large subset of carriers in the area. It integrates with the main carriers used in: Argentina, Australia, Brazil, Canada, Chile, Colombia, Spain, Guatemala, India, Mexico, Peru, United States, and Uruguay task-4056309 odoo PR: https://github.com/odoo/odoo/pull/174098 Forward-Port-Of: odoo/enterprise#78214 Forward-Port-Of: odoo/enterprise#67131
Original PR description
Envia is a delivery aggregator for North and South America that supports a large subset of carriers in the area. It integrates with the main carriers used in: Argentina, Australia, Brazil, Canada, Chile, Colombia, Spain, Guatemala, India, Mexico, Peru, United States, and Uruguay task-4056309 odoo PR: https://github.com/odoo/odoo/pull/174098 Forward-Port-Of: odoo/enterprise#78214 Forward-Port-Of: odoo/enterprise#67131
In this pr: https://github.com/odoo/enterprise/pull/70591 we added a way to add credit card account but forgot to change some domains in the online synchronisation menu. no-task-id Forward-Port-Of: odoo/enterprise#77672
Original PR description
In this pr: https://github.com/odoo/enterprise/pull/70591 we added a way to add credit card account but forgot to change some domains in the online synchronisation menu. no-task-id Forward-Port-Of: odoo/enterprise#77672
When trying to print invoice before reveiving etims details by the gouvernment, we get an error because we're trying to access some attributes of those fields, such as `strftime` or `len()` With this commit, we replace non set fields by empty strings either for display purpose or methods calls. opw-4480304 Forward-Port-Of: odoo/enterprise#78176
Original PR description
When trying to print invoice before reveiving etims details by the gouvernment, we get an error because we're trying to access some attributes of those fields, such as `strftime` or `len()` With this commit, we replace non set fields by empty strings either for display purpose or methods calls. opw-4480304 Forward-Port-Of: odoo/enterprise#78176
**Specifications:** - remove modal when user click on open desk and directly open kiosk view. - add an install button in menu-item in kanban card **After this PR:** Modal will be removed while opening kiosk mode in frontdesk Task-4161336 Forward-Port-Of: odoo/enterprise#71018
Original PR description
**Specifications:** - remove modal when user click on open desk and directly open kiosk view. - add an install button in menu-item in kanban card **After this PR:** Modal will be removed while opening kiosk mode in frontdesk Task-4161336 Forward-Port-Of: odoo/enterprise#71018
The issue was that payment lines with `is_change` were also being considered in the computation. Exemple: Product: 14.50 Payment: 20.00 Change: 5.50 Forward-Port-Of: odoo/enterprise#76476
Original PR description
The issue was that payment lines with `is_change` were also being considered in the computation.
Exemple:
Product: 14.50
Payment: 20.00
Change: 5.50
Forward-Port-Of: odoo/enterprise#76476Before this commit, opening the calendar event Gantt view called the `calendar.event` model, but the `appointment.type` ID was passed. This mismatch could lead to an error when attempting to load the view. opw-4493685 Forward-Port-Of: odoo/enterprise#77694 Forward-Port-Of: odoo/enterprise#77447
Original PR description
Before this commit, opening the calendar event Gantt view called the `calendar.event` model, but the `appointment.type` ID was passed. This mismatch could lead to an error when attempting to load the view. opw-4493685 Forward-Port-Of: odoo/enterprise#77694 Forward-Port-Of: odoo/enterprise#77447
Version: - 17.0 Steps to reproduce: - Install the Sign module. - Try to open a sample document. Issue: - An access error occurs when a "Sign User" tries to access a demo sign template. Solution: - Allow internal users to access sample data. task- 4390945 Forward-Port-Of: odoo/enterprise#77933 Forward-Port-Of: odoo/enterprise#75522
Original PR description
Version: - 17.0 Steps to reproduce: - Install the Sign module. - Try to open a sample document. Issue: - An access error occurs when a "Sign User" tries to access a demo sign template. Solution: - Allow internal users to access sample data. task- 4390945 Forward-Port-Of: odoo/enterprise#77933 Forward-Port-Of: odoo/enterprise#75522
When the user tries to forward a Google Maps location in a message, a traceback will appear. Steps to reproduce the error: - Go to WhatsApp > Templates > Create a new template A > Header Type: Location - Set a Body message > In Variables, Set the sample values for all the variables - Create a new Contact with a Mobile number > Send a Whatsapp message with template A - User will receive a message with a link of location > Forward that message back to that number Traceback: ``` File "
Original PR description
When the user tries to forward a Google Maps location in a message, a traceback will appear. Steps to reproduce the error: - Go to WhatsApp > Templates > Create a new template A > Header Type:…
When the user tries to forward a Google Maps location in a message,
a traceback will appear.
Steps to reproduce the error:
- Go to WhatsApp > Templates > Create a new template A > Header Type: Location
- Set a Body message > In Variables, Set the sample values for all the variables
- Create a new Contact with a Mobile number > Send a Whatsapp message with template A
- User will receive a message with a link of location > Forward that message back to that number
Traceback:
```
File "/home/odoo/odoo/enterprise/whatsapp/controller/main.py", line 42, in webhookpost
wa_account_id._process_messages(value)
File "/home/odoo/odoo/enterprise/whatsapp/models/whatsapp_account.py", line 225, in _process_messages
body += Markup("<br/>{location_address}").format(location_name=messages['location']['address'])
File "/home/odoo/.local/lib/python3.10/site-packages/markupsafe/__init__.py", line 213, in format
return self.__class__(formatter.vformat(self, args, kwargs))
File "/usr/lib/python3.10/string.py", line 165, in vformat
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
File "/usr/lib/python3.10/string.py", line 205, in _vformat
obj, arg_used = self.get_field(field_name, args, kwargs)
File "/usr/lib/python3.10/string.py", line 270, in get_field
obj = self.get_value(first, args, kwargs)
File "/usr/lib/python3.10/string.py", line 227, in get_value
return kwargs[key]
File "/home/odoo/.local/lib/python3.10/site-packages/markupsafe/__init__.py", line 249, in __getitem__
return self._kwargs[key]
KeyError: 'location_address'
```
https://github.com/odoo/enterprise/blob/2b4acb4c82a7374d45f25a7d8eebdc53b7f6e140/whatsapp/models/whatsapp_account.py#L225
Here, ``location_name`` is used instead of ``location_address``,
So, It will lead to the above traceback.
sentry-6206183097
Forward-Port-Of: odoo/enterprise#76883Migrated method to get the SAT status for EDI documents to zeep library. This because the old way have some errors when the VAT have some `Ñ`. The old way returns: Params: `<![CDATA[?id=E5E54D9B-8A18-4FD4-ACE4-135B6B7E7960&re=NSE111011M99&rr=LEÑ131002PN2&tt=552.99]]>` Response: ```<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:DeserializationFaile
Original PR description
Migrated method to get the SAT status for EDI documents to zeep library. This because the old way have some errors when the VAT have some `Ñ`. The old way returns: Params:…
Migrated method to get the SAT status for EDI documents to zeep library. This because the old way have some errors when the VAT have some `Ñ`. The old way returns: Params: `<![CDATA[?id=E5E54D9B-8A18-4FD4-ACE4-135B6B7E7960&re=NSE111011M99&rr=LEÑ131002PN2&tt=552.99]]>` Response: ```<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:DeserializationFailed</faultcode><faultstring xml:lang="en-US">The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:expresionImpresa. The InnerException message was \'There was an error deserializing the object of type System.String. \'�131002PN2&tt=552.99\' contains invalid UTF8 bytes.\'. Please see InnerException for more details.</faultstring><detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>Unable to translate bytes [D1] at index 0 from specified code page to Unicode.</Message><StackTrace> at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)
\n at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)
\n at System.Text.DecoderFallbackBuffer.InternalFallback(Byte[] bytes, Byte* pBytes, Char*& chars)
\n at System.Text.UTF8Encoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder)
\n at System.Text.UTF8Encoding.GetChars(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex)
\n at System.Xml.XmlConverter.ToChars(Byte[] buffer, Int32 offset, Int32 count, Char[] chars, Int32 charOffset)</StackTrace><Type>System.Text.DecoderFallbackException</Type></InnerException><Message>\'�131002PN2&tt=552.99\' contains invalid UTF8 bytes.</Message><StackTrace> at System.Xml.XmlConverter.ToChars(Byte[] buffer, Int32 offset, Int32 count, Char[] chars, Int32 charOffset)
\n at System.Xml.XmlBufferReader.GetChars(Int32 offset, Int32 length, Char[] chars)
\n at System.Xml.XmlBufferReader.GetString(Int32 offset, Int32 length)
\n at System.Xml.ValueHandle.GetString()
\n at System.Xml.XmlBaseReader.get_Value()
\n at System.Xml.XmlDictionaryReader.ReadContentAsString(Int32 maxStringContentLength)
\n at System.Xml.XmlBaseReader.ReadElementContentAsString()
\n at System.Runtime.Serialization.StringDataContract.ReadXmlValue(XmlReaderDelegator reader, XmlObjectSerializerReadContext context)
\n at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)</StackTrace><Type>System.Xml.XmlException</Type></InnerException><Message>There was an error deserializing the object of type System.String. \'�131002PN2&tt=552.99\' contains invalid UTF8 bytes.</Message><StackTrace> at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
\n at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)
\n at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.PartInfo.ReadObject(XmlDictionaryReader reader, XmlObjectSerializer serializer)
\n at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)</StackTrace><Type>System.Runtime.Serialization.SerializationException</Type></InnerException><Message>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:expresionImpresa. The InnerException message was \'There was an error deserializing the object of type System.String. \'�131002PN2&tt=552.99\' contains invalid UTF8 bytes.\'. Please see InnerException for more details.</Message><StackTrace> at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)
\n at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader reader, PartInfo[] parts, Object[] parameters, Boolean isRequest)
\n at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
\n at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
\n at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters)
\n at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc)
\n at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
\n at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
\n at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><Type>System.ServiceModel.Dispatcher.NetDispatcherFaultException</Type></ExceptionDetail></detail></s:Fault></s:Body></s:Envelope>' ``` Forward-Port-Of: odoo/enterprise#78031 Forward-Port-Of: odoo/enterprise#77616
At the moment, when grouping by a selection field, the in-database name of the selection option is shown rather than the human-readable name. This is fixed by the present commit. task-none Forward-Port-Of: odoo/enterprise#78153 Forward-Port-Of: odoo/enterprise#78128
Original PR description
At the moment, when grouping by a selection field, the in-database name of the selection option is shown rather than the human-readable name. This is fixed by the present commit. task-none Forward-Port-Of: odoo/enterprise#78153 Forward-Port-Of: odoo/enterprise#78128
This commit adapts a test to cope with changes made in https://github.com/odoo/odoo/pull/195630. task-4523387 Forward-Port-Of: odoo/enterprise#78162
Original PR description
This commit adapts a test to cope with changes made in https://github.com/odoo/odoo/pull/195630. task-4523387 Forward-Port-Of: odoo/enterprise#78162
Due to an oversight when migrating documents share to documents in Sharepocalypse, documents were being deleted when their related website was deleted. This is not a desired behavior. Even though setting the "correct" website is possible (and desired) when there is a `company_id`, there is no problem with having empty `website_id` in the other case. opw-4494091 Forward-Port-Of: odoo/enterprise#78163
Original PR description
Due to an oversight when migrating documents share to documents in Sharepocalypse, documents were being deleted when their related website was deleted. This is not a desired behavior. Even though setting the "correct" website is possible (and desired) when there is a `company_id`, there is no problem with having empty `website_id` in the other case. opw-4494091 Forward-Port-Of: odoo/enterprise#78163
**Issue** When sending a subscription payment reminder, customers were incorrectly notified to pay the full amount (amount_total) instead of the amount corresponding to subscription orders (recurring_total) only. This issue also occurs in cases of payment failure. opw-4224746 Forward-Port-Of: odoo/enterprise#75319
Original PR description
**Issue** When sending a subscription payment reminder, customers were incorrectly notified to pay the full amount (amount_total) instead of the amount corresponding to subscription orders (recurring_total) only. This issue also occurs in cases of payment failure. opw-4224746 Forward-Port-Of: odoo/enterprise#75319
- make kiosk mode open in the same page and logout the user to avoid unwanted rights Task: 4509632 Forward-Port-Of: odoo/enterprise#77852
Original PR description
- make kiosk mode open in the same page and logout the user to avoid unwanted rights Task: 4509632 Forward-Port-Of: odoo/enterprise#77852
Currently, simple pos users can see the due amount of the customers, unless the customer wasn't loaded and we need to search for a customer that isn't loaded. Steps to reproduce: ------------------- * Create a new customer, make a sale order and invoice it. This will set an amount due for that customer * Connect to the shop with a user that has the `point_of_sale.group_pos_user` but not the `account.group_account_readonly` group * Open customer list > Observation: You can see the amount
Original PR description
Currently, simple pos users can see the due amount of the customers, unless the customer wasn't loaded and we need to search for a customer that isn't loaded. Steps to reproduce: -------------------…
Currently, simple pos users can see the due amount of the customers, unless the customer wasn't loaded and we need to search for a customer that isn't loaded. Steps to reproduce: ------------------- * Create a new customer, make a sale order and invoice it. This will set an amount due for that customer * Connect to the shop with a user that has the `point_of_sale.group_pos_user` but not the `account.group_account_readonly` group * Open customer list > Observation: You can see the amount due for multiple customers * Search for the customer created * Select search more > You can't see the amount due for that customer Why the fix: ------------ Since simple pos users are allowed to see the amount due for the loaded customer, there is no reason they shouldn't see it as well for a customer they need to load. Commit allowing simple pos users to see (and settle) customer accounts: https://github.com/odoo/enterprise/commit/37fa4d5f4ed7c7d77f73395a53b7b3ab7006afc4 When loading the pos session `_loader_params_res_partner` is called first and later is called `_get_pos_ui_res_partner`. It is in the function `_get_pos_ui_res_partner` that the amount due is compted if the user does not belong to the group `account.group_account_readonly`. https://github.com/odoo/enterprise/blob/a35a4755cdf86bcfeda0aca6c06397748ba27362/pos_settle_due/models/pos_session.py#L22-L28 However when we load a customer that wasn't previously loaded, only `_loader_params_res_partner` is loaded. And since the users does not belong to the group `account.group_account_readonly`, the field witll not get loaded. We now compute the amount due with the same logic as in `_get_pos_ui_res_partner`. opw-4141955 Forward-Port-Of: odoo/enterprise#77660 Forward-Port-Of: odoo/enterprise#73671