Skip to Content
Menu
This question has been flagged
1 Reply
2234 Views

Odoo 10. Importing some records from CSV into product.product (also tried product.template) via XMLRPC.

I can connect to the database ok and read records fine. 

 

models.execute_kw(db, uid, password,
'product.product',
'create', [{
'name': str(row['Part Number']),
'standard_price': row['Estimated Cost'],
}]
)

I look in Postgres and the records are being created but if I switch to Tree/List view from Kanban it says Connection Failed (popup) then Connection Restored. If I search for the product and try to open it that's when I see the form view couldn't be loaded. 

I tried including other fields (category, UOM) in the xmlrpc query but it doesn't matter. 

Avatar
Discard
Author Best Answer

It turns out I should have created the product.template first and then taken the id from that and created the product.product record. 

Avatar
Discard