How to access archived data in Odoo

  • 27 October 2023
  • 0 replies
  • 10 views

Userlevel 2
Badge

In Odoo, archived data refers to records or information that have been intentionally moved to an archive state, typically to declutter or reduce the visibility of these records in the main user interface.  

Certain tables in Odoo store archived data, such as the project_jobs table, res_users, res_user_deletion, account_journal, account_tax, and more. These tables contain a boolean column called "active," which by default is set to "false" when data is archived.  

When our driver initiates a call to retrieve these tables, it inherently retrieves only active records, omitting archived data by default. This means that you cannot pull archived data out of the box. 

In order to retrieve all the records from your Odoo tables, you can use the following queries: 

 

SELECT * FROM  [TableName] WHERE active = True OR active = False 

 

SELECT * FROM  [TableName] WHERE active IN (True, False) 

 

The query above will fetch all the data, including archived and non-archived. 


This topic has been closed for comments