Every object in OpenERP is based on OSV i.e Object Service and this service implements full Object-Relational Mapping enabling developers not to worry for the simple SQL operations.
In OpenERP, we have such ORM methods that are very useful. Here are the few basic methods:
- read(cr, uid, ids, fields=None, context=None): returns a list of dictionaries with field values.
- res = self.read(cr, uid, [5,6],['name', 'partner_id'])
- print 'Partner:', res[0]['partner_id']
- write(cr, uid, ids, values, context=None): updates a record with provided values.
- search(cr, uid, values, args, offset=0, limit=None, order=None, context=None, count=False): returns list of ids (tuple) on search criteria
As it is a technology forum, so here you can also ask technology specific questions and can take part in these forums by answering some questions and increase your knowledge related to HTML, Java, Javascript, Android, iOS Developer forum etc.
No comments:
Post a Comment