← Back to team overview

openupgrade-drivers team mailing list archive

Re: [Question #226718]: Openupgrade Comparions Config: problem with connection

 

Question #226718 on OpenUpgrade Server changed:
https://answers.launchpad.net/openupgrade-server/+question/226718

Stefan Rijnhart (Therp) posted a new comment:
>
> we see it does not contain the standard openerp class function, like create, write, search etc.
> This is not good?
>

It is the model class that provides them, not the connection. However,
like I said earlier on, the classes in this library proxy unknown
methods over XMLRPC.

>
> Is openerplib not correctly installed?

In an interactive python session, see if what results you get> Here is a
sample session.

>>> import openerplib
>>> connection = openerplib.get_connection('localhost', database='mydb', login='admin', password='mypw', port=8069)
>>> user_model = connection.get_model('res.users')
>>> user_model.search([('login', '=', 'admin')])

[1]

>>> user_model.read([1])

[{'groups_id': [1, 2, 3, 5, 6, 7, 8, 9, 13, 14, 15, 16],
'sel_groups_1_2': 2, 'active': True, 'in_group_16': True, 'in_group_10':
False, 'in_group_11': False, 'in_group_12': False, 'id': 1,
'in_group_9': True, 'in_group_6': True, 'sel_groups_3': 3,
'new_password': '', 'in_group_5': True, 'company_id': [1, 'Your
Company'], 'action_id': [106, 'Home Page'], 'menu_id': [1, 'Menu'],
'sel_groups_7_8': 8, 'company_ids': [1], 'menu_tips': False, 'date':
'2013-04-23 11:10:33.514874', 'context_lang': 'en_US', 'password':
'mypw', 'context_tz': False, 'name': 'Administrator',
'sel_groups_13_14_15': 15, 'signature': 'Administrator', 'login':
'admin', 'in_group_4': False, 'user_email': False, 'view': 'extended'}]

-- 
You received this question notification because you are a member of
OpenUpgrade Drivers, which is an answer contact for OpenUpgrade Server.