Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Es necesario preservar el filtrado por permisos para evitar errores de acceso al guardar contactos.
1 open finding
What changed in this PR
Restablece el seguimiento estándar de contactos en el chatter y permite añadir campos desde Campos de Estados.
Cambios:
- Conserva los campos registrados por Odoo y elimina el filtro de
_message_track. - Muestra «Cambios?» calculado y de solo lectura para campos con seguimiento nativo.
- Añade pruebas de regresión y traducciones al español.
| File | Description |
|---|---|
| partner_state/views/res_partner_state_field_views.xml | Presenta la columna calculada con edición condicionada. |
| partner_state/tests/test_partner_state_tracking.py | Comprueba seguimiento estándar, adicional y columna calculada. |
| partner_state/tests/__init__.py | Registra las nuevas pruebas. |
| partner_state/models/res_partner.py | Combina seguimiento estándar y configurado. |
| partner_state/models/res_partner_state_field.py | Calcula el seguimiento visible y gestiona su edición. |
| partner_state/i18n/es.po | Traduce la columna y su ayuda. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ced-adhoc
force-pushed
the
18.0-h-126800-ced
branch
2 times, most recently
from
October 19, 2026 12:36
b9e5314 to
f0576b9
Compare
"Changes?" now only adds fields to the chatter. Fields that Odoo tracks by default are always tracked, with or without lines in Partner State Fields. Before, the _message_track override only logged the fields with "Changes?", so a database without lines logged no partner change. The "Changes?" column now shows a computed field: it is checked and read only for fields with native tracking, and it writes the stored value for the other fields. Existing lines show the right value without a migration. The README explains the options of Partner State Fields and lists the fields that Odoo tracks on contacts by default.
ced-adhoc
force-pushed
the
18.0-h-126800-ced
branch
from
October 19, 2026 13:12
f0576b9 to
2f3dc17
Compare
Contributor
|
@roboadhoc r+ bump |
roboadhoc
pushed a commit
that referenced
this pull request
Oct 20, 2026
"Changes?" now only adds fields to the chatter. Fields that Odoo tracks by default are always tracked, with or without lines in Partner State Fields. Before, the _message_track override only logged the fields with "Changes?", so a database without lines logged no partner change. The "Changes?" column now shows a computed field: it is checked and read only for fields with native tracking, and it writes the stored value for the other fields. Existing lines show the right value without a migration. The README explains the options of Partner State Fields and lists the fields that Odoo tracks on contacts by default. closes #153 Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
roboadhoc
added a commit
that referenced
this pull request
Oct 20, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Ticket: https://www.adhoc.inc/odoo/helpdesk.ticket/126800
Qué cambia
_track_get_fields: arranca de lo que Odoo registra por defecto y suma los campos con Cambios? (filtrados confields_get(), como hacemail). Nunca saca un campo estándar._message_track. Desde [FIX]partner_state: log to chatter fields marked with changes=True #144 dejaba pasar al chatter solo los campos con Cambios?, así que una base sin líneas en Campos de Estados no registraba ningún cambio de contactos.chatter_tracking). Si el campo elegido tiene seguimiento nativo (ir.model.fields.tracking), aparece tildado y de solo lectura. En los demás campos lee y escribechanges, como antes. Las líneas existentes se ven bien sin script de migración.El paso a Potencial (Seguir?) no cambia: lo maneja
write()concheck_fields("track").Cómo se probó
tests/test_partner_state_tracking.py: sin líneas se registra un campo estándar; con Cambios? se registra un campo que Odoo no registra y un contacto aprobado sigue aprobado; sin Cambios? un campo estándar se sigue registrando; la columna queda tildada en un campo estándar y escribechangesen otro.0 failed, 0 error(s) of 6 tests, sin warnings.changes = False; cambiar el email de un contacto deja registro en el chatter. Sin errores de consola, JS ni HTTP.19.0
El forward-port va a tener conflicto en
_track_get_fields, porque en 19.0 el método es distinto (no tiene_message_track). Al resolverlo conviene limpiar elwrite()de 19.0, que armainitial_valuesystate_fields_to_tracksin usarlos.