Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Cr means a "cursor" which is the concept of SQL. The role of cursor(cr in Odoo) is to enumerate/iterate over each rows in result set one by one.
Hence cursor act like a looping statement to fetch data row by row basis
Enough of theory now , lets take an simple example of sql:
conn = psycopg2.connect(database="mydb", user="postgres", password="postgres", host="127.0.0.1", port="5432")
cur = conn.cursor() #cursor object is created
cur.execute('''select name,date_order from sale.order''')
rows = cur.fetchall()
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/25/14, 8:38 AM|
|Seen: 858 times|
|Last updated: 3/16/15, 8:10 AM|