I'm evaluating Odoo (v11) for use in our company and seem to be somewhat confused. If I do a csv import of my suppliers I can specify an External ID which is our current db's ID. But I can't seem to do that same thing via the API. Can I do this via the API? Here's a sample of my PHP code.
$id = $models->execute_kw(
$db,
$uid,
$password,
'res.partner', 'create',
array(
array(
'id' => $record[0],
'name' => $record[1],
'supplier' => true,
'customer' => false,
'street' => $record[2],
'street2' => $record[3],
'city' => $record[4],
'state_id' => $locality[0]['id'],
'zip' => $record[6],
'country_id' => $locality[0]['country_id'][0],
'phone' => $record[7],
'is_company' => true
)
)
);