Skip to content

[16.0][MIG] mgmtsystem_nonconformity_project: Migration to 16.0 - #748

Open
ChanGuaZzz wants to merge 34 commits into
OCA:16.0from
ChanGuaZzz:16.0-mig-mgmtsystem_nonconformity_project_try2
Open

[16.0][MIG] mgmtsystem_nonconformity_project: Migration to 16.0#748
ChanGuaZzz wants to merge 34 commits into
OCA:16.0from
ChanGuaZzz:16.0-mig-mgmtsystem_nonconformity_project_try2

Conversation

@ChanGuaZzz

Copy link
Copy Markdown

Module 'mgmtsystem_nonconformity_project' migration to 16.0.

@pedrobaeza can you review?

@pedrobaeza

Copy link
Copy Markdown
Member

I can mark it for the migration, but I don't use this module. Anyway, please check the red CI.

@ChanGuaZzz
ChanGuaZzz force-pushed the 16.0-mig-mgmtsystem_nonconformity_project_try2 branch from 5f9c02f to 755b16c Compare October 14, 2025 13:51
@ChanGuaZzz

Copy link
Copy Markdown
Author

@max3903 can you review please?

Comment thread mgmtsystem_nonconformity_project/views/mgmtsystem_nonconformity_project.xml Outdated
oca-travis and others added 9 commits February 12, 2026 18:29
Currently translated at 100.0% (5 of 5 strings)

Translation: management-system-12.0/management-system-12.0-mgmtsystem_nonconformity_project
Translate-URL: https://translation.odoo-community.org/projects/management-system-12-0/management-system-12-0-mgmtsystem_nonconformity_project/pt_BR/
Currently translated at 100.0% (5 of 5 strings)

Translation: management-system-12.0/management-system-12.0-mgmtsystem_nonconformity_project
Translate-URL: https://translation.odoo-community.org/projects/management-system-12-0/management-system-12-0-mgmtsystem_nonconformity_project/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: management-system-12.0/management-system-12.0-mgmtsystem_nonconformity_project
Translate-URL: https://translation.odoo-community.org/projects/management-system-12-0/management-system-12-0-mgmtsystem_nonconformity_project/
@ChanGuaZzz
ChanGuaZzz force-pushed the 16.0-mig-mgmtsystem_nonconformity_project_try2 branch from 554d298 to 27d220f Compare February 12, 2026 17:39
@ChanGuaZzz
ChanGuaZzz requested a review from cubells February 12, 2026 17:42

@cubells cubells left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

LGTM

Code review and test

@marcos-mendez marcos-mendez left a comment

Copy link
Copy Markdown

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 of the Test Failure

The test failure is caused by a database connection error during Odoo startup (Connection to the database failed). This is likely due to misconfiguration or an environment issue in the test runner, not directly related to the code changes in this PR.

2. Suggested Fix

No code fix is needed for the test failure itself, as it's an infrastructure issue. However, to ensure robustness, the module should be tested with proper database setup. The code changes in mgmtsystem_nonconformity_project/models/mgmtsystem_nonconformity_project.py are valid and follow OCA patterns.

3. Additional Code Issues

There are no real bugs in the code provided. The implementation correctly inherits from mgmtsystem.action, adds a new action_type selection field, and implements a computed field complete_name that respects the action type. The use of _compute_complete_name is appropriate and follows Odoo conventions.

4. Test Improvements

To improve test coverage for this module, consider adding the following test cases in a tests/test_mgmtsystem_nonconformity_project.py file using SavepointCase (as per OCA testing patterns):

from odoo.tests.common import SavepointCase

class TestMgmtsystemNonconformityProject(SavepointCase):
    @classmethod
    def setUpClass(cls):
        super().setUpClass()
        # Create a project
        cls.project = cls.env['project.project'].create({
            'name': 'Test Project',
        })
        # Create a nonconformity action
        cls.action = cls.env['mgmtsystem.action'].create({
            'name': 'Test Action',
            'action_type': 'action',
        })

    def test_action_type_selection(self):
        """Test that action_type field works correctly."""
        self.assertEqual(self.action.action_type, 'action')

    def test_complete_name_action_type(self):
        """Test complete_name computation for action type."""
        self.assertEqual(self.action.complete_name, 'Test Action')

    def test_complete_name_project_type(self):
        """Test complete_name computation for project type."""
        self.action.action_type = 'project'
        self.action.project_id = self.project
        self.assertEqual(self.action.complete_name, 'Test Project')

This test ensures:

  • The action_type selection works as expected
  • The complete_name field is computed correctly based on action type
  • The integration with project.project model works correctly

Use SavepointCase for tests involving data persistence and transactions, as recommended by OCA.


⏰ PR Aging Alert

This PR by @ChanGuaZzz has been open for 164 days (5 months).

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

@ChanGuaZzz
ChanGuaZzz force-pushed the 16.0-mig-mgmtsystem_nonconformity_project_try2 branch from 27d220f to 3075e5c Compare April 7, 2026 08:42
@ChanGuaZzz
ChanGuaZzz requested a review from marcos-mendez April 7, 2026 08:43

@marcos-mendez marcos-mendez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Apologies for the noise from the automated review — the bot incorrectly used "changes requested" status, which revoked the approved label that @cubells had already granted. I'm fixing the bot to use "comment" status instead, so this won't happen again.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.