[16.0][ADD] document_page_project_task: add new module#564
[16.0][ADD] document_page_project_task: add new module#564marcelsavegnago wants to merge 1 commit intoOCA:16.0from
Conversation
eb1b1d8 to
287c617
Compare
|
ping @LoisRForgeFlow |
287c617 to
c6b6411
Compare
|
This PR has the |
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 occurs because the database connection fails during the Odoo startup process, likely due to a misconfiguration or missing environment setup in the test environment (Runboat). This is not a code issue but a test infrastructure problem.
2. Suggested fix
There is no code fix needed for the test failure itself, as it's unrelated to the module logic. However, ensure that:
- The test environment (Runboat) has proper access to PostgreSQL.
- The database configuration in
odoo.confor environment variables is correct. - The
odoobinary is correctly installed and executable in the test container.
3. Additional code issues
✅ Missing project dependency in manifest
In document_page_project_task/__manifest__.py, the module depends on document_page_project but does not explicitly depend on the base project module, which is required by document_page_project.
File:
document_page_project_task/__manifest__.py
Line: 13
Issue: Missing"project"independs
Fix: Add
"project"to thedependslist.
"depends": ["document_page_project", "project"],4. Test improvements
To improve test coverage for this module, the following test cases should be added:
✅ Test default_get with default_task_id context
Use TransactionCase to test that when a default_task_id is passed in the context, the project_id is correctly set on the new document page.
Suggested test method:
test_default_get_with_task_id
✅ Test consistency constraints
Use SavepointCase to test:
- That a
ValidationErroris raised when linking a task to a document page with a mismatched project. - That a
ValidationErroris raised when a task is linked but no project is set on the document page.
Suggested test methods:
test_consistency_constraint_task_without_project
test_consistency_constraint_project_mismatch
✅ Test automatic clearing of task when project changes
Use TransactionCase to test that when a document page's project is changed and no longer matches the linked task's project, the task_id is cleared.
Suggested test method:
test_task_cleared_on_project_change
✅ Test document_page_count computation
Use TransactionCase to ensure that document_page_count is correctly computed when document pages are linked to a task.
Suggested test method:
test_document_page_count_computation
Summary of OCA Testing Patterns
- Use
TransactionCasefor most functional tests. - Use
SavepointCasefor tests involving constraints or data integrity. - Tag tests using
@tagged('post_install', 'manual')if they are not part of the standard test suite.
These tests should be placed in a tests/test_document_page_project_task.py file.
⏰ PR Aging Alert
This PR by @marcelsavegnago has been open for 129 days (4 months).
💤 Last activity was 86 days ago.
Every ignored PR is a contributor who might not come back. Review time matters. (OCA Aging Report)
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
This module extends the document page (wiki) functionality by allowing you to link them directly to project tasks.
Main Features
Benefits
Dependencies
This module requires:
document_page_project: Module that links document pages to projectsproject: Odoo's project management modulecc @parzewski @kaynnan