1.  On error

ERROR:dbpool:Unable to connect to template1: FATAL: password authentication failed for user …
first check that all local connections are authenticated with md5, not with ‘ident sameuser’ in postgre conf file pg_hba.conf, something like this:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local       all                       all                                                      md5

2. Never try to login to any database from openerp client before you create one (or previously created under openerp database is available)