Purchase:

bugfix creating invoices: the journal of the invoice was not good

bzr revid: pinky-f3c27489ecabe5985ef3610c2ab7016bef801291
This commit is contained in:
pinky 2007-02-06 14:53:39 +00:00
parent efbdb2e75f
commit 63f1614bfe
1 changed files with 12 additions and 12 deletions

View File

@ -48,9 +48,9 @@ class fake_cursor:
self.con = con
self.dbname = dbname
def execute_dont_run(self,*args):
if not fake_cursor.nbr % 100:
print 'sql: ',fake_cursor.nbr
def execute(self,*args):
if not fake_cursor.nbr % 1:
print 'sql: ',fake_cursor.nbr, args
res = re.match('^select.* from ([a-zA-Z_]+) .*$', args[0], re.I)
if res:
fake_cursor._tables.setdefault(res.group(1), 0)
@ -62,15 +62,15 @@ class fake_cursor:
# else:
# print 'sql: ',fake_cursor.nbr, args[0]
if not fake_cursor.nbr % 5000:
ct = []
for t,c in fake_cursor._tables.items():
ct.append([c,t])
ct.sort()
ct.reverse()
print 'After %d queries' % (fake_cursor.nbr,)
for line in ct[:50]:
print ' %s: %d' % (line[1], line[0])
#if not fake_cursor.nbr % 5000:
# ct = []
# for t,c in fake_cursor._tables.items():
# ct.append([c,t])
# ct.sort()
# ct.reverse()
# print 'After %d queries' % (fake_cursor.nbr,)
# for line in ct[:50]:
# print ' %s: %d' % (line[1], line[0])
#if len(args)>1:
# print 'sql: ',fake_cursor.nbr, args[0], args[1]