-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge from upstream 16 20250204 01 #1072
Merged
royle-vietnam
merged 106 commits into
Viindoo:16.0
from
royle-vietnam:merge_from_upstream_16_20250204_01
Feb 6, 2025
Merged
Merge from upstream 16 20250204 01 #1072
royle-vietnam
merged 106 commits into
Viindoo:16.0
from
royle-vietnam:merge_from_upstream_16_20250204_01
Feb 6, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Problem**: In rare edge cases, the selection can have no ranges, causing a crash when attempting to `getRangeAt(0)`. **Solution**: Ensure there are ranges in the selection before accessing them. **Steps to Reproduce**: 1. Split the window, with Odoo on one side and any other application on the other. 2. Navigate to a sales order in Odoo. 3. From the sales order, navigate to the partner. 4. Maximize the window. 5. Return to the sales order. 6. Split the window again. 7. Scroll down. opw-4279813 closes odoo#194385 Signed-off-by: David Monjoie (dmo) <[email protected]>
The event listeners are never removed when the component is unmounted which means to global `env.bus` always keeps a reference to this component and everything that goes with it, including its (child)env. In version 18.0, the spreadsheet client action instantiates its own `BurgerMenu` component and also adds the spreadsheet `model` in the action child env (which can be expensive memory-wise) closes odoo#194485 Signed-off-by: Aaron Bohy (aab) <[email protected]>
Steps to reproduce: - Install "l10n_ch" and switch to a Swiss company - Create an invoice for a Swiss partner - Send it - The QR code appears in the generated PDF Cause: The bank eligibility is not checked when printing the QR code. Solution: If the fiscal_country is not Switzerland then we check the account validity. A valid account is an IBAN account of this type type CHXX 3000 0XXX XXXX with the number in the middle being between 30000 and 31999. opw-4380520 closes odoo#194421 Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <[email protected]>
Before this commit: - The 'disabled' attribute does not work on buttons in a form view arch, As a result, The button remained enabled even when the disabled attribute was applied. After this commit: - We can now disable a button after simply adding the `disabled` attribute on it. Part-of: odoo#190323 Signed-off-by: Aaron Bohy (aab) <[email protected]>
Currently, an error occurs when users press the data-hotkey 'ALT + Q' to split expense and any expense is not available in the split expense line. Step to produce: - Install the 'hr_expense' module. - Create an expense, add a category, and click on the 'Split Expense' button. - Delete all expenses from the split expense line, and press the data-hotkey 'ALT + Q' to click on the 'Split Expense' button to split expenses. IndexError: tuple index out of range This occurs because the system attempts to access the first expense from the split expense line [1], but expenses are not available. Link [1]: https://github.com/odoo/odoo/blob/280b762e7cd1b3d9a578bbae60cbb9b137ee5ce5/addons/hr_expense/wizard/hr_expense_split_wizard.py#L36 To resolve this issue, Disable a 'Split Expense' button after simply adding a `disabled` attribute on it. Sentry-6015854429 closes odoo#190323 Signed-off-by: Aaron Bohy (aab) <[email protected]>
To reproduce: ============= - create an event on calendar with description containing html - on calendar view, click on the event to open the popover and hover on the description field -> the tooltip is displayed with raw html content Fix: ==== hide the tooltip on html fields in calendar popover as it's not needed opw-4356581 closes odoo#192104 Signed-off-by: Aaron Bohy (aab) <[email protected]>
We update quote detection for gmail and outlook: - gmail has simple wrapper divs with explicit classes - outlook has a mix of div ids and simple pattern-based quoting (everything under "<hr><div id="divRplyFwdMsg"/> seems to be considered a quote) Previously gmail just used blockquote, which still works but does not capture "On xx:xx:xx X <[email protected]> wrote:" headers, which are caught for outlook. Previously outlook had a wrapper div around divRplyFwdMsg which would set data-o-mail-quote-container on it, and propagate to children. However it seems that outer div was either removed or is not always present, a heuristic is thus needed. task-4381505 Part-of: odoo#192875 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Blank spaces following a quoted node should also be quoted. This avoids having long trailing spaces below a signature and having unquoted blank spaces between two quoted blocks task-4381505 Part-of: odoo#192875 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
We update quote detection for gmail and outlook: - gmail has simple wrapper divs with explicit classes - outlook has a mix of div ids and simple pattern-based quoting (everything under "<hr><div id="divRplyFwdMsg"/> seems to be considered a quote) Previously gmail just used blockquote, which still works but does not capture "On xx:xx:xx X <[email protected]> wrote:" headers, which are caught for outlook. Previously outlook had a wrapper div around divRplyFwdMsg which would set data-o-mail-quote-container on it, and propagate to children. However it seems that outer div was either removed or is not always present, a heuristic is thus needed. task-4381505 closes odoo#192875 Signed-off-by: Thibault Delavallee (tde) <[email protected]>
Before this commit, it could happen that the autocomplete does not find the option to select. Now, we give the option to select so we're sure that the option exists when we select it. runbot errors: 5759, 102534, 111418 closes odoo#124584 Signed-off-by: Julien Carion (juca) <[email protected]>
**Problem**: The cropper buttons are positioned at the end of the page instead of directly under the image being cropped. **Solution**: Remove `position: fixed` from the buttons container, allowing it to be positioned just below the image being cropped/edited. **Steps to Reproduce**: 1. Navigate to Email Marketing > Start from scratch. 2. Add "Blocks" > "Body" > "Columns". 3. Open the cropping tool on the first image. 4. Observe that the cropping buttons appear at the end of the page, requiring scrolling to access them. opw-4461565 closes odoo#193016 Signed-off-by: David Monjoie (dmo) <[email protected]>
closes odoo#194670 Signed-off-by: Josse Colpaert (jco) <[email protected]>
Adds a configuration that can be used to mitigate PostgreSQL transactional errors with long-living connections and the `LISTEN/NOTIFY`[1] functionality by re-establishing the database connection periodically. In the case that a connection outlives the transaction wraparound[2] mechanism of postgres, the `LISTEN/NOTIFY` internal queue might contain references to transactions that have already been deleted by the system's (or a manual) `VACUUM`[3] as it has its own transaction validity mechanisms (roughly comparing transaction ids). This can be reproduced by: - Triggering a wraparound _AND_ cleaning of pg_xact between the cron's `LISTEN` + `COMMIT` and its recyling. - Having done at least one `NOTIFY` during that time period (?). - Try to `LISTEN` to the same channel on the same database (transaction id must be < than the first connection's transaction id). The following is an example error message: ``` ERROR database odoo.service.server: Worker (3194772) Exception occurred, exiting... Traceback (most recent call last): File "/home/user/odoo/service/server.py", line 1089, in run self.start() File "/home/user/odoo/service/server.py", line 1235, in start self.dbcursor.commit() File "/home/user/odoo/sql_db.py", line 480, in commit result = self._cnx.commit() ^^^^^^^^^^^^^^^^^^ psycopg2.errors.UndefinedFile: could not access status of transaction 1194816979 DETAIL: Could not open file "pg_xact/0473": No such file or directory. ``` [1: LISTEN/NOTIFY](https://www.postgresql.org/docs/current/sql-notify.html) [2: wraparound](https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-WRAPAROUND) [3: VACUUM](https://www.postgresql.org/docs/17/sql-vacuum.html) [LISTEN/NOTIFY code](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c) [Connection being kept](https://github.com/postgres/postgres/blob/REL_16_STABLE/src/backend/commands/async.c#L2167-L2191) [See more](https://www.postgresql.org/message-id/flat/VE1PR03MB531295B1BDCFE422441B15FD92499%40VE1PR03MB5312.eurprd03.prod.outlook.com#7e36d1fdca921b5292e92c7017984ffa) closes odoo#194141 Related: odoo/documentation#11779 Signed-off-by: Julien Castiaux (juc) <[email protected]>
…quests Steps to Reproduce: • Install the Time Off app. • Create a new user and corresponding employee without any group in Time Off. • Create a new time off request with a start date < today's date. • Attempt to change the date, which results in a validation error. Issue: - Users are unable to modify time off requests, even if they are not yet approved. Fix: - Added a check to ensure that modifications are allowed for time off requests that are not in an approved state. task-4236572 closes odoo#190944 Signed-off-by: Yannick Tivisse (yti) <[email protected]>
Problem: When printing an invoice with l10n_cl installed, the tax total will display the lavel as 'VAT.' The user expects 'VAT' to be translated to maybe 'IVA.' It is hardcoded into the view, thus the .pot file needs to be updated. Note: Starting from v17, there are missing translations for strings "Net Amount", "Total", "Exempt Amount" in the .pot file for the view l10n_cl.tax_totals_widget. However, these are present for v16. Will probably need to modify the fw-ports to include these strings in the file. Purpose: Updating the .pot file to include the hardcoded VAT string will ensure there are translations for that label. Steps to Reproduce on Runbot: 1. Install l10n_cl and Accounting 2. Add Spanish as a language 3. Switch to the CL company 4. Create an invoice for a customer whose language is Spanish 5. Print the invoice and notice 'VAT' is not translated opw-4383092 closes odoo#190605 Signed-off-by: Antoine Dupuis (andu) <[email protected]>
Before this commit, if a gift card was created in another company and the gift card program was not assigned to any company, using the gift card in another company resulted in an error. opw-4422730 closes odoo#192246 Signed-off-by: Joseph Caburnay (jcb) <[email protected]>
Steps: - Install sale app. - Enable Loyalty settings. - Try to create a card on a loyalty. Issue: - Giving validation error. Casue: - In [PR] forgot to check expiration_date set or not before raise an error. Fix: - Added condition to check if expiration_date set or not on card before raising an error. [PR]: odoo#171453 opw-4492179 opw-4490587 opw-4504188 opw-4495530 closes odoo#194785 Signed-off-by: Morgane Demesmaeker <[email protected]>
Issue: - The negative values in Vendor Bills are not being reflected in the Analytic Account linked to a project. - the negative value does not reduce the project’s total cost in the Analytic Report cost calculations. Steps to reproduce: - Create a project and set an analytic account or use the "Renovations" project. - Create a vendor bill. - On the VB add two lines one with a positive Price and the other with a negative Price. - on `Analytic` of each line set the project to `Renovations` or the project you created. - Validate the vendor bill. - Go to the project app and click on the 3 dots of the project you choose and click on `Project Updates`. - Notice the total cost of the project is not reflecting the negative value of the vendor bill. Solution: - The issue is caused by the condition ('price_subtotal', '>', 0) in the query for account.move.line. Removing this condition ensures both positive and negative price_subtotal values are included. opw-4416931 closes odoo#194300 Signed-off-by: Xavier Bol (xbo) <[email protected]>
In error_service, event.preventDefault() is required to prevent uncaught error message due to latest Chrome version (132) compatibility. closes odoo#194795 Signed-off-by: Aaron Bohy (aab) <[email protected]>
Since commit [1], we added a selector using the ":has" pseudo-class in the template that defines where "inner content" blocks can be dropped. It is no longer possible to enter edit mode (a traceback occurs) starting from Odoo version 18.0 and in browsers older than Chrome 112 or Firefox 121. This bug happens because the same selector, used by jQuery, combines both the ":has" pseudo-class and the ":is" pseudo-class (this ":is" pseudo-class was introduced into the same selector by commit [2] starting from Odoo version 18.0). This is not compatible with the older browsers mentioned above. The bug only appears in version 18. However, we already fixed this in 16.0 in case potential customizations had added the ":is" pseudo-class to the same selector. [1]: odoo@65a8500 [2]: odoo@e0fc837 opw-4494945 closes odoo#194676 Signed-off-by: Quentin Smetz (qsm) <[email protected]>
Before: The typofix feature treats terms in the old and new values with similar text content as the same term, migrating the translations of the old term to the new term. For example The old value has the mapping: 'Draft': 'Brouillon' The new value contains the term: '<span invisible="name or name_placeholder or quick_edit_mode">Draft</span>' Since the old term and the new term share the same text content, 'Draft', after `write`, the new term reuses the old translation of 'Draft'. However, the translation 'Brouillon' is always visible, unlike its en_US counterpart. This behavior is acceptable in non-upgrade mode because the user writes the en_US value and is responsible for verifying translations afterward. However, it is problematic during upgrades because users cannot easily identify which records have changed and need to be rechecked. After: The translation inheritance behavior can be described as below Translations can be inherited after `write` from old terms to new terms which share the very close text contents 1. when `write` in production mode, text contents for translation terms are more important than the HTML/XML structures of them, and the old term translations should be remained as much as possible. Because * the writing user is responsible to recheck all translations after `write`. * it is easier for the writing user to copy technical HTML/XML structures than translate text contents for a language they may not know. * the feature can also be used as typofix when the only small diff is the text content 2. when `write` in upgrade time, the HTML/XML structure is more important than the text content, and the new term structure should be remained as much as possible. Because * HTML/XML structures might be changed a lot after upgrade, which may contain behavior relevant diff (e.g. `invisible`), even if text contents are not changed. * users have no idea which records' values are changed during upgrade and are hard to recheck their translations. * new terms are highly likely to be correctly translated in the latest po files which will be imported during upgrade. * the typofix feature can still be remained when the only small diff is the text content Based on the above feature analysis, we use the below new strategy 1. translations can be inherited only if the old source term and the new source term share the same HTML/XML structure 2. translations can be inherited only if the old translation term and the new source term share the same HTML/XML structure 3. when translations are inherited, MODIFIER_ATTRS will be synchronized with the new source term, other attributes will be copied from the source term if available. closes odoo#194186 Backward-port-of: odoo#194181 Backward-port-of: odoo#150152 Signed-off-by: Raphael Collet <[email protected]>
…on AMLs **Current behavior:** With Anglo-Saxon accounting, for some tracked product, with FIFO and real-time valuation: Making a purchase order in some foreign currency, having some exchange rate for today, receiving the product, then dating the vendor bill to some future date with a different exchange rate will result in exchange difference journal entries when the bill is posted. **Expected behavior:** We shouldn't see exchange difference entries, as there are pending corrective valuation entries which have simply not been posted yet. Reconciliation should be deferred until these moves are no longer in draft. **Steps to reproduce:** 1. Activate another currency, define some rate for today and another (different) rate for tomorrow 2. Create a product with FIFO and real-time costing & valuation 3. Create an initial purchase for the product, receive then bill normally 4. Create another purchase order and receive the product 5. Create the invoice, set the invoie date for tomorrow 6. Post the invoice -> Open the `Exchange Difference` journal to see the entries which should not have been generated **Cause of the issue:** After creating the AMLs which represent the difference in reception/bill unit price of the product, they are caught here: https://github.com/odoo/odoo/blob/971400771a31c05641a8672f6b1d85afaa9c4a19/addons/account/models/account_move.py#L3575 and designated as future moves, not to be posted at this time. At the end of the `_post()` stack: https://github.com/odoo/odoo/blob/4df156164cf1d2764ba23682beee588777457fd6/addons/stock_account/models/account_move.py#L229 where there would normally be some `correction_amls`, they weren't created here because the AMLs for the price diff were not posted- so the price diff entry is generated. **Fix:** Wait for pending (`state == 'draft'`) AMLs that are part of some `AccountMove`'s valuation to be no longer in draft before allowing reconciliation with a currency exchange difference. opw-4266652 closes odoo#193971 Signed-off-by: William Henrotin (whe) <[email protected]>
**Problem**: Outlook always displays the border of an element if `border-style` is set to `solid`, even when all border widths are 0. **Solution**: Change `border-style` to `none` if all border widths are 0. **Steps to Reproduce**: 1. Open the "Event: Registration Confirmation" email template in the web editor. 2. Add a character and save the template. 3. Check the saved `body_html`. -> All table elements will have `border-style: solid;` added as inline styling, causing borders to appear in Outlook. opw-4211794 closes odoo#193973 Signed-off-by: David Monjoie (dmo) <[email protected]>
When creating a new database or activating a new currency, the first rate fetched will often be set only starting "today". This can lead to issues when creating invoices in the past, especially if the conversion rate is very different from 1. Instead of only using a fallback on 1, we also fallback on the oldest rate in the database if available. closes odoo#194500 Signed-off-by: Wala Gauthier (gawa) <[email protected]>
The credit limit in the partner form view was missing a currency symbol, leading to ambiguity about whether the limit was in the customer's currency or the company's currency. Displayed the partner limit in the company currency to avoid confusion. task-4507336 closes odoo#194807 Signed-off-by: Hugo Poncelet (hupo) <[email protected]>
### Contains the following commits: odoo/o-spreadsheet@4886b0b10 [REL] 16.0.58 Task: 0 odoo/o-spreadsheet@e83048734 [FIX] formulas: binary search returning incorrect index for multiple exact matches Task: 4328300 odoo/o-spreadsheet@f76407ac7 [FIX] selection: drag and drop resized cols and rows Task: 4454025 odoo/o-spreadsheet@db9509f79 [FIX] renderer: Fix grid rendering Task: 4448426 closes odoo#195229 Signed-off-by: Pierre Rousseau (pro) <[email protected]> Co-authored-by: Anthony Hendrickx (anhe) <[email protected]> Co-authored-by: Alexis Lacroix (laa) <[email protected]> Co-authored-by: Lucas Lefèvre (lul) <[email protected]> Co-authored-by: Dhrutik Patel (dhrp) <[email protected]> Co-authored-by: Adrien Minne (adrm) <[email protected]> Co-authored-by: Mehdi Rachico (mera) <[email protected]> Co-authored-by: Florian Damhaut (flda) <[email protected]> Co-authored-by: Rémi Rahir (rar) <[email protected]> Co-authored-by: Pierre Rousseau (pro) <[email protected]> Co-authored-by: Vincent Schippefilt (vsc) <[email protected]>
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. This commit also adds tests to ensure that a field required for a model is not disabled when conditionally hidden, and that a required field (but not required for a model) is disabled when conditionally hidden. opw-4447039 closes odoo#194902 Signed-off-by: Serge Bayet (seba) <[email protected]>
Before this commit, due to the group place on the setting, the cash basis option was not displayed to user with only invoicing. Now, we want the user (with only invoicing) to be able to see it but not modifying the account on the settings. It will allow the users to choose the tax exigibility on the taxes, which for french user is important since depending on that the sentence "Option to pay tax on debits" will be displayed on the invoice. closes odoo#190995 Task: 4342603 Signed-off-by: Ruben Gomes (rugo) <[email protected]>
Additional information is needed in the error log to identify the method causing the error. Prior to this change, the log received when an error occured was as follows but no information about the code was shown: `odoo.addons.point_of_sale.models.pos_order: Could not fully process the POS Order: Record cannot be modified right now: This cron task is currently being executed and may not be modified Please try again in a few minutes. closes odoo#195184 Signed-off-by: Vlad Stroia (vlst) <[email protected]>
closes odoo#196447 Related: odoo/enterprise#78533 Signed-off-by: Louis Wicket (wil) <[email protected]>
Steps to reproduce: - Enter edit mode. - Drag and drop a carousel into the page. - Use the arrow keys to slide the carousel. - Bug: a traceback occurs. Just like we disabled Bootstrap for sliding the carousel in edit mode and instead handle it manually (see this commit [1]), in this commit, we also disable sliding the carousel by pressing the left and right arrow keys on the keyboard. [1]: odoo@93ec3ac opw-4373535 closes odoo#196433 Signed-off-by: Serge Bayet (seba) <[email protected]>
Steps to reproduce the bug: - Create two delivery transfers. - Add them to a single batch transfer. - Assign a responsible person to the batch transfer. - The assigned responsible person will automatically be updated in all related transfers. - Now, remove the responsible person from the batch transfer. Problem: When a responsible person is assigned or modified in a batch transfer, the update is correctly reflected in all related transfers within that batch. However, if the responsible person is removed from the batch transfer, this change is not applied to the individual transfers linked to it. opw-4519994 closes odoo#196333 Signed-off-by: William Henrotin (whe) <[email protected]>
@royle-vietnam Viindoo Test Suite has failed! |
### Contains the following commits: odoo/o-spreadsheet@d09869977 [REL] 16.0.60 Task: 0 odoo/o-spreadsheet@66d34474d [FIX] Rendering: Skip hidden headers Task: 4535794 odoo/o-spreadsheet@46acd9c00 [FIX] SheetView: avoid some array allocation odoo/o-spreadsheet@dead55ba7 [FIX] SheetView: remove useless/costy calls to Object.x odoo/o-spreadsheet@f324cb15b [FIX] Renderer: Do not draw if no canvas Task: 4535794 odoo/o-spreadsheet@73b34ef39 [FIX] SheetView: Fix viewports with negative dimensions Task: 4535794 closes odoo#196553 Signed-off-by: Vincent Schippefilt (vsc) <[email protected]> Co-authored-by: Anthony Hendrickx (anhe) <[email protected]> Co-authored-by: Alexis Lacroix (laa) <[email protected]> Co-authored-by: Lucas Lefèvre (lul) <[email protected]> Co-authored-by: Dhrutik Patel (dhrp) <[email protected]> Co-authored-by: Adrien Minne (adrm) <[email protected]> Co-authored-by: Mehdi Rachico (mera) <[email protected]> Co-authored-by: Florian Damhaut (flda) <[email protected]> Co-authored-by: Rémi Rahir (rar) <[email protected]> Co-authored-by: Pierre Rousseau (pro) <[email protected]> Co-authored-by: Vincent Schippefilt (vsc) <[email protected]>
This attribute is an internal optimisation of the ORM to fasten the loading of the registry. It is in no way meant to be part of the API and be used by developers in modules. opw-4548156
@royle-vietnam Viindoo Test Suite has passed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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