Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
5321 Tampilan

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
Buang
Penulis Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Jawaban Terbai

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
Buang