Odoo Help

0
0
manali(odoo developer)
On 9/19/15, 12:42 AM

hi ashish, 

             this code is giving err, at the time of when function is running in cron,coz its not getting object.but same is working fine on odoo button.i created db by postgress in my code lyk below.

con = connect(dbname='postgres',user='user', host = 'localhost', password='password')

dbname = db_name

con.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)

cur = con.cursor()

_logger.error('db_name++++++++++++++++++++++++++++%s',dbname)

cur.execute('CREATE DATABASE ' + dbname)

cur.close()

its working!!!!!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 5/27/15, 7:23 AM
Seen: 2277 times
Last updated: 9/19/15, 12:42 AM