~vauxoo/addons-vauxoo/8.0-import_tax_tariff-dev-yani-rev-2

« back to all changes in this revision

Viewing changes to account_aged_partner_balance_vw/balance.py

  • Committer: Nhomar Hernandez
  • Date: 2013-04-19 20:33:12 UTC
  • mfrom: (542.1.314 addons-vauxoo)
  • Revision ID: nhomar@gmail.com-20130419203312-o35v7dn79l6vur0t
[MERGE - PEP8 AND V7-MIG] All migrated to V7 Just
improved osv.osv => osv.Model, osv.osv_memory => osv.TransientModel
import inside openerp.* enviroment
Erased class instansiation no necesarry anymore in V7
AUTOPEP8 run, Left PEP8 long lines manually.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
query_template = "SELECT %s FROM account_account"
2
 
columns = range(1,5)
 
2
columns = range(1, 5)
3
3
for i in columns:
4
 
    #sum_colums = '0 AS col%s'%(columns)
5
 
    #print map(lambda x: x, columns)
6
 
    cols_query = ', '.join( map(lambda x: i==x and 'SUM(debit+credit) AS col%s'%(x,) or '0 AS col%s'%(x,), columns) )
 
4
    # sum_colums = '0 AS col%s'%(columns)
 
5
    # print map(lambda x: x, columns)
 
6
    cols_query = ', '.join(map(lambda x: i == x and 'SUM(debit+credit) AS col%s' % (
 
7
        x,) or '0 AS col%s' % (x,), columns))
7
8
    dates_query = ' '
8
9
    dates_query += ' BETWEEN %s AND %s)'
9
 
    #query_full = query_template%(sum_colums)
10
 
#print query_full
 
10
    # query_full = query_template%(sum_colums)
 
11
# print query_full
11
12
 
12
 
#cfd_data_invoices_str = '\n'.join( map(lambda x: '|'.join(x) + '|', cfd_data_invoices) )
 
13
# cfd_data_invoices_str = '\n'.join( map(lambda x: '|'.join(x) + '|',
 
14
# cfd_data_invoices) )
13
15
 
14
16
for i in range(5)[::-1]:
15
 
    print i
 
 
b'\\ No newline at end of file'
 
17
    print i