odoo连接数据库操作数据

来源:互联网 发布:python netsnmp 编辑:程序博客网 时间:2024/06/07 19:11
#!/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='产品接收证明单号: ';")tables = vals.fetchall()for table in tables:    information = "update ir_translation set value='产品验收证明单号: ' where id="+str(table[0])+";"    print information    vals.execute(information)
0 0
原创粉丝点击