Odoo 10
Hey! I create the contact using "res.partner" model and I get id as example "1246".
$customer_id = $model->execute_kw($db, $uid, $password,
'res.partner', 'create',
[
[
'name' => 'test3 test',
'phone' => '22-22',
'city' => 'city',
'street' => 'street',
'street2' => 'street2',
'zip' => '222',
'email' => 'test@test.com',
'supplier' => false,
'type' => 'contact',
'is_company' => false,
'customer' => true,
'active' => true,
]
]
); // id 1246
So, now I want to create different address for billing and invoice. I try to create the new user like this:
$customer_id = $model->execute_kw($db, $uid, $password,
'res.partner', 'create',
[
[
'parent_name' => 'test3 test',
'name' => 'test3 test',
'phone' => '22-22',
'city' => 'invoice city',
'street' => 'invoice street',
'street2' => 'invoice street2',
'zip' => '222',
'email' => 'invoice@invoice.com',
'supplier' => false,
'type' => 'invoice',
'is_company' => false,
'customer' => true,
'active' => true,
'commercial_partner_id' => '1246',
'parent_id' => '1246',
]
]
);
But I get an error always:
Array
(
[faultCode] => 4
[faultString] => (u"Database fetch misses ids ('1246') and has extra ids (1246), may be caused by a type incoherence in a previous request", None)
)
What Should I do?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
3282
Views
the id must be a number : 1246 without quotes
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up