Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to search name field in OpenERP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 565
    Comment on it

    To install account module and searching by name in account module in customers invoice form and get results in particular name use this code in account_invoice file in account module in openerp.


    Code given below:-

    def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
            if not args:
                args = []
            if context is None:
                context = {}
            ids = []
            if name:
                ids = self.search(cr, user, [('number','=',name)] + args, limit=limit, context=context)
            if not ids:
                ids = self.search(cr, user, [('name',operator,name)] + args, limit=limit, context=context)
            return self.name_get(cr, user, ids, context)
    

 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: