[email protected] wrote: > import psycopg2 > db = psycopg2.connect("host= 127.0.0.1 user=openerp password=openerp > dbname=test") > cr=db.cursor() > cr.execute('select name,certificate from ir_module_module where not > certificate is null order by name ') > for (name,certificate) in cr.fetchall(): > print name,certificate > if not certificate[:2]== '00': > cr.execute("update ir_module_module set > certificate='00"+str(certificate)+"' where name ='"+name+"'") > db.commit() > > for me after apply this code it's ok > > ------------------------ > Eric Vernichon > http://www.vernichon.fr > > > > > -------------------- m2f -------------------- > > -- > http://www.openobject.com/forum/viewtopic.php?p=29948#29948 > > -------------------- m2f -------------------- > > > _______________________________________________ > Tinyerp-users mailing list > http://tiny.be/mailman/listinfo/tinyerp-users
Or, easier, just run this SQL query on your database: update ir_module_module set certificate = '00' || certificate where substr(certificate, 0, 3) <> '00'; -- Christophe Simonis Developer OpenERP - Tiny sprl Chaussée de Namur, 40 B-1367 Gérompont Tel: +32.81.81.37.00 Web: http://openerp.com Blog: http://christophe-simonis-at-tiny.blogspot.com Tiny Footprint + Tiny Investment + Tiny Learning Curve = HUGE ADVANTAGE! -- Marty Tennison, 2006
begin:vcard fn:Christophe Simonis n:Simonis;Christophe org:Tiny SPRLU adr;quoted-printable;quoted-printable:;;Chauss=C3=A9e de Namur 40;Grand Rosi=C3=A8re;;1367;Belgique email;internet:[email protected] title:Developer tel;work:+3281813700 x-mozilla-html:FALSE url:http://tiny.be version:2.1 end:vcard
_______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman/listinfo/tinyerp-users
