Skip to content

Revert "[IMP] mgmtsystem_nonconformity: Show non conformities on all kind of views"#759

Draft
pablohmontenegro wants to merge 1 commit into
OCA:16.0from
adhoc-dev:16.0-h-71104-pam-2
Draft

Revert "[IMP] mgmtsystem_nonconformity: Show non conformities on all kind of views"#759
pablohmontenegro wants to merge 1 commit into
OCA:16.0from
adhoc-dev:16.0-h-71104-pam-2

Conversation

@pablohmontenegro

@pablohmontenegro pablohmontenegro commented Nov 18, 2025

Copy link
Copy Markdown

This reverts commit aa68f36.
Ticket 71104: revertimos este commit porque da error al entrar en diario de bancos donde hay extractos.
Este pr reemplaza a #571 ya que #571 estaba agregado a nuestra imagen pero acá https://adhoc.adhoc.ar/odoo/discuss/helpdesk.ticket/103330/helpdesk.ticket/103226/adhoc.module.repository/454 en la nota 17/11/2025 10:29 am Vib me dijo que daba conflicto ( https://adhoc.adhoc.ar/mail/message/13163157 ). Como el pr está cerrado y no se permite reabrirlo para corregir conflictos tuve que crear este nuevo pr con el revert.

@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 due to a database connection error, likely caused by the removal of frontend assets and action definitions that were required for proper UI interaction during testing. Specifically, the removal of open_mgmtsystem_nonconformity_thread_list action and associated JS components breaks expected behavior in test scenarios involving chatter topbar interactions.


2. Suggested Fix

  • Re-add the open_mgmtsystem_nonconformity_thread_list action in mgmtsystem_nonconformity/views/mgmtsystem_nonconformity.xml to ensure backward compatibility with existing UI logic.
  • Restore the JS component logic in mgmtsystem_nonconformity/static/src/components/chatter_topbar/chatter_topbar.esm.js or refactor to use a supported Odoo mechanism for handling chatter actions.
  • Ensure res_model and res_id fields are correctly populated when creating nonconformities from related models — this may require reintroducing logic to infer res_model and res_id from context, or ensure that callers properly set them.

3. Additional Code Issues

  • Missing context handling in reference field: The reference field was changed from a default with context-aware logic to a simple field. If this field is used in views or reports, it may now be blank where it was previously auto-populated.
  • Removal of MailThread mixin: The removal of the MailThread class that added non_conformity_count and modified views for chatter integration is likely to break UI rendering in some cases, especially for forms with chatter and viewer groups.
  • Potential regression in res_model and res_id handling: Without the _default_reference() method or logic to set res_model and res_id, creating nonconformities from related records may not work as expected unless explicitly handled by the calling code.

4. Test Improvements

To ensure robustness and catch regressions:

  • Add a TransactionCase test to verify that nonconformities created from a related model (e.g., project.project) correctly populate res_model and res_id.
  • Add a SavepointCase test to ensure the open_mgmtsystem_nonconformity_thread_list action is functional and correctly filters nonconformities based on res_model and res_id.
  • Add a test case for reference field behavior to ensure it is correctly set when active_model and active_id are in the context.
  • Test UI behavior: Add a test to simulate chatter topbar click and verify that it correctly opens the nonconformity list with proper context.

These tests should be tagged with @tag('post_install', 'functional') to ensure they run in the appropriate environment.


⏰ PR Aging Alert

This PR by @pablohmontenegro has been open for 117 days (3 months).
🔴 Zero human reviews in 117 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 117 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

@max3903 max3903 added this to the 16.0 milestone May 2, 2026
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.

3 participants