Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use name_get method in OpenERP(Odoo)?

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 1.78k
    Comment on it

    If you want to use name_get method in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file:

    def name_get(self, cr, user, ids, context={}):
    if not len(ids):
    return []
    res = []
    for r in self.read(cr, user, ids, [name,zip,city]):
    addr = str(r[name] or )
    if r[name] and (r[zip] or r[city]):
    addr += , 
    addr += str(r[zip] or ) +   + str(r[city] or )
    res.append((r[id], addr))
    return res

    Note- With the help of this code we will find the get_method.

 1 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: