nicoorfi
5/24/2019 - 6:19 AM

Odoo sql fetch

cr.dictfetchall()

It will returns the list of dictionary.

[{'column1':'value_column1',}, {'column2':'value_column2',}]

cr.dictfetchone()

It will return dictionary (Single record)

{'column1':'value_column1',}

cr.fetchall()

It will returns the list of tuple.

[('value_column1'), ('value_column2'), ]

cr.fetchone()

It will returns the list of tuple.

('value_column1')