{"record":{"id":"8e9110288928dcec","repo":"odoo/odoo","slug":"a-user-already-exists-with-theses-credentials-on-o","errorCode":null,"errorMessage":"A user already exists with theses credentials on our server. Please check your information.","messagePattern":"A user already exists with theses credentials on our server\\. Please check your information\\.","errorType":"exception","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"addons/account_edi_proxy_client/models/account_edi_proxy_user.py","lineNumber":195,"sourceCode":"        )\n        edi_identification = self._get_proxy_identification(company, proxy_type)\n        if edi_mode == 'demo':\n            # simulate registration\n            response = {'id_client': f'demo{company.id}{proxy_type}', 'refresh_token': 'demo'}\n        else:\n            try:\n                # b64encode returns a bytestring, we need it as a string\n                server_url = self._get_server_url(proxy_type, edi_mode)\n                response = self._make_request(\n                    f'{server_url}/iap/account_edi/2/create_user',\n                    params=self._get_iap_params(company, proxy_type, private_key_sudo))\n            except AccountEdiProxyError as e:\n                raise UserError(e.message)\n            if 'error' in response:\n                if response['error'] == 'A user already exists with this identification.':\n                    # Note: Peppol IAP errors weren't made properly with error code that are then translated on\n                    # Odoo side. We are for now forced to check the error message.\n                    raise UserError(_('A user already exists with theses credentials on our server. Please check your information.'))\n                raise UserError(response['error'])\n\n        return self.create({\n            'id_client': response['id_client'],\n            'company_id': company.id,\n            'proxy_type': proxy_type,\n            'edi_mode': edi_mode,\n            'edi_identification': edi_identification,\n            'private_key_id': private_key_sudo.id,\n            'refresh_token': response['refresh_token'],\n        })\n\n    def _renew_token(self):\n        ''' Request the proxy for a new refresh token.\n\n        Request to the proxy should be made with a refresh token that expire after 24h to avoid\n        that multiple database use the same credentials. When receiving an error for an expired refresh_token,\n        This method makes a request to get a new refresh token.","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/odoo/odoo/blob/1e661df964b1b264c9cef3ab28430d4785be3fda/addons/account_edi_proxy_client/models/account_edi_proxy_user.py#L177-L213","documentation":"UserError raised during proxy user creation (_create_user path in account_edi_proxy_client). The proxy answered create_user with the raw error string 'A user already exists with this identification.', meaning the edi_identification (company/participant identifier for that proxy_type) is already registered on the Odoo proxy server. Because Peppol IAP errors lack proper codes, Odoo matches the message text and raises this translated UserError.","triggerScenarios":"Registering an EDI proxy user (activating a webservice EDI format / Peppol onboarding) for an edi_identification that was already claimed — by a previous attempt on the same database, another database, or another party using the same identification (e.g. same VAT-based participant ID).","commonSituations":"Re-running Peppol/EDI registration after a partial first attempt; registering the same company identification on a test and a production database; another service/provider already claimed the participant identifier on the network.","solutions":["Check whether registration actually already succeeded on this database: an existing account.edi.proxy.user row for the same identification means you can just use it instead of re-creating.","If a previous attempt left a half-registered user, deactivate/remove it and retry, or use the resend/verification flow rather than create_user again.","If the identification was claimed by a different database/party, you must either reclaim it through the provider's verification process or use a different (correct) identification.","Verify the identification value itself (VAT/EAS combination) — a wrong but already-claimed identifier produces the same error."],"exampleFix":"# before: blind registration\nproxy_user = self._create_proxy_user(company, proxy_type)\n\n# after: reuse an existing registration when present\nexisting = self.search([\n    ('company_id', '=', company.id),\n    ('proxy_type', '=', proxy_type),\n    ('edi_identification', '=', edi_identification),\n])\nproxy_user = existing[:1] or self._create_proxy_user(company, proxy_type)","handlingStrategy":"validation","validationCode":"existing = env['account.edi.proxy.user'].search([\n    ('company_id', '=', company.id),\n    ('proxy_type', '=', proxy_type),\n])\nif existing:\n    return existing[:1]  # already registered; skip create_user","typeGuard":null,"tryCatchPattern":"from odoo.exceptions import UserError\ntry:\n    user = self._create_proxy_user(company, proxy_type)\nexcept UserError as e:\n    if 'already exists' in str(e):\n        return existing_proxy_user(company, proxy_type)\n    raise","preventionTips":["Search for an existing proxy user before triggering registration","Ensure the edi_identification is unique across databases and providers"],"tags":["odoo","edi","peppol","registration","duplicate"],"backgroundTag":null,"analyzedSha":"1e661df964b1b264c9cef3ab28430d4785be3fda","analyzedAt":"2026-08-15T05:22:16.142Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}