Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
5325 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona
Autore

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

Risposta migliore

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
Abbandona