The duplication (or recreated) accounts is when upgrade the account chart without other extra modules (only account module and "Minimal Account Chart" option)
The problem is in template2account after upgrade method [1], that not return template ID 23 and will be create a new account in create_account method.
Example template2account values after update_account() and before create_account() in [1]:
>>> template2account
{22: 1, 24: 4, 25: 6, 26: 3, 27: 2, 28: 7}
ID 23 is missing because is mark "template_override". Same as "active" field in previous versions.
[1] https://bitbucket.org/tryton/account/src/7ebad68e53e09cb9388123574048e1f76f722c79/account.py#lines-2322 |