Thursday 3 December 2015

ORM Methods in OpenERP


orm methods in openerp.jpg
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:
  1. read(cr, uid, ids, fields=None, context=None): returns a list of dictionaries with field values.
    1. res = self.read(cr, uid, [5,6],['name', 'partner_id'])
    2. print 'Partner:', res[0]['partner_id']
  2. write(cr, uid, ids, values, context=None): updates a record with provided values.
  3. search(cr, uid, values, args, offset=0, limit=None, order=None, context=None, count=False): returns list of ids (tuple) on search criteria
For full blog about ORM Methods in OpenERP Visit Findnerd.
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