odoo连接数据库操作数据
#!/usr/bin/env python# _*_ coding: utf-8 _*_import psycopg2db = psycopg2.connect("dbname=linxerp user=postgres")vals = db.cursor()vals.execute("select id from ir_translation where value='产品接收证明单号: ';
·
#!/usr/bin/env python
# _*_ coding: utf-8 _*_
import psycopg2
db = psycopg2.connect("dbname=linxerp user=postgres")
vals = db.cursor()
vals.execute("select id from ir_translation where value='产品接收证明单号: ';")
tables = vals.fetchall()
for table in tables:
information = "update ir_translation set value='产品验收证明单号: ' where id="+str(table[0])+";"
print information
vals.execute(information)
更多推荐
所有评论(0)