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.
OpenERP does not provide a mechanism specifically to log SQL queries, but it has a generic logging feature. By adding
--log-level=debug_sql to the command line used to launch OpenERP it will print the normal debugging messages + the sql commands. You can redirect that output to a file if you want.
You could also configure PostgreSQL to log the queries. I would personally prefer that solution if the goal is to optimize the database usage.