Friday 21 February 2014

Odoo Example Flow

Complete Example:

Steps :

1. Create a new customer

2. Create a new product category and product

3. Add Minimum Stock Rules

4. Create a Bill of Material

5. Warehouse and locations

6. Create a sales quotation

7. Confirm the sales order

8. Run the scheduler

9. Change the purchase request and confirm it

10.Receive the products

11.Create the draft purchase invoice

12.Run the scheduler again

13.Start manufacturing

14.Deliver the goods to the customer and create draft sales invoice

15.Create the sales invoice

16.Confirm the purchase invoice

..Enjoy..

Thursday 20 February 2014

Know object/table size in Odoo database

Table Size in Odoo


Every time after backup we check how much space needed. Its necessary, but its normal if we have lots of space, but when database size continuously increase then we need to check which table/object increase your database size so fast.

So, in PostgreSQL if we want to see which table/object increase your database size then by following sql query, you can easily know which object consume how much.

[Query ]:
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind <> 'i'
AND nspname !~ '^pg_toast'
ORDER BY pg_total_relation_size(C.oid) DESC
LIMIT 100;


..Enjoy..