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:
Laurent Smet (las) <las@odoo.com>
Name | Last commit | Last update |
---|