Monday, March 31, 2025
19 changes · 17.0
Resolved issues and error corrections
A sales-related automated test has been moved so it runs under the app it actually depends on. This helps keep quality checks reliable and avoids misleading test failures during development.
Original PR description
since https://github.com/odoo/odoo/pull/202318 `test_02_portal_sale_signature_without_name_tour` was on started via `sale` module but only worked with `sale_management` this commit move the test to be started directly from `sale_management`
This fix restores important page settings when product lists are loaded on the website. It helps ensure shoppers see products with the correct website-specific behavior, reducing the risk of display or filtering issues.
Original PR description
This commit rectifies a fix (c0b7a8c2faae53ab62a747297e7f3a56c4d1d061) where the original context of the returned recordset was inadvertently omitted. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that could occur when editing website translations for appointment pages in a second language. The translation editor now correctly handles content that spans multiple lines, helping users complete translation updates without crashes.
Original PR description
Steps to reproduce: (This are for this specific case) 1. Get website_appointment_sale and a 2nd language for our website. 2. Make sure that for the appointment we select Allow Guests. 3. Now, we go to the website and go to the appointment, until we reach the "Add more details about you" page. 4. Here is when we have to try to modify the translation with editor. Issue: We're receiving an error as "Cannot read properties of null (reading '2')" which arises from the `trans` not being appropiate due to the translation regex, which will cause the match to be null when calling it on this "defective" `trans`. Solution: The current solution will make the regex to better match anything in the translation, by modifying `(.*)` to ([\s\S]*?) we make sure that we're matching any character, including new lines. opw-4442038
Partner ledger reports now leave out partners whose opening balance is zero. This makes the reports easier to read and can help them load more efficiently by removing unnecessary rows.
Original PR description
To improve readability and performance, partners with a zero initial balance are now excluded from the partner ledger reports. task-4578612
This fix prevents accounting reports from crashing when users filter or group results by an analytic plan that has no entries. It keeps Profit and Loss and related reports usable in this edge case, avoiding an unexpected error during reporting.
Original PR description
Steps to reproduce:
- Create a new analytic plan (leave it empty)
- Open Accounting / Reporting / Statement Reports / Profit and Loss
- In Analytic Group By > Plans add the created plan
Issue: Traceback will raise
```
psycopg2.errors.IndeterminateDatatype: cannot determine type of empty array
LINE 18: ..._plan2_id, x_plan3_id, x_plan4_id, x_plan5_id] && ARRAY[] AN...
^
HINT: Explicitly cast to the desired type, for example ARRAY[]::integer[].
```
Occurs after 3ea7d2ebbc6904495a89627203d30c33a398c0aa We add in the where clause a condition to take only the relevant lines but in case the analytic plan is empty the whole clause should eval to false
opw-4649968This update stabilizes India asset calculation tests by fixing the date used during test execution. It prevents automated checks from failing after March 31, helping maintain release confidence without changing customer-facing behavior.
Original PR description
The tests for assets are lacking a freeze_time, and so, fail beginning 31st of March runbot-162150
This fix ensures Swedish SIE accounting imports use all newly created accounting data before validation. It prevents import failures that could occur in companies not using multiple currencies, improving reliability for affected accounting workflows.
Original PR description
In https://github.com/odoo/odoo/commit/6d2bfc85bc0e387fbf4d3a64eb15b18ec59e9b47 we removed an explicit flush performed right after move creation. Because of this change, when fetching data for the sie import we might not see all the relevant lines. We need to ensure to flush any data left in cache before making a SQL query no opw
Miscellaneous changes
**Problem**: Sometimes, due to fast image changes and reloads, the attachment is saved, but the `o_modified_image_to_save` class is not removed. **Solution**: Before saving an image, check if it has already been saved. If so, simply remove the `o_modified_image_to_save` class. **opw-4406195** --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#203283
Original PR description
**Problem**: Sometimes, due to fast image changes and reloads, the attachment is saved, but the `o_modified_image_to_save` class is not removed. **Solution**: Before saving an image, check if it has already been saved. If so, simply remove the `o_modified_image_to_save` class. **opw-4406195** --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#203283
This update contains the following commits: [IMP] runtime/utils: export htmlEscape and add tests (https://github.com/odoo/owl/pull/1677) [FIX] utils: Correct validation of mount target in shadow DOM/iframe (https://github.com/odoo/owl/pull/1676) [IMP] runtime: add markup tag function (https://github.com/odoo/owl/pull/1670) Notes: https://github.com/odoo/owl/releases/tag/v2.7.0 Forward-Port-Of: odoo/odoo#203515
Original PR description
This update contains the following commits: [IMP] runtime/utils: export htmlEscape and add tests (https://github.com/odoo/owl/pull/1677) [FIX] utils: Correct validation of mount target in shadow DOM/iframe (https://github.com/odoo/owl/pull/1676) [IMP] runtime: add markup tag function (https://github.com/odoo/owl/pull/1670) Notes: https://github.com/odoo/owl/releases/tag/v2.7.0 Forward-Port-Of: odoo/odoo#203515
Steps to reproduce: - Have a single currency active (no base.group_multi_currency) - Create a journal entry with lines: 1. Debit 10 | Credit 0 2. Debit 0 | Credit 10 - Save (note: line 2 `amount_currency` will be -10) - Modify the journal entry lines 2. (edit) Debit 10 | Credit 0 3. (new) Debit 0 | Credit 20 - Save Issue: Validation error will block the action psycopg2.errors.CheckViolation: new row for relation "account_move_line" violates check constraint "account_mov
Original PR description
Steps to reproduce: - Have a single currency active (no base.group_multi_currency) - Create a journal entry with lines: 1. Debit 10 | Credit 0 2. Debit 0 | Credit 10 - Save (note: line 2 `amount_currency` will be -10) - Modify the journal entry lines 2. (edit) Debit 10 | Credit 0 3. (new) Debit 0 | Credit 20 - Save Issue: Validation error will block the action psycopg2.errors.CheckViolation: new row for relation "account_move_line" violates check constraint "account_move_line_check_amount_currency_balance_sign" It occurs because, as we don't have `amount_currency` in the view, for line 2 the write operation will only store the updated values of `debit`,`credit`,`balance`, leaving the old amount of `amount_currency`. This creates an inconsistency as: - old `amount_currency` sign is negative - new `balance` sign is positive opw-4430334 Forward-Port-Of: odoo/odoo#200566
ImmutableOrderedMultiDict was deprecated in Werkzeug 3.1.0. As the upcoming Debian Trixie provides Werkzeug 3.1.3 we need to fix that in Odoo supoprted versions. See: - https://packages.debian.org/trixie/python3-werkzeug - pallets/werkzeug#2968 - pallets/werkzeug#2975 A less intrusive way would be to ignore the deprecation warning 🤔 Forward-Port-Of: odoo/odoo#203461
Original PR description
ImmutableOrderedMultiDict was deprecated in Werkzeug 3.1.0. As the upcoming Debian Trixie provides Werkzeug 3.1.3 we need to fix that in Odoo supoprted versions. See: - https://packages.debian.org/trixie/python3-werkzeug - pallets/werkzeug#2968 - pallets/werkzeug#2975 A less intrusive way would be to ignore the deprecation warning 🤔 Forward-Port-Of: odoo/odoo#203461
Forward-Port-Of: odoo/odoo#203874
Original PR description
Forward-Port-Of: odoo/odoo#203874
Steps to reproduce: 1. Create a new storable product 2. In the product's description, insert a base64 image - Pasting a (big) image from the clipboard insert it as base64 in <16.3 - Or do it manually by modifying the HTML 3. Create a Sale Order with the product 4. Validate the sale order ### Before this commit: During the Stock Picking creation, the picking's description is taken from the product's description and converted into plaintext. It replaces the images by some tex
Original PR description
Steps to reproduce:
1. Create a new storable product
2. In the product's description, insert a base64 image
- Pasting a (big) image from the clipboard insert it as base64 in <16.3
- Or do it manually by modifying the HTML
3. Create a Sale Order with the product
4. Validate the sale order
### Before this commit:
During the Stock Picking creation, the picking's description is taken from the product's description and converted into plaintext. It replaces the images by some text, but the Regex searching for a name in the src attribute, has a terrible backtracking (due to the lookahead).
### After this commit:
Searching for the filename does not make sense when dealing with base64; therefore, this commit skips this feature to prevent intensive CPU usage.
opw-4674295
Forward-Port-Of: odoo/odoo#203738Steps to reproduce ================== - Install account_accountant - Enable the debug mode - Copy a very long text in the "Terms and Conditions" section - Click on debug > Set Defaults - Click on the Default selection => Chrome crashes Depending on the window manager/OS, a weird Chrome window can appear spanning across multiple displays. Or Chrome can simply crash. Cause of the issue ================== The text value inside the select option is too long for Chrome to handle.
Original PR description
Steps to reproduce ================== - Install account_accountant - Enable the debug mode - Copy a very long text in the "Terms and Conditions" section - Click on debug > Set Defaults - Click on the Default selection => Chrome crashes Depending on the window manager/OS, a weird Chrome window can appear spanning across multiple displays. Or Chrome can simply crash. Cause of the issue ================== The text value inside the select option is too long for Chrome to handle. Solution ======== We can truncate the displayed text. opw-4572496 Forward-Port-Of: odoo/odoo#202324
An error is encountered in the `Modify Asset` wizard when resuming `Asset Depreciation` after manually increasing `Non Depreciable Amount`. The system attempts to record the change as a gain, requiring a `Depreciation Account`. However, this field is hidden, preventing users from fixing the problem, so they are blocked. Steps to reproduce: - Create a running asset - Click `Modify Depreciation` > `Pause` - Click `Resume Depreciation` and open the `asset.modify` wizard. - Increase `Not Depr
Original PR description
An error is encountered in the `Modify Asset` wizard when resuming `Asset Depreciation` after manually increasing `Non Depreciable Amount`. The system attempts to record the change as a gain, requiring a `Depreciation Account`. However, this field is hidden, preventing users from fixing the problem, so they are blocked. Steps to reproduce: - Create a running asset - Click `Modify Depreciation` > `Pause` - Click `Resume Depreciation` and open the `asset.modify` wizard. - Increase `Not Depreciable Amount`, realizing a gain - Press the `Resume` button Ticket [link](https://www.odoo.com/odoo/project/967/tasks/4472309) opw-4472309 Forward-Port-Of: odoo/enterprise#79181
When importing an ofx bank statement, we try to parse the raw attachment value, in case of UnicodeDecodeError, we try to get an encoding declaration in the file, and fallback on 'utf-8'. But we can still face a file that is not well encoded and we end up with a traceback. With this commit, we display a UserError instead of the ugly traceback. opw-4526766 Forward-Port-Of: odoo/enterprise#81561
Original PR description
When importing an ofx bank statement, we try to parse the raw attachment value, in case of UnicodeDecodeError, we try to get an encoding declaration in the file, and fallback on 'utf-8'. But we can still face a file that is not well encoded and we end up with a traceback. With this commit, we display a UserError instead of the ugly traceback. opw-4526766 Forward-Port-Of: odoo/enterprise#81561
## Steps to reproduce: 1. Install l10n_mx. 2. Activate developer mode. 3. Activate Download XSD files (XML validation). 4. Go to accounting configuration > chart of accounts 5. Make sure here to have 2 accounts like 702.XXX. One should have the credit tag and the other one the debit one. 8. Go to reports and select Trial Balance. 9. Click on the download drop list and select COA SAT ## Issue: Up to now we have just intentionally marked this accounts as no valid, we can see that
Original PR description
## Steps to reproduce: 1. Install l10n_mx. 2. Activate developer mode. 3. Activate Download XSD files (XML validation). 4. Go to accounting configuration > chart of accounts 5. Make sure here to have…
## Steps to reproduce: 1. Install l10n_mx. 2. Activate developer mode. 3. Activate Download XSD files (XML validation). 4. Go to accounting configuration > chart of accounts 5. Make sure here to have 2 accounts like 702.XXX. One should have the credit tag and the other one the debit one. 8. Go to reports and select Trial Balance. 9. Click on the download drop list and select COA SAT ## Issue: Up to now we have just intentionally marked this accounts as no valid, we can see that inside trial_balance.py for l10n_mx_reports at L201 this was a known limitation. ## Solution: As we can see from the technical anex in the mexican goverment site https://www.gob.mx/sat/documentos/contabilidad-en-medios-electronicos-anexo-tecnico we can see that there are asset, liability and equity accounts which, by their nature, can be presented as debit or credit. ### Example Scenario: Let's say we have two hypothetical accounts, 701.01.01 and 701.01.02: Account 701.01.01 (perhaps an asset account) would be a Deudora (D). Account 701.01.02 (perhaps a liability account) would be Acreedora (A). The nature (D or A) depends on the type of account according to the categorization provided in the document. So, - Accounts related to Assets, Costs, and Expenses should generally be Deudora (D). - Accounts related to Liabilities, Equity, and Income should generally be Acreedora (A). - Some special accounts may vary and can be both Deudora (D) and Acreedora (A). opw-4185713 Forward-Port-Of: odoo/enterprise#70113
Forward-Port-Of: odoo/enterprise#82398
Original PR description
Forward-Port-Of: odoo/enterprise#82398
Currently, an exception is generated when the system tries to find the 'Out of Contract' work_entry_type after it has been deleted. Steps to Reproduce: 1 - Install hr_payroll module without demo data 2 - Navigate to hr payroll -> configuration -> work entry types 3 - delete the 'Out of contract' work entry type 4 - Navigate to hr payroll -> Contracts -> Contract 5 - Create a contract with a start date next to the current. 6 - Navigate to hr payroll -> payslips -> To pay 7 - Try
Original PR description
Currently, an exception is generated when the system tries to find the 'Out of Contract' work_entry_type after it has been deleted. Steps to Reproduce: 1 - Install hr_payroll module without demo data…
Currently, an exception is generated when the system tries to find the 'Out of Contract' work_entry_type after it has been deleted. Steps to Reproduce: 1 - Install hr_payroll module without demo data 2 - Navigate to hr payroll -> configuration -> work entry types 3 - delete the 'Out of contract' work entry type 4 - Navigate to hr payroll -> Contracts -> Contract 5 - Create a contract with a start date next to the current. 6 - Navigate to hr payroll -> payslips -> To pay 7 - Try to create Payslips To Pay for created contract 8 - an error occurs Error: ```ValueError External ID not found in the system: hr_payroll.hr_work_entry_type_out_of_contract ``` This issue[1] occurs because when the system tries to reference the missing 'Out of Contract' work entry type it results in a ValueError due to a missing required record. The same issue [2] occurs in the `l10n_hk_hr_payroll` module. [1] - https://github.com/odoo/enterprise/blob/265177dfd281f3aa1d61db6587ddfa37790570fe/hr_payroll/models/hr_payslip.py#L597 [2] -https://github.com/odoo/enterprise/blob/31e56779f8e0011ddc5c1a2821f68c8f041efbe4/l10n_hk_hr_payroll/models/hr_payslip.py#L180 This fix resolves the issue by ensuring that if the `Out of Contract` work entry type is missing, it returns a false value. A similar fix has been applied in `l10n_hk_hr_payroll`. Additionally, code has been added to prevent the deletion of any work entry type using @api.ondelete. sentry-6277939517 Forward-Port-Of: odoo/enterprise#79053