Skip to Content
Menú
This question has been flagged
3 Respostes
5333 Vistes

i need read an create project, tasks and miliestones, and load time sheet i try this oerp.execute('project.project', 'search', [('name', '=', "XXXXX")])

my error is this

ERROR openrp2 openerp.netsvc: Object Error Object project.project doesn't exist

how get the name model?

Avatar
Descartar
Autor Best Answer

I try migrete from redmine to openerp the projects my code it's

import oerplib

XMLRPC server configuration (NETRPC is also supported)

SERVER = 'localhost' PROTOCOL = 'xmlrpc' PORT = 8069

Name of the OpenERP database to use

DATABASE = 'openrp2'

USER = 'admin' PASSWORD = 'admin'

oerp = oerplib.OERP(server=SERVER,database=DATABASE,protocol=PROTOCOL, port=PORT,) oerp.login(USER, PASSWORD) oerp.execute('project.project', 'search', [('name', '=',"xxx")])

ERROR openrp2 openerp.netsvc: Object Error Object project.project doesn't exist

Avatar
Descartar
Best Answer

The Model Name you may known at Settings/Customization/Database Structure/Models and type on "Model description" the word "project".

Or

In the "About" click at "Activate the developper mode", then, in the form view for Project or Task put Pointer over field or FieldLabel and you see the Field Name and Object Name (Model Name).

Regards!

Avatar
Descartar
Autor

import oerplib XMLRPC server configuration (NETRPC is also supported)

SERVER = 'localhost' PROTOCOL = 'xmlrpc' PORT = 8069 Name of the OpenERP database to use

DATABASE = 'openrp2'

USER = 'admin' PASSWORD = 'admin'

oerp = oerplib.OERP(server=SERVER,database=DATABASE,protocol=PROTOCOL, port=PORT,) oerp.login(USER, PASSWORD) oerp.execute('project.project', 'search', [('name', '=',"xxx")])

ERROR openrp2 openerp.netsvc: Object Error Object project.project doesn't exist this is my error

Best Answer

I do not exactly know the context of your script. But here I have posted an example python script which uses XMLRPC.

There you can see how to use the XMLRPC functions.

Avatar
Descartar