Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to read records in OpenERP/Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 151
    Comment on it

    In record data is accessible via the read() method, which takes a list of ids (as returned by search()) and optionally a list of fields to fetch.

    ids = models.execute_kw(db, uid, password,
        'res.partner', 'search',
        [[['is_company', '=', True], ['customer', '=', True]]],
        {'limit': 1})
    [record] = models.execute_kw(db, uid, password,
        'res.partner', 'read', [ids])
    # count the number of fields fetched by default
    len(record)

    Note- id field is not requested, it is always returned.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: