Monday, March 25, 2024
5 changes · 17.0
Resolved issues and error corrections
This change corrects an internal test import in the Accounting module so upgrade checks can run without failing. It helps keep upgrade validation reliable and avoids false failures caused by a misplaced reference.
Original PR description
During upgrade got the import name error: ```ImportError: cannot import name 'code_translations' from 'odoo.addons.account.models.chart_template' ``` `code_translations` function defined in…
During upgrade got the import name error:
```ImportError: cannot import name 'code_translations' from
'odoo.addons.account.models.chart_template' ```
`code_translations` function defined in odoo.tools.translate
and there is function `get_python_translations`
by mistake give `from odoo.tools.translate import code_translations`
to correct that.
```
File "/home/odoo/src/odoo/17.0/addons/stock_account/tests/test_account_move.py", line 4, in <module>
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
File "/home/odoo/src/odoo/17.0/addons/account/tests/__init__.py", line 22, in <module>
from . import test_chart_template
File "/home/odoo/src/odoo/17.0/addons/account/tests/test_chart_template.py", line 4, in <module>
from odoo.addons.account.models.chart_template import code_translations
ImportError: cannot import name 'code_translations' from 'odoo.addons.account.models.chart_template' (/home/odoo/src/odoo/17.0/addons/account/models/chart_template.py)
```
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-prThis fix prevents accounting journals from failing when a renamed journal leaves behind an email alias that conflicts with a new journal name. Odoo now makes the alias unique using journal details, reducing setup errors during journal creation or upgrades.
Original PR description
Bad branch name, moved to https://github.com/odoo/odoo/pull/159037 Steps to reproduce: - Create an account journal. - Rename the created journal (let's say from A to B). - Create a new account journal named A. Changing the name of a journal doesn't change the name of the alias, An error caused by duplicate mail alias names will occur. Additionally the error can happen if the user has manually added aliases with the same name before upgrading to 17.0. Adding the code and company id of the journal to the alias to ensure uniqueness when an alias with the same name is already in the DB (as the combo `company_id`,`code` is unique). 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
A test for tax reports was failing intermittently when run at midnight due to timing mismatches between invoice and reversal dates. The fix ensures the reversal is created on the same date as the invoice, preventing the test from failing when the system clock crosses midnight during test execution.
Original PR description
The test creates an invoice, then a reversal, then checks the report values on the day of the invoice. But currently, there is no date for the reversal, s o if the invoice is created at 23:59:59 and the reversal at 00:00:01, the reversal won't be in the report values and so, the test will fail. The solution proposed is just to create the reversal at the invoice date Linked to runbot error 59289 Forward-Port-Of: odoo/enterprise#59157 Forward-Port-Of: odoo/enterprise#58644
This update fixes performance test failures in the appointment system by removing record links from the menu header before running tests. Record links in the header were preventing proper cache behavior and causing unnecessary database queries during automated testing, which is now resolved.
Original PR description
Com PR: https://github.com/odoo/odoo/pull/157897 --- We must disable the cache for the header when there are record links in it. When the runbot performs enterprise tests, "Helpdesk" appears in the header, which includes a record link. This commit removes record like urls in the menu before doing the performance test to prevent increasing the query count. opw-3694651 opw-3750925 opw-3781668 Forward-Port-Of: odoo/enterprise#58853
This update fixes an inconsistency where the Sales Order Line field was not editable in task forms for users without sales access, even though it was editable in other related views. The change makes the field consistently editable across all task-related pages, improving the user experience and workflow consistency.
Original PR description
Before this commit sol field wasn't editable when user don't have any sales access and it was editable for timesheet page and project form view. This commit make SOL field in task form editable to be consistant with project form and timesheet page of tast form. task-3764793 Forward-Port-Of: odoo/odoo#158359 Forward-Port-Of: odoo/odoo#155339