Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2447 Vistas

Hi,

There have been a lot back and forth with importing Contacts, due to the State_id and country_id showing errors such,  No matching records found for the following name in field State: "Accra at multiple rows." Meanwhile the Country id and State id have entered at the configuration menu - localization, in Odoo V17. Kindly help with a solution for easy and smooth importation of contacts. Thank you.

Avatar
Descartar
Mejor respuesta
  1. Verify Existing State and Country Records:
    • Navigate to Contacts > Configuration > Localization > Countries.
    • Select the relevant country (e.g., Ghana) and check the associated states.
    • Ensure that 'Accra' is listed as a state under the correct country.
  2. Add Missing States:
    • If 'Accra' or any other required state is missing, add it manually:
      • Click on Create within the States menu.
      • Enter the State Name, Code, and select the appropriate Country.
    • Ensure that the state names and codes match those in your import file.
  3. Use External IDs for Importing:
    • To avoid name mismatches, use External IDs when importing:
      • Export the existing states and countries to obtain their External IDs:
        • Go to Contacts > Configuration > Localization > Countries.
        • Select the countries and states you need, then click on Action > Export.
        • Include the fields ID, Name, and any other relevant fields.
      • In your import file, use these External IDs in the state_id/id and country_id/id columns.
  4. Ensure Consistent Data Formatting:
    • Make sure that the state and country names in your import file exactly match those in Odoo.
    • Avoid leading or trailing spaces, and ensure consistent capitalization.
  5. Test the Import:
    • Before importing the entire dataset, test with a small sample to ensure that the mappings are correct.
    • Use the Test button during the import process to identify potential issues without committing the data.

Additional Tips:

  • Use Import-Compatible Exports:
    • When exporting data for reference, select the option "I want to update data (import-compatible export)". This ensures that the exported file is formatted correctly for re-importing.
  • Consult Odoo Documentation:

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
1268
1
mar 25
1461
1
feb 25
2081
2
feb 25
2576
2
feb 25
2091