Skip to content
Snippets Groups Projects
user avatar
aliya authored
Currently, when a journal is created during import, we just use the journal name as the code.
However, that gets truncated to 5 characters on create, which can conflict with existing journals.
The import should be as flexible as possible, as it's better to let users import and fix things
after the import rather than debug the import file.
- If there is a journal with a shortcode that matches the truncated name of the new journal,
  just use the existing journal (enterprise PR)
- If the shortcode conflict arises within the imported file
  (so the journals don't exist before the import), keep track of the codes in `vals_list`.
  The `get_next_bank_cash_default_code` is modified to avoid duplicating code.

See also odoo/enterprise#46101

closes odoo/odoo#132715

Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
1b1ee1b0
History
Name Last commit Last update