Skip to content

[16.0][ADD] helpdesk_mgmt_ticket_document_page: add new module#888

Draft
marcelsavegnago wants to merge 1 commit intoOCA:16.0from
Escodoo:16.0-add-helpdesk_mgmt_ticket_document_page
Draft

[16.0][ADD] helpdesk_mgmt_ticket_document_page: add new module#888
marcelsavegnago wants to merge 1 commit intoOCA:16.0from
Escodoo:16.0-add-helpdesk_mgmt_ticket_document_page

Conversation

@marcelsavegnago
Copy link
Copy Markdown
Member

This module extends the Helpdesk Management functionality to allow associating a document page with a helpdesk ticket.

The main purpose is to register which document was used to attend and handle the ticket, providing a reference for future similar cases and improving knowledge management within the helpdesk team.

This module adds a field to link a document page (from the Document Page module) to a ticket, allowing users to quickly access the documentation that was used to resolve the issue.

@marcelsavegnago marcelsavegnago marked this pull request as draft November 21, 2025 21:46
@marcelsavegnago marcelsavegnago force-pushed the 16.0-add-helpdesk_mgmt_ticket_document_page branch from b2e286a to 4418bcf Compare November 21, 2025 21:50
Copy link
Copy Markdown

@marcos-mendez marcos-mendez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Review -- Tests Failed

1. Root Cause

The test failure occurs because the database connection failed during the Odoo startup, likely due to misconfiguration or unavailability of the PostgreSQL service (postgres.runboat-infra.svc.cluster.local:5432). This is not a code issue but an environment or CI setup problem.

2. Suggested Fix

No code fix is required. The failure is due to infrastructure issues in the test environment. Ensure that:

  • PostgreSQL is running and accessible at postgres.runboat-infra.svc.cluster.local:5432
  • Network connectivity is established
  • Environment variables (like DB_HOST, DB_PORT) are correctly set for the test runner

3. Additional Code Issues

None identified in the provided diffs. The module structure and implementation follow OCA conventions:

  • Proper inheritance from helpdesk.ticket
  • Use of fields.Many2one with correct comodel
  • Addition of tracking and action method
  • No extensibility hooks flagged as incomplete

4. Test Improvements

To improve test coverage, add the following test cases using SavepointCase or TransactionCase patterns (as per OCA):

Test Cases to Add:

  1. Test document_page_id field assignment and retrieval:

    • Create a ticket and assign a document page
    • Verify that the field is correctly saved and retrieved
    • Ensure tracking logs are created when the field changes
  2. Test action_open_document_page method:

    • Test when document_page_id is set → should return a proper window action
    • Test when document_page_id is unset → should return False
  3. Test view integration:

    • Ensure that the new field appears in the ticket form view
    • Confirm that a smart button is present and functional (if implemented in XML)

Example Test Snippet:

def test_action_open_document_page(self):
    document_page = self.env['document.page'].create({'name': 'Test Doc'})
    ticket = self.env['helpdesk.ticket'].create({
        'name': 'Test Ticket',
        'document_page_id': document_page.id,
    })
    action = ticket.action_open_document_page()
    self.assertEqual(action['res_model'], 'document.page')
    self.assertEqual(action['res_id'], document_page.id)

Use SavepointCase for tests involving data persistence and TransactionCase for tests needing transaction rollback behavior.


⏰ PR Aging Alert

This PR by @marcelsavegnago has been open for 114 days (3 months).
🔴 Zero human reviews in 114 days. This contributor invested their time to improve this module. The PSC owes them at least a response — even a "needs changes" is better than silence.
💤 No activity for 114 days. Has this PR been forgotten?

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:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants