1. Open EDI > Mapping Tables. Select the Odoo model, then set Type to Incoming for imports or Outgoing for exports.
2. Enable Main Table for the parent record. For example, map a purchase order or sales order as the main table and configure a separate subtable for its order lines. Leave Main Table disabled on the subtable.
3. Set the file type according to whether the XML contains one record or multiple records, then enter the XML header. For an incoming mapping that needs to find an existing record, specify the XML element or comma-separated elements in “Search record from this value.”
4. Map each SPS XML element to its corresponding Odoo field. Use a subtable for repeating lines and, where applicable, address details. For relational fields such as contacts or products, choose the lookup field where the mapping requires it.
5. Configure document-specific options as needed. Incoming sales order mappings can set a default delivery carrier and, if desired, confirm an order after a successful import. Outgoing mappings can use fixed values, required fields, date-only values, record counts, and character limits where the partner’s document requires them.
6. On outgoing mappings, select the trading partner, FTP or SFTP server type, and destination directory. Partners that use the same XML structure and field mappings can share a mapping. Create separate mappings when their requirements differ.
Example SPS mapping tables




