Daily updates from Odoo
Friday, December 6, 2024
20 changes · 18.0
Resolved issues and error corrections
This fixes an issue in Point of Sale where opening a shared restaurant table from another session could fail because the system looked for currency details in an order that was not fully loaded. The checkout flow now uses the current Point of Sale configuration currency, helping staff access shared tables reliably.
Original PR description
Before this commit, when opening a shared table from another session, it tried to get the currency from the other order while the session and config record were not loaded, causing an error. opw-4381857 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where the cursor could appear in the wrong place after inserting a line break near linked text in Chrome. Users editing website or document content should now see the cursor remain where expected, reducing confusion while typing.
Original PR description
Steps:
- place the cursor at the end of a paragraph containing a link among other text, e.g.:
`<p>abc <a href="#">some link</a> def[]</p>`
- press shift + enter
- the cursor is displayed in an odd position, e.g.: `<p>abc <a href="#">some link</a>[] def<br><br></p>`
There seems to be a bug in Chrome that renders the selection in a different position than the one returned by document.getSelection() in some cases. Setting the selection (even if it's the same as the current one) seems to solve the issue.
In the example above involving a link, after updating ZWNBSP (zero-width non-breaking space) nodes around the link, preserveSelection's restore is called but, when about to set the document selection, setBaseAndExtent is skipped because the selection is the same as the current one. This commit ensures that setBaseAndExtent is always called when restoring the selection.
task-4360915This fix updates the Kazakhstan localization so product categories use an expense account instead of a current asset account. This ensures related costs are reflected correctly in profit and loss reporting.
Original PR description
Before this commit the account that was set was a current assets but this prevents its impact on the P/L. task: 4369691 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents accounting reports from using an incorrect exchange rate when a company currency has no rate recorded outside the selected reporting period. The system now falls back to an available in-period rate, or a neutral rate when no rate exists, improving accuracy in multi-company financial reporting.
Original PR description
A rate calculation error occurs when a currency without an exchange rate outside the selected period is used. Steps to reproduce: 1. Create two companies with different currencies. 2. Create a…
A rate calculation error occurs when a currency without an exchange rate outside the selected period is used. Steps to reproduce: 1. Create two companies with different currencies. 2. Create a journal entry in company 1. 3. Select both companies and select the second company. 4. Go to the Trial Balance report in the accounting module. 5. Check and remove all entries in `res.currency.rate` that fall outside the selected report period. For example, if 2024 is displayed, delete all other years entries. 6. The exchange rate will be incorrect. The issue stems from the SQL query in the `_get_table_builder_average` function. The query assumes the `out_period_rate` always exists, but it doesn't in some cases. The fix is to use the `in_period_rate` when the `out_period_rate` is missing, and if both are unavailable, default to 1. A temporary workaround is to add an exchange rate for each currency outside the period (similar to the Runbot, which has entries from 2010 and avoids the issue). opw-4321063.
This fix prevents sales users from seeing an access error when adding products to a sales order for customers with credit limits enabled. It keeps the credit limit check working while allowing sales teams without invoicing permissions to create orders as expected.
Original PR description
**Steps to reproduce:** - Install Sales - Go to Invoicing settings - Enable "Sales Credit limit" - Create a user with Sales rights and no Invoicing rights - Connect with the created user - Create a SO **Issue:** When a customer is set, an access error on "credit_limit" field is raised when adding a product. **Cause:** "credit_limit" is a company-dependent field. Since the refactoring of the company-dependent fields, the value is not retrieved with "sudo()" anymore. opw-4280420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an accounting currency calculation that could incorrectly treat early days in a reporting period as having a zero exchange rate when no rate record existed yet. This ensures average currency rates use the proper default value, improving accuracy in financial reports and currency-related computations.
Original PR description
If a period containing some res.currency.rate object starts by some sub-period without any range, the average rate computation considered this sub-period as having a rate of 0. It's wrong; it should be 1.
This change relaxes restrictions that were preventing users from creating, updating, or deleting analytic items linked to journal entries. It restores the ability to mass edit these analytic items while a better synchronization approach is being developed.
Original PR description
The constrains introduced in 7bc8c8be44396a8a54466fe7fa48afad4a52c201 are too restrictive for users and avoid them to mass edit there analytic items. Another solution for keeping the analytic items and their analytic distribution synchronized is in progress. task-3977961
This fix aligns the accounting tax calculation logic used in the browser with the logic used on the server. It helps ensure users see consistent tax amounts throughout Odoo, reducing discrepancies in invoices or accounting screens.
Original PR description
Adapt the js-side of taxes computations according: https://github.com/odoo/odoo/commit/e43044582cce69ec3abc9838aa9afba06e073a80 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a point of sale issue where orders shared between different POS configurations could fail because the original configuration was not available in the current session. Currency information is now accessed in a way that works across shared orders, improving reliability for stores using multiple POS setups.
Original PR description
Config should not be accessed directly from the order since it can came from another config that isn't loaded in all session. For example with shared order between config, when an order is created on config A and loaded on config B, the config A link will not be available on config B. runbot err: 109327
A code update script was corrected so it no longer changes web addresses that contain the word “tree.” This prevents valid links from being accidentally rewritten during upgrade-related code changes.
Original PR description
[FIX] cli/*: fix script converting tree to list (don't change urls) issue: https://example.com/base/server/tree/master => https://example.com/base/server/list/master
This fixes an issue that prevented Point of Sale sessions from opening when they used a currency different from the company currency. Businesses can now operate PoS setups in alternate currencies without running into a loading error.
Original PR description
Before this commit, it wasn't possible to open a PoS in a different currency than the company currency. opw-4378523 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Mobile users can now start typing immediately after tapping the search button, without needing an extra tap inside the search field. This removes a small but noticeable friction point when searching records on smaller devices, while keeping the existing behavior on larger touch screens.
Original PR description
This commit fixes the desired behavior when touching the SearchBarToggler. Before the fix, the input was not focused, and the user had to touch the search input once after having touched the toggler, which makes one step redundant. Now, the input is automatically focused when the search bar is mounted on small devices (the only one having the toggler), to keep the current behavior that don't focus the input on touch devices when using the medium/large UI. task-4269494
Accounting screens now show account codes and company names more consistently when users work across multiple companies. The change also prevents users from selecting accounts that do not belong to the current invoice, bill, or journal entry company, reducing data entry mistakes in financial documents.
Original PR description
- Fixed the `_field_to_sql` method so that `placeholder_code` doesn't show the company name if the account belongs to the active company; - Fixed `_field_to_sql` to add a space in `placeholder_code`;…
- Fixed the `_field_to_sql` method so that `placeholder_code` doesn't show the company name if the account belongs to the active company; - Fixed `_field_to_sql` to add a space in `placeholder_code`; - Allow searching on `placeholder_code` with the `=` operator - this allows the `account_id.placeholder_code` field to be used as a grouping key on reports. - Changed the account's display_name so that if it belongs to other companies than the active one, the company names are displayed (in parentheses). - Changed the `placeholder_code` so that it shows the code for one of the active companies (if the account is visible, then it must have a code in at least one of the active companies) rather than for one of the companies accessible to the user. - Fix the `_field_to_sql` for `placeholder_code` so that we do a LEFT JOIN on the first company of the account that is in the environment. This avoids excluding accounts simply because none of the account's `company_ids` is present among the active companies (e.g. a search might be done with `sudo` in which case the active companies shouldn't restrict the results returned). Enterprise PR: https://github.com/odoo/enterprise/pull/71813 task-4259552
Creating or linking a candidate to a recruitment application now preserves any tags already added to that application. This prevents recruiters from losing classification details during candidate setup and keeps application tracking more reliable.
Original PR description
Issue: When creating an Application, creating a new Candidate removes all tags already in use. Steps to reproduce: - Install Recruitment app - Create a new Application - Add a tag - Create a new Candidate Cause: The tags of an Application are stored in the 'categ_ids' variable. This variable is changed by the '_compute_categ_ids' method, which sets them to those of the Candidate. Since categ_ids is empty for new Candidates, as of right now, this method is effectively removing all tags for new Candidates. Desired Behaviour: Adding a Candidate should add it's tags to the Applicant's. Removing a Candidate should not change the Applicant's tags. Ticket: opw-4351837 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that could prevent sales-related invoices from calculating tax totals correctly. The change uses the correct total value name, avoiding server errors and helping invoices process reliably.
Original PR description
**Description of the issue/feature this PR addresses:** The value `move.tax_totals` is defined in `/addons/account/models/account_move.py` by calling the function `_get_tax_totals_summary` from…
**Description of the issue/feature this PR addresses:** The value `move.tax_totals` is defined in `/addons/account/models/account_move.py` by calling the function `_get_tax_totals_summary` from `account_tax`: https://github.com/odoo/odoo/blob/5714ee114fb5c4b9d1342159b07efa27f16a7c8d/addons/account/models/account_move.py#L1551 The `_get_tax_totals_summary` generates a dict with the total amount stored as `total_amount` and not `amount_total` https://github.com/odoo/odoo/blob/5714ee114fb5c4b9d1342159b07efa27f16a7c8d/addons/account/models/account_tax.py#L1870 https://github.com/odoo/odoo/blob/5714ee114fb5c4b9d1342159b07efa27f16a7c8d/addons/account/models/account_tax.py#L2052-L2053 **Current behavior before PR:** Server throws a KeyError as `amount_total` doesn't exist in `move.tax_totals` **Desired behavior after PR is merged:** `move.tax_totals` is computed correctly Fixes https://github.com/odoo/odoo/issues/184408 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Adds a safeguard test to ensure financial reports calculate average currency rates correctly when a reporting period starts without a specific rate range. This helps prevent inaccurate report figures from returning in future updates.
Original PR description
If a period containing some res.currency.rate object starts by some sub-period without any range, the average rate computation considered this sub-period as having a rate of 0. It's wrong; it should be 1. The fix itself is in the corresponding community commit ; this one adds a check ensuring this doesn't break again in the future.
This change restores restrictions that prevent creating, editing, or deleting analytic items when they are tied to a journal item. It helps keep accounting and analytic reporting data consistent and reduces the risk of accidental changes to posted financial information.
Original PR description
Reverts 9ae263696efff17a872e848b03a7b08ba84cdca2 Community PR: odoo/odoo#189440 task-3977961
Users can now drag a read-only document into a folder they can edit without causing a failed move. The system creates a shortcut instead, making document organization smoother while preserving access restrictions.
Original PR description
This commit allows one to drag and drop a readonly document into another editable folder by creating a shortcut instead of moving it.
The search button now places the cursor directly in the search field on mobile screens for Gantt, Grid, and Map views. This removes an extra tap and makes searching faster and smoother for users working on smaller devices.
Original PR description
*: web_grid, web_map This commit contains the enterprise adaptations, using the new props 'toggler' for the SearchBar component. This will make the component automatically be focused on mobile devices. task-4269494
Knowledge's automated guidance now handles cases where the email composer adds a user signature at the end. This prevents the related Knowledge tour from failing, improving reliability for users and testers without changing day-to-day functionality.
Original PR description
The full mail composer now appends the user's signature at the end of the editor. Currently, parts of the Knowledge tour rely on the selector `.odoo-editor-editable > p:last-child` to select the last paragraph in the mail composer editable zone. Due to the addition of the signature, the last direct child of the editable zone is no longer a `p` element, causing the selector to fail and breaking the tour. To resolve this issue, we will replace the `:last-child` pseudo class with `:last-of-type`, ensuring it targets the last `p` element within the editable zone. This adjustment will allow the signature to be ignored, so it no longer interferes with the tour. see: https://github.com/odoo/odoo/pull/184695 task-4273520