Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use Cursor in Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 539
    Comment on it

    When we use cursor first we have to move on Record Recordset and environment share the same cursor.And you can access cursor using like below code.

    def my_fun(self):
        cursor = self._cr
        # or
        self.env.cr

    Note- if you need to use the tcursor in your code (e.g. for a sql query and pg admin) you should check if it is available or not.

 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: