TIP: You can type at any time to perform a new search.
Accounting Sequence - Latam Documents
l10n_latam_account_sequence · odoo/odoo
Security findings
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE account_move SET name = SUBSTRING(account_move.name, 1, strpos(account_move.name::varchar, ' ('::varchar) -1 ) WHERE l10n_latam_document_type_id IS NOT NULL AND account_move.name LIKE '% (%)' AND move_type IN ('in_invoice', 'in_refund', 'in_receipt');` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `WITH duplicated_sequence AS ( SELECT name, commercial_partner_id, l10n_latam_document_type_id, state FROM account_move WHERE state = 'posted' AND name != '/' AND (l10n_latam_document_type_id IS NOT NULL AND move_type IN ('in_invoice', 'in_refund', 'in_receipt')) GROUP BY commercial_partner_id, l10n_latam_document_type_id, name, state HAVING COUNT(*) > 1 ), to_update AS ( SELECT move.id, move.name, move.state, move.date, row_number() OVER(PARTITION BY move.name, move.commercial_partner_id, move.l10n_latam_document_type_id ORDER BY move.name, move.commercial_partner_id, move.l10n_latam_document_type_id, move.date) AS row_seq FROM duplicated_sequence JOIN account_move move ON move.name = duplicated_sequence.name AND move.commercial_partner_id = duplicated_sequence.commercial_partner_id AND move.l10n_latam_document_type_id = duplicated_sequence.l10n_latam_document_type_id AND move.state = duplicated_sequence.state ), new_vals AS ( SELECT id, name || ' (' || (row_seq-1)::text || ')' AS name FROM to_update WHERE row_seq > 1 ) UPDATE account_move SET name = new_vals.name FROM new_vals WHERE account_move.id = new_vals.id;` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- odoo/odoo · module folder
- Module version
- 1.0
- Category
- Hidden
- Folder size
- 0.0 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- Yes
- Website
- None
- Last tracking update
- 2026-08-07 05:42:59
- Authors
- Maintainers
- None
- Committers
- Katherine Zaoral, william-andre, Jinane Maksoud
Code Analysis
Views touched (0)
No views found for this module.
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (1)
New fields (0)
No new fields.
Public methods (0)No public methods.