Conversation
|
Hi @miquelalzanillas, @nelsonramirezs, @BernatObrador, @peluko00, @ppyczko, @max3903, @mpascuall, @marcelsavegnago, |
|
Hi @CristianoMafraJunior, thanks for your work. Why did you make changes in several modules within the same PR? It’s a massive change and the PR scope is too large, in my opinion. Let’s see what others think. |
marcos-mendez
left a comment
There was a problem hiding this comment.
Automated Review -- Tests Failed
1. Root cause of the test failure
The test failure is caused by a database connection error during the Odoo server startup, not by any code logic issue in the PR. The error occurs because the test environment tries to connect to a PostgreSQL instance that is not ready or accessible (Connection to the database failed).
2. Suggested fix
There is no code fix needed in the PR for this failure — it's an infrastructure or CI configuration issue. However, to avoid such failures in the future, ensure the PostgreSQL service in the CI environment is fully initialized before starting the Odoo server. The test workflow should include a wait-for-db step or proper service readiness checks.
3. Additional code issues
There are no real bugs in the diff, but a few style/consistency improvements and minor cleanup can be done:
-
Redundant import in
helpdesk_mgmt/controllers/myaccount.py:- Line 12:
from odoo.addons.portal.controllers.portal import CustomerPortal - Line 13:
from odoo.addons.portal.controllers.portal import pager as portal_pager - ✅ Issue: The
pagerimport is duplicated. Remove the second line.
- Line 12:
-
Unnecessary trailing comma in function signature:
- Line 49 in
helpdesk_mgmt/controllers/myaccount.py:✅ Issue: Trailing comma in function signature is unnecessary and not required in Python 3. It can be safely removed.def portal_my_tickets( search=None, search_in=None, groupby=None, **kw, ):
- Line 49 in
-
Minor formatting inconsistency in
helpdesk_mgmt/models/helpdesk_ticket.py:- Line 52:
domain="team_id and [('share', '=', False),('id', 'in', user_ids)] or [('share', '=', False)]" - ✅ Issue: Minor spacing inconsistency in the domain list (e.g., missing space after comma). Not a bug but improves readability.
- Line 52:
4. Test improvements
To improve test coverage and ensure correctness of the changes:
-
In
helpdesk_mgmt/tests/test_helpdesk_ticket.py, add a test case that explicitly checks the behavior ofmessage_newandmessage_updatemethods, especially for edge cases like:- Empty or malformed
msg_dict - Different user permissions or access rights
- Test with both
super()calls and ensure no regression in behavior.
- Empty or malformed
-
In
helpdesk_mgmt_merge/tests/test_helpdesk_mgmt_merge.py, ensure that:- The merge wizard correctly handles merging of tickets with followers.
- The
default_getmethod is tested in aSavepointCaseto ensure proper context handling. - Add tests for edge cases like merging tickets with no followers, or tickets with complex relations.
-
In
helpdesk_mgmt_activity/models/helpdesk_ticket.py, add a test for:_compute_next_stage_idto ensure that stages are correctly ordered and filtered._compute_record_refto verify that invalid records don't cause crashes.
Summary
- The test failure is unrelated to the PR code — it's a CI infrastructure issue.
- No real bugs are introduced in the PR.
- Minor code style and consistency issues exist, but are not critical.
- Suggested improvements in test coverage to ensure robustness of new logic.
Reciprocal Review Request
Hi everyone! I found some test failures on this PR and left detailed feedback above. I am happy to discuss or help debug. In the meantime, if any of you get a chance, I would appreciate a look at my open PR(s):
My open PRs across OCA:
- server-tools#3554 [MIG] datetime_formatter: Migration to 18.0
- server-tools#3548 [18.0][MIG] base_kanban_stage: Migration to 18.0
- hr-attendance#262 [16.0][ADD] Hr_attendance_idsecure: iDSecure (ControliD) attendance integration
- stock-logistics-workflow#2276 [16.0][ADD] stock_move_line_devaluation
- stock-logistics-workflow#2275 [16.0][ADD] Stock move line analytic account
- stock-logistics-workflow#2268 [16.0][ADD] stock_move_line_picking_partner
- purchase-workflow#2694 [16.0][IMP]Purchase workflow added to review state & exception fix
Reviewing each other's work helps the whole community move forward. Thank you!
Environment via OCA Neural Reviewer: Minikube + K8s Job + oca-ci/py3.10-odoo16.0 | Odoo 16.0
Automated review by OCA Neural Reviewer + qwen3-coder:30b
copier update v1.39
Related #958
cc @pedrobaeza @marcelsavegnago @luisDIXMIT