Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to check company unique or not in openerp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 182
    Comment on it

    To configure and check weather the company is single or double in openerp you have to write this function in your own module in .py file,

    def check&_companyuniq(self, cr, uid, ids, context=None):
            sr_id =,uid,[],context=context)
            lines = self.browse(cr, uid, sr_id, context=context)
            company = []
            for l in lines:
                if in company:
                    return False
                if not in company:
            return True
        _constraints = [
            (check_company_uniq, 'Only One Followup by Company.',['company_id'] )

 0 Comment(s)

Sign In

Sign up using

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: