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.79k
    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:

    1. def name_get(self, cr, user, ids, context={}):
    2. if not len(ids):
    3. return []
    4. res = []
    5. for r in self.read(cr, user, ids, [name,zip,city]):
    6. addr = str(r[name] or )
    7. if r[name] and (r[zip] or r[city]):
    8. addr += ,
    9. addr += str(r[zip] or ) + + str(r[city] or )
    10. res.append((r[id], addr))
    11. 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
Reset Password
Fill out the form below and reset your password: