How can I get access to a Cursor object from within a mako report? I know I can use the pooler to get a new cursor object (Like in the code below) but as far as I know you have to hard code the database name which is not ideal...
db, pool = pooler.get_db_and_pool(db_name)
cr = db.cursor()
(Note for people reading this: make sure you commit() the transaction and close() the cursor after using it! Like in this example)
Did you try self.cr ?
Yup: AttributeError: "Field 'cr' does not exist in object 'browse_record(sale.order, 185)'"