Repository navigation
Fork Sync Branch 19.0 - #32
Merged
Merged
Conversation
…liation on import The import runs the whole automatic reconciliation of the cron on the new lines, which also matches open invoices and payments of the partner by amount, and there was no way to turn it off. Customers that keep the cron off because a paid invoice triggers their own processes got invoices paid by the import itself. It is now a company setting (Reconcile on Statement Import), on by default. closes #509 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
Add the es translation for the "Select a field..." placeholder shown in the empty field selector (automation rules, server actions). closes #513 Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
…e on import setting closes #516 Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
Cada mensaje nuevo en un chat de Discuss hace que Odoo 18 lea todos los mensajes de ese chat, una vez por cada pestaña abierta de cada participante, solo para saber cuál es el último. En chats de muchos años (decenas de miles de mensajes) eso pasa a ser lo que más SQL consume en la base y la frena. Este PR hace que lea solo el último mensaje. Tarea: https://www.adhoc.inc/odoo/project.task/79479 ## Qué pasa en upstream - El cliente web llama a `discuss.channel.channel_fetched` cada vez que llega un mensaje nuevo por el bus a un canal que no es de tipo `channel` (`mail/static/src/discuss/core/common/discuss_core_common_service.js`). Lo llama cada pestaña de cada miembro. - `channel_fetched` hace `channel.message_ids.ids[0]`: resuelve el one2many entero, con el chequeo de acceso de `mail.message._search`, para quedarse con el primer id. - El filtro `channel_type in {chat, whatsapp}` está después de esa carga, así que en los grupos también lee todo el canal y después lo descarta. - En `master` Odoo sacó `channel_fetched` y el campo `fetched_message_id`. En 18.0 y 19.0 sigue igual. ## Qué cambia Override de `channel_fetched` en `mail_ux`: - chequea `channel_type` antes de buscar nada; - busca el último mensaje con el mismo dominio que `message_ids` (`model`, `res_id`, `message_type != user_notification`), `order="id desc"` y `limit=1`, como el usuario actual. Es lo mismo que hace `master` con `_search(..., order="id desc", limit=1)`. El resto del método (búsqueda del miembro, `UPDATE ... SKIP LOCKED` y la notificación por bus) queda igual que upstream. ## Medición En la base más afectada de la flota, `channel_fetched` era el 54,6% del tiempo SQL de un día hábil: 8.151 llamadas a 602 ms, y la consulta devolvía en promedio 15.256 filas por llamada. En la flota productiva de 18 y 19, 102 bases llamaron a `channel_fetched` ese día y en 77 cuesta menos de 50 ms por llamada. ## Pruebas - `test_chat_fetched_reads_only_last_message`: en un chat con varios mensajes y un `user_notification` al final, `fetched_message_id` queda en el último mensaje visible y `mail.message._search` se llama una sola vez, con `limit=1`. Con el código de upstream falla, porque `message_ids` busca sin límite. - `test_group_fetched_is_skipped`: en un grupo no se busca ningún mensaje. - Prueba manual pendiente en una base de test con chats grandes: el tiempo de `channel_fetched` en el log de acceso tiene que bajar a pocos ms, sin depender del tamaño del chat. Después del merge sale el forward-port a 19.0, donde el método es igual. closes #503 Forward-port-of: #501 Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar> Signed-off-by: Andrés Zacchino <az@adhoc.inc>
run() committed the job work, its finish() and the user notification together. When the notification failed (e.g. a serialization failure on discuss_channel_member), the rollback discarded the work of a job that had already finished, and the retry ran it again. run() now commits the job work and finish() before notifying. The notification runs in a savepoint and an error there is only logged, so a finished job is not rolled back nor run again. The runner change of the original commit (one job per cron run) is not forward-ported: 19.0 already processes one job per run and re-triggers the runner while enqueued jobs remain. closes #519 X-original-commit: b074ac1 Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar> Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
sireko
approved these changes
Nov 16, 2026
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.
No description provided.