Trying to oerp.create records, getting cryptic error messages
I'm trying to follow the procedures given in the docs under Tutorials > Execute Queries https:/
I would like to create a user, so I've tried to do this:
import oerplib
oerp = oerplib.
u = oerp.login(
wb = oerp.create(
and the response is:
-------
RPCError Traceback (most recent call last)
<ipython-
----> 1 wb = oerp.create(
/usr/local/
427 :raise: :class:
428 """
--> 429 return self.execute(model, 'create', vals, context)
430
431 def read(self, model, ids, fields=None, context=None):
/usr/local/
248 model, method, *args)
249 except rpc.error.
--> 250 raise error.RPCError(
251
252 def execute_kw(self, model, method, args=None, kwargs=None):
RPCError: 2
I'm not really sure what RPCError 2 is supposed to mean. Is it possible to get more detailed error messages, like, am I missing fields? Are the values of fields not valid?
Some context for my question:
I'm new to OpenERP and I'm beginning to play around with openerp-client-lib and oerplib. I'm trying to import some data from a flat csv file, which contains information about contacts, partners and companies. Each row represents a contact, but based on the contents of the row it could also be that the contact is a partner, and is associated with a company. Contacts can also be associated with a sales person.
When importing this CSV in the web interface, I get validation errors that "No matching record found for name 'Foo Bar' in field 'Salesperson' at row 2. It does not seem possible to configure the import process to create a related record if no matching records exist, which is why I started to explore the idea of importing these records in a script.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- OERPLib Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask stephan stachurski for more information if necessary.