Solve the problem of soldeinit field of wizard.
bzr revid: vinusoft85@gmail.com-20090529094717-emgztdcih993amj2
This commit is contained in:
@@ -322,8 +322,8 @@ class general_ledger_landscape(rml_parse.rml_parse):
|
||||
## Add solde init to the result
|
||||
#
|
||||
sum_debit = self.cr.fetchone()[0] or 0.0
|
||||
if form['soldeinit']:
|
||||
sum_debit += account.init_debit
|
||||
#if form['soldeinit']:
|
||||
sum_debit += account.init_debit
|
||||
#
|
||||
##
|
||||
return sum_debit
|
||||
@@ -336,8 +336,8 @@ class general_ledger_landscape(rml_parse.rml_parse):
|
||||
## Add solde init to the result
|
||||
#
|
||||
sum_credit = self.cr.fetchone()[0] or 0.0
|
||||
if form['soldeinit']:
|
||||
sum_credit += account.init_credit
|
||||
#if form['soldeinit']:
|
||||
sum_credit += account.init_credit
|
||||
#
|
||||
##
|
||||
|
||||
@@ -348,8 +348,8 @@ class general_ledger_landscape(rml_parse.rml_parse):
|
||||
"FROM account_move_line l "\
|
||||
"WHERE l.account_id = %s AND %s"%(account.id,self.query))
|
||||
sum_solde = self.cr.fetchone()[0] or 0.0
|
||||
if form['soldeinit']:
|
||||
sum_solde += account.init_debit - account.init_credit
|
||||
#if form['soldeinit'] != 0:
|
||||
sum_solde += account.init_debit - account.init_credit
|
||||
|
||||
return sum_solde
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ period_fields = {
|
||||
'sortbydate':{'string':"Sort by:",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Movement')]},
|
||||
'display_account':{'string':"Display accounts ",'type':'selection','selection':[('bal_mouvement','With movements'),('bal_all','All'),('bal_solde','With balance is not equal to 0')]},
|
||||
'landscape':{'string':"Landscape Mode",'type':'boolean'},
|
||||
'soldeinit':{'string':"Include initial balances",'type':'boolean'},
|
||||
# 'soldeinit':{'string':"Include initial balances",'type':'boolean'},
|
||||
'amount_currency':{'string':"With Currency",'type':'boolean'},
|
||||
'date_from': {'string':" Start date",'type':'date','required':True ,'default': lambda *a: time.strftime('%Y-01-01')},
|
||||
'date_to': {'string':"End date",'type':'date','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d')},
|
||||
|
||||
Reference in New Issue
Block a user