[FIX] bug 918857, ademas de adecuar las cabeceras de los reportes a la nueva ley
parent
bc64a38e6f
commit
50803f27e9
|
@ -53,8 +53,8 @@ class account_balance(report_sxw.rml_parse):
|
||||||
'lines': self.lines,
|
'lines': self.lines,
|
||||||
'get_fiscalyear_text': self.get_fiscalyear_text,
|
'get_fiscalyear_text': self.get_fiscalyear_text,
|
||||||
'get_periods_and_date_text': self.get_periods_and_date_text,
|
'get_periods_and_date_text': self.get_periods_and_date_text,
|
||||||
'get_inf_text': self.get_informe_text,
|
'get_informe_text': self.get_informe_text,
|
||||||
'get_month':self._get_month,
|
'get_month':self.get_month,
|
||||||
})
|
})
|
||||||
self.context = context
|
self.context = context
|
||||||
|
|
||||||
|
@ -72,21 +72,25 @@ class account_balance(report_sxw.rml_parse):
|
||||||
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear_obj.find(self.cr, self.uid))
|
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear_obj.find(self.cr, self.uid))
|
||||||
return "%s*" % (fiscalyear.name or fiscalyear.code)
|
return "%s*" % (fiscalyear.name or fiscalyear.code)
|
||||||
|
|
||||||
def _get_month(self, form):
|
def get_month(self, form):
|
||||||
'''
|
'''
|
||||||
return day, year and month
|
return day, year and month
|
||||||
'''
|
'''
|
||||||
|
if form['filter'] in ['bydate', 'all']:
|
||||||
months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
|
months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
|
||||||
|
|
||||||
mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
|
mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
|
||||||
ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
|
ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
|
||||||
dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
|
dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
|
||||||
|
return 'Período del '+self.formatLang(form['date_from'], date=True)+' al '+self.formatLang(form['date_to'], date=True)
|
||||||
|
elif form['filter'] in ['byperiod', 'all']:
|
||||||
|
aux=[]
|
||||||
|
period_obj = self.pool.get('account.period')
|
||||||
|
|
||||||
if form['inf_type']=='edogp':
|
for period in period_obj.browse(self.cr, self.uid, form['periods']):
|
||||||
return 'DESDE: '+self.formatLang(form['date_from'], date=True)+' HASTA: '+self.formatLang(form['date_to'], date=True)
|
aux.append(period.date_start)
|
||||||
else:
|
aux.append(period.date_stop)
|
||||||
return 'AL '+str(dia) + ' DE ' + mes.upper() + ' DE ' + str(ano)
|
sorted(aux)
|
||||||
|
return 'Período del '+self.formatLang(aux[0], date=True)+' al '+self.formatLang(aux[-1], date=True)
|
||||||
|
|
||||||
def get_informe_text(self, form):
|
def get_informe_text(self, form):
|
||||||
"""
|
"""
|
||||||
|
@ -216,7 +220,6 @@ class account_balance(report_sxw.rml_parse):
|
||||||
val = account_obj.browse(self.cr, self.uid, [aa_id[0] for aa_id in account_ids], ctx)
|
val = account_obj.browse(self.cr, self.uid, [aa_id[0] for aa_id in account_ids], ctx)
|
||||||
c = 0
|
c = 0
|
||||||
for aa_id in account_ids:
|
for aa_id in account_ids:
|
||||||
print '%s %s \n'%(val[c].name,val[c].balance)
|
|
||||||
new_acc = {
|
new_acc = {
|
||||||
'id' :val[c].id,
|
'id' :val[c].id,
|
||||||
'type' :val[c].type,
|
'type' :val[c].type,
|
||||||
|
@ -294,7 +297,6 @@ class account_balance(report_sxw.rml_parse):
|
||||||
if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
|
if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
|
||||||
tot[res['id']] = True
|
tot[res['id']] = True
|
||||||
tot_eje += res['balance']
|
tot_eje += res['balance']
|
||||||
print 'tot_eje',tot_eje
|
|
||||||
if form['tot_check']:
|
if form['tot_check']:
|
||||||
str_label = form['lab_str']
|
str_label = form['lab_str']
|
||||||
res2 = {
|
res2 = {
|
||||||
|
|
|
@ -53,8 +53,8 @@ class account_balance(report_sxw.rml_parse):
|
||||||
'lines': self.lines,
|
'lines': self.lines,
|
||||||
'get_fiscalyear_text': self.get_fiscalyear_text,
|
'get_fiscalyear_text': self.get_fiscalyear_text,
|
||||||
'get_periods_and_date_text': self.get_periods_and_date_text,
|
'get_periods_and_date_text': self.get_periods_and_date_text,
|
||||||
'get_inf_text': self.get_informe_text,
|
'get_informe_text': self.get_informe_text,
|
||||||
'get_month':self._get_month,
|
'get_month':self.get_month,
|
||||||
})
|
})
|
||||||
self.context = context
|
self.context = context
|
||||||
|
|
||||||
|
@ -79,26 +79,29 @@ class account_balance(report_sxw.rml_parse):
|
||||||
inf_type = {
|
inf_type = {
|
||||||
'bgen' : ' Balance General',
|
'bgen' : ' Balance General',
|
||||||
'bcom' : ' Balance de Comprobacion',
|
'bcom' : ' Balance de Comprobacion',
|
||||||
'edogp': 'Estado de Ganancias y Perdidas',
|
'edogp': 'Estado de Ganancias y Perdidas'
|
||||||
'bdl': 'Libro Diario Legal',
|
|
||||||
}
|
}
|
||||||
return inf_type[form['inf_type']]
|
return inf_type[form['inf_type']]
|
||||||
|
|
||||||
def _get_month(self, form):
|
def get_month(self, form):
|
||||||
'''
|
'''
|
||||||
return day, year and month
|
return day, year and month
|
||||||
'''
|
'''
|
||||||
|
if form['filter'] in ['bydate', 'all']:
|
||||||
months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
|
months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
|
||||||
|
|
||||||
mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
|
mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
|
||||||
ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
|
ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
|
||||||
dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
|
dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
|
||||||
|
return 'Período del '+self.formatLang(form['date_from'], date=True)+' al '+self.formatLang(form['date_to'], date=True)
|
||||||
|
elif form['filter'] in ['byperiod', 'all']:
|
||||||
|
aux=[]
|
||||||
|
period_obj = self.pool.get('account.period')
|
||||||
|
|
||||||
if form['inf_type']=='edogp':
|
for period in period_obj.browse(self.cr, self.uid, form['periods']):
|
||||||
return 'DESDE: '+self.formatLang(form['date_from'], date=True)+' HASTA: '+self.formatLang(form['date_to'], date=True)
|
aux.append(period.date_start)
|
||||||
else:
|
aux.append(period.date_stop)
|
||||||
return 'AL '+str(dia) + ' DE ' + mes.upper() + ' DE ' + str(ano)
|
sorted(aux)
|
||||||
|
return 'Período del '+self.formatLang(aux[0], date=True)+' al '+self.formatLang(aux[-1], date=True)
|
||||||
|
|
||||||
def get_periods_and_date_text(self, form):
|
def get_periods_and_date_text(self, form):
|
||||||
"""
|
"""
|
||||||
|
@ -115,7 +118,6 @@ class account_balance(report_sxw.rml_parse):
|
||||||
dates_str = None
|
dates_str = None
|
||||||
if form['filter'] in ['bydate', 'all']:
|
if form['filter'] in ['bydate', 'all']:
|
||||||
dates_str = self.formatLang(form['date_from'], date=True) + ' - ' + self.formatLang(form['date_to'], date=True) + ' '
|
dates_str = self.formatLang(form['date_from'], date=True) + ' - ' + self.formatLang(form['date_to'], date=True) + ' '
|
||||||
|
|
||||||
return {'periods':periods_str, 'date':dates_str}
|
return {'periods':periods_str, 'date':dates_str}
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,14 +127,17 @@ class account_balance(report_sxw.rml_parse):
|
||||||
(account info plus debit/credit/balance in the selected period
|
(account info plus debit/credit/balance in the selected period
|
||||||
and the full year)
|
and the full year)
|
||||||
"""
|
"""
|
||||||
|
tot_bin = 0.0
|
||||||
tot_deb = 0.0
|
tot_deb = 0.0
|
||||||
tot_crd = 0.0
|
tot_crd = 0.0
|
||||||
|
tot_eje = 0.0
|
||||||
if not ids:
|
if not ids:
|
||||||
ids = self.ids
|
ids = self.ids
|
||||||
if not ids:
|
if not ids:
|
||||||
return []
|
return []
|
||||||
if not done:
|
if not done:
|
||||||
done = {}
|
done = {}
|
||||||
|
|
||||||
if form.has_key('account_list') and form['account_list']:
|
if form.has_key('account_list') and form['account_list']:
|
||||||
account_ids = form['account_list']
|
account_ids = form['account_list']
|
||||||
del form['account_list']
|
del form['account_list']
|
||||||
|
@ -143,7 +148,6 @@ class account_balance(report_sxw.rml_parse):
|
||||||
period_obj = self.pool.get('account.period')
|
period_obj = self.pool.get('account.period')
|
||||||
fiscalyear_obj = self.pool.get('account.fiscalyear')
|
fiscalyear_obj = self.pool.get('account.fiscalyear')
|
||||||
|
|
||||||
# Get the fiscal year
|
|
||||||
fiscalyear = None
|
fiscalyear = None
|
||||||
if form.get('fiscalyear'):
|
if form.get('fiscalyear'):
|
||||||
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, form['fiscalyear'])
|
fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, form['fiscalyear'])
|
||||||
|
@ -153,6 +157,7 @@ class account_balance(report_sxw.rml_parse):
|
||||||
#
|
#
|
||||||
# Get the accounts
|
# Get the accounts
|
||||||
#
|
#
|
||||||
|
|
||||||
def _get_children_and_consol(cr, uid, ids, level, context={}):
|
def _get_children_and_consol(cr, uid, ids, level, context={}):
|
||||||
aa_obj = self.pool.get('account.account')
|
aa_obj = self.pool.get('account.account')
|
||||||
ids2=[]
|
ids2=[]
|
||||||
|
@ -174,23 +179,27 @@ class account_balance(report_sxw.rml_parse):
|
||||||
if child_ids:
|
if child_ids:
|
||||||
account_ids = child_ids
|
account_ids = child_ids
|
||||||
|
|
||||||
#
|
account_obj = self.pool.get('account.account')
|
||||||
# Calculate the period Debit/Credit
|
period_obj = self.pool.get('account.period')
|
||||||
# (from the selected period or all the non special periods in the fy)
|
fiscalyear_obj = self.pool.get('account.fiscalyear')
|
||||||
#
|
|
||||||
|
#############################################################################
|
||||||
|
# Calculate the period Debit/Credit #
|
||||||
|
# (from the selected period or all the non special periods in the fy) #
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
ctx = self.context.copy()
|
ctx = self.context.copy()
|
||||||
ctx['filter'] = form.get('filter','all')
|
ctx['filter'] = form.get('filter','all')
|
||||||
ctx['fiscalyear'] = fiscalyear.id
|
ctx['fiscalyear'] = fiscalyear.id
|
||||||
ctx['periods'] = form.get('periods')
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('special','=',False)])
|
||||||
if form['filter'] in ['byperiod', 'all']:
|
if form['filter'] in ['byperiod', 'all']:
|
||||||
date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx['periods'])])
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('id','in',form['periods'] or ctx['periods']),('special','=',False)])
|
||||||
ctx['periods'] = ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',date_start)])
|
|
||||||
if form['filter'] in ['bydate', 'all']:
|
if form['filter'] in ['bydate', 'all']:
|
||||||
ctx['date_from'] = form['date_from']
|
ctx['date_from'] = form['date_from']
|
||||||
ctx['date_to'] = form['date_to']
|
ctx['date_to'] = form['date_to']
|
||||||
|
|
||||||
accounts=[]
|
accounts=[]
|
||||||
|
|
||||||
val = account_obj.browse(self.cr, self.uid, [aa_id[0] for aa_id in account_ids], ctx)
|
val = account_obj.browse(self.cr, self.uid, [aa_id[0] for aa_id in account_ids], ctx)
|
||||||
c = 0
|
c = 0
|
||||||
for aa_id in account_ids:
|
for aa_id in account_ids:
|
||||||
|
@ -214,11 +223,38 @@ class account_balance(report_sxw.rml_parse):
|
||||||
fiscalyear_obj.search(self.cr, self.uid, [('date_stop','<',fiscalyear.date_start)],order='date_stop')[-1] or []
|
fiscalyear_obj.search(self.cr, self.uid, [('date_stop','<',fiscalyear.date_start)],order='date_stop')[-1] or []
|
||||||
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',ctx['fiscalyear']),('date_stop','<',fiscalyear.date_start)])
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',ctx['fiscalyear']),('date_stop','<',fiscalyear.date_start)])
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Calculate the period initial Balance #
|
||||||
|
# (fy balance minus the balance from the start of the selected period #
|
||||||
|
# to the end of the year) #
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
ctx = self.context.copy()
|
||||||
|
ctx['filter'] = form.get('filter','all')
|
||||||
|
ctx['fiscalyear'] = fiscalyear.id
|
||||||
|
|
||||||
|
if form['filter'] in ['byperiod', 'all']:
|
||||||
|
ctx['periods'] = form['periods']
|
||||||
|
date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx['periods'])])
|
||||||
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',date_start)])
|
||||||
|
if not ctx['periods']:
|
||||||
|
missing_period()
|
||||||
|
elif form['filter'] in ['bydate']:
|
||||||
|
ctx['date_from'] = fiscalyear.date_start
|
||||||
|
ctx['date_to'] = form['date_from']
|
||||||
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',ctx['date_to'])])
|
||||||
|
elif form['filter'] == 'none':
|
||||||
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('special','=',True)])
|
||||||
|
date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx['periods'])])
|
||||||
|
ctx['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_start','<=',date_start),('special','=',True)])
|
||||||
|
|
||||||
|
period_balanceinit = {}
|
||||||
|
for acc in account_obj.browse(self.cr, self.uid, [x[0] for x in account_ids], ctx):
|
||||||
|
period_balanceinit[acc['id']] = acc.balance
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate the report lines (checking each account)
|
# Generate the report lines (checking each account)
|
||||||
#
|
#
|
||||||
|
|
||||||
tot = {}
|
tot = {}
|
||||||
for account in accounts:
|
for account in accounts:
|
||||||
account_id = account['id']
|
account_id = account['id']
|
||||||
|
@ -233,26 +269,31 @@ class account_balance(report_sxw.rml_parse):
|
||||||
#
|
#
|
||||||
# Check if we need to include this level
|
# Check if we need to include this level
|
||||||
#
|
#
|
||||||
|
|
||||||
if not form['display_account_level'] or account['level'] <= form['display_account_level']:
|
if not form['display_account_level'] or account['level'] <= form['display_account_level']:
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copy the account values
|
# Copy the account values
|
||||||
#
|
#
|
||||||
|
|
||||||
res = {
|
res = {
|
||||||
'id' : account_id,
|
'id' : account_id,
|
||||||
'type' : account['type'],
|
'type' : account['type'],
|
||||||
'code': account['code'],
|
'code': account['code'],
|
||||||
'name': (account['total'] and not account['label']) and 'TOTAL %s'%(account['name'].upper()) or account['name'],
|
'name': (account['total'] and not account['label']) and 'TOTAL %s'%(account['name'].upper()) or account['name'],
|
||||||
'level': account['level'],
|
'level': account['level'],
|
||||||
|
'balanceinit': period_balanceinit[account_id],
|
||||||
'debit': account['debit'],
|
'debit': account['debit'],
|
||||||
'credit': account['credit'],
|
'credit': account['credit'],
|
||||||
|
'balance': period_balanceinit[account_id]+account['debit']-account['credit'],
|
||||||
'parent_id': account['parent_id'],
|
'parent_id': account['parent_id'],
|
||||||
'bal_type': '',
|
'bal_type': '',
|
||||||
'label': account['label'],
|
'label': account['label'],
|
||||||
'total': account['total'],
|
'total': account['total'],
|
||||||
}
|
}
|
||||||
|
#
|
||||||
|
# Round the values to zero if needed (-0.000001 ~= 0)
|
||||||
|
#
|
||||||
|
|
||||||
|
if abs(res['balance']) < 0.5 * 10**-4:
|
||||||
|
res['balance'] = 0.0
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check whether we must include this line in the report or not
|
# Check whether we must include this line in the report or not
|
||||||
|
@ -260,30 +301,31 @@ class account_balance(report_sxw.rml_parse):
|
||||||
|
|
||||||
if form['display_account'] == 'bal_mouvement' and account['parent_id']:
|
if form['display_account'] == 'bal_mouvement' and account['parent_id']:
|
||||||
# Include accounts with movements
|
# Include accounts with movements
|
||||||
if abs(res['credit']-res['debit']) >= 0.5 * 10**-int(2) \
|
if abs(res['balance']) >= 0.5 * 10**-int(2):
|
||||||
or abs(res['credit']) >= 0.5 * 10**-int(2) \
|
|
||||||
or abs(res['debit']) >= 0.5 * 10**-int(2):
|
|
||||||
result_acc.append(res)
|
result_acc.append(res)
|
||||||
elif form['display_account'] == 'bal_solde' and account['parent_id']:
|
elif form['display_account'] == 'bal_solde' and account['parent_id']:
|
||||||
# Include accounts with balance
|
# Include accounts with balance
|
||||||
if abs(res['credit']-res['debit']) >= 0.5 * 10**-int(2):
|
if abs(res['balance']) >= 0.5 * 10**-4:
|
||||||
result_acc.append(res)
|
result_acc.append(res)
|
||||||
else:
|
else:
|
||||||
# Include all account
|
# Include all accounts
|
||||||
result_acc.append(res)
|
result_acc.append(res)
|
||||||
|
|
||||||
if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
|
if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
|
||||||
tot[res['id']] = True
|
tot[res['id']] = True
|
||||||
|
tot_bin += res['balanceinit']
|
||||||
tot_deb += res['debit']
|
tot_deb += res['debit']
|
||||||
tot_crd += res['credit']
|
tot_crd += res['credit']
|
||||||
|
tot_eje += res['balance']
|
||||||
|
|
||||||
if form['tot_check']:
|
if form['tot_check']:
|
||||||
str_label = form['lab_str']
|
str_label = form['lab_str']
|
||||||
res2 = {
|
res2 = {
|
||||||
'type' : 'view',
|
'type' : 'view',
|
||||||
'name': 'TOTAL %s'%(str_label),
|
'name': 'TOTAL %s'%(str_label),
|
||||||
|
'balanceinit': tot_bin,
|
||||||
'debit': tot_deb,
|
'debit': tot_deb,
|
||||||
'credit': tot_crd,
|
'credit': tot_crd,
|
||||||
|
'balance': tot_eje,
|
||||||
'label': False,
|
'label': False,
|
||||||
'total': True,
|
'total': True,
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,8 +53,8 @@ class account_balance(report_sxw.rml_parse):
|
||||||
'lines': self.lines,
|
'lines': self.lines,
|
||||||
'get_fiscalyear_text': self.get_fiscalyear_text,
|
'get_fiscalyear_text': self.get_fiscalyear_text,
|
||||||
'get_periods_and_date_text': self.get_periods_and_date_text,
|
'get_periods_and_date_text': self.get_periods_and_date_text,
|
||||||
'get_inf_text': self.get_informe_text,
|
'get_informe_text': self.get_informe_text,
|
||||||
'get_month':self._get_month,
|
'get_month':self.get_month,
|
||||||
})
|
})
|
||||||
self.context = context
|
self.context = context
|
||||||
|
|
||||||
|
@ -79,26 +79,29 @@ class account_balance(report_sxw.rml_parse):
|
||||||
inf_type = {
|
inf_type = {
|
||||||
'bgen' : ' Balance General',
|
'bgen' : ' Balance General',
|
||||||
'bcom' : ' Balance de Comprobacion',
|
'bcom' : ' Balance de Comprobacion',
|
||||||
'edogp': 'Estado de Ganancias y Perdidas',
|
'edogp': 'Estado de Ganancias y Perdidas'
|
||||||
'bml': 'Libro Mayor Legal',
|
|
||||||
}
|
}
|
||||||
return inf_type[form['inf_type']]
|
return inf_type[form['inf_type']]
|
||||||
|
|
||||||
def _get_month(self, form):
|
def get_month(self, form):
|
||||||
'''
|
'''
|
||||||
return day, year and month
|
return day, year and month
|
||||||
'''
|
'''
|
||||||
|
if form['filter'] in ['bydate', 'all']:
|
||||||
months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
|
months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
|
||||||
|
|
||||||
mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
|
mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
|
||||||
ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
|
ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
|
||||||
dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
|
dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
|
||||||
|
return 'Período del '+self.formatLang(form['date_from'], date=True)+' al '+self.formatLang(form['date_to'], date=True)
|
||||||
|
elif form['filter'] in ['byperiod', 'all']:
|
||||||
|
aux=[]
|
||||||
|
period_obj = self.pool.get('account.period')
|
||||||
|
|
||||||
if form['inf_type']=='edogp':
|
for period in period_obj.browse(self.cr, self.uid, form['periods']):
|
||||||
return 'DESDE: '+self.formatLang(form['date_from'], date=True)+' HASTA: '+self.formatLang(form['date_to'], date=True)
|
aux.append(period.date_start)
|
||||||
else:
|
aux.append(period.date_stop)
|
||||||
return 'AL '+str(dia) + ' DE ' + mes.upper() + ' DE ' + str(ano)
|
sorted(aux)
|
||||||
|
return 'Período del '+self.formatLang(aux[0], date=True)+' al '+self.formatLang(aux[-1], date=True)
|
||||||
|
|
||||||
def get_periods_and_date_text(self, form):
|
def get_periods_and_date_text(self, form):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -5,37 +5,26 @@
|
||||||
<frame id="first" x1="1cm" y1="1.0cm" width="19.0cm" height="23cm"/>
|
<frame id="first" x1="1cm" y1="1.0cm" width="19.0cm" height="23cm"/>
|
||||||
<pageGraphics>
|
<pageGraphics>
|
||||||
<setFont name="Helvetica" size="9"/>
|
<setFont name="Helvetica" size="9"/>
|
||||||
|
|
||||||
<!--
|
|
||||||
<image x="1.0cm" y="25.0cm" height="2.5cm" width="9.6cm">[[company.logo and company.logo or removeParentNode('image')]]</image>
|
|
||||||
<drawString x="1.0cm" y="24.5cm">[[company.logo and removeParentNode('para') or company.name]]</drawString>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<place x="-3.5cm" y="22.50cm" width="19cm" height="5.0cm">
|
<place x="-3.5cm" y="22.50cm" width="19cm" height="5.0cm">
|
||||||
<blockTable colWidths="9.6cm,9.4cm" style="TITLE">
|
<blockTable colWidths="9.6cm,9.4cm" style="TITLE">
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER_NAME">[[ company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE' ]]</para></td>
|
<td><para style="TITLE_CENTER_NAME">
|
||||||
|
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
|
||||||
|
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
|
||||||
|
</para></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER">[[ (company.partner_id.vat and ('RIF: %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or removeParentNode('para')) ]]</para></td>
|
<td><para style="TITLE_CENTER">[[ get_informe_text(data['form']) ]][[data['form'] and (' (Expresado en %s)'%( company.currency_id.name)) or '']]</para></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
|
||||||
<td><para style="TITLE_CENTER">[[ get_inf_text(data['form']) ]]</para></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
|
<td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
|
||||||
<td><para style="TITLE_CENTER">[[data['form'] and ('(Expresado en %s)'%(company.currency_id.symbol)) or '']]</para></td>
|
|
||||||
</tr>
|
|
||||||
</blockTable>
|
</blockTable>
|
||||||
</place>
|
</place>
|
||||||
<drawRightString x="192mm" y="5mm">[[ get_inf_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/> </drawRightString>
|
<drawRightString x="192mm" y="5mm">[[ get_informe_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/> </drawRightString>
|
||||||
</pageGraphics>
|
</pageGraphics>
|
||||||
|
|
||||||
</pageTemplate>
|
</pageTemplate>
|
||||||
|
|
|
@ -5,37 +5,26 @@
|
||||||
<frame id="first" x1="1cm" y1="1.0cm" width="19.0cm" height="23cm"/>
|
<frame id="first" x1="1cm" y1="1.0cm" width="19.0cm" height="23cm"/>
|
||||||
<pageGraphics>
|
<pageGraphics>
|
||||||
<setFont name="Helvetica" size="9"/>
|
<setFont name="Helvetica" size="9"/>
|
||||||
|
|
||||||
<!--
|
|
||||||
<image x="1.0cm" y="25.0cm" height="2.5cm" width="9.6cm">[[company.logo and company.logo or removeParentNode('image')]]</image>
|
|
||||||
<drawString x="1.0cm" y="24.5cm">[[company.logo and removeParentNode('para') or company.name]]</drawString>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<place x="-3.5cm" y="22.50cm" width="19cm" height="5.0cm">
|
<place x="-3.5cm" y="22.50cm" width="19cm" height="5.0cm">
|
||||||
<blockTable colWidths="9.6cm,9.4cm" style="TITLE">
|
<blockTable colWidths="9.6cm,9.4cm" style="TITLE">
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER_NAME">[[ company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE' ]]</para></td>
|
<td><para style="TITLE_CENTER_NAME">
|
||||||
|
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
|
||||||
|
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
|
||||||
|
</para></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER">[[ (company.partner_id.vat and ('RIF: %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or removeParentNode('para')) ]]</para></td>
|
<td><para style="TITLE_CENTER">[[ get_informe_text(data['form']) ]][[data['form'] and (' (Expresado en %s)'%( company.currency_id.name)) or '']]</para></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
|
||||||
<td><para style="TITLE_CENTER">[[ get_inf_text(data['form']) ]]</para></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
|
<td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
|
||||||
<td><para style="TITLE_CENTER">[[data['form'] and ('(Expresado en %s)'%(company.currency_id.symbol)) or '']]</para></td>
|
|
||||||
</tr>
|
|
||||||
</blockTable>
|
</blockTable>
|
||||||
</place>
|
</place>
|
||||||
<drawRightString x="192mm" y="5mm">[[ get_inf_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/> </drawRightString>
|
<drawRightString x="192mm" y="5mm">[[ get_informe_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/> </drawRightString>
|
||||||
</pageGraphics>
|
</pageGraphics>
|
||||||
|
|
||||||
</pageTemplate>
|
</pageTemplate>
|
||||||
|
@ -75,28 +64,16 @@
|
||||||
alignment="RIGHT"
|
alignment="RIGHT"
|
||||||
spaceBefore="0.0"
|
spaceBefore="0.0"
|
||||||
spaceAfter="0.0"/>
|
spaceAfter="0.0"/>
|
||||||
<paraStyle
|
<paraStyle name="TOP_TITLE" fontName="Helvetica-Bold" fontSize="9" leftIndent="0.0" alignment="LEFT"/>
|
||||||
name="TOP_TITLE"
|
<paraStyle name="TITLES" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
fontName="Helvetica-Bold"
|
|
||||||
fontSize="9"
|
|
||||||
leftIndent="0.0"
|
|
||||||
alignment="LEFT"/>
|
|
||||||
<paraStyle name="TITLES"
|
|
||||||
fontName="Helvetica-Bold"
|
|
||||||
fontSize="8.0"
|
|
||||||
leading="10"
|
|
||||||
alignment="LEFT"
|
|
||||||
spaceBefore="0.0"
|
|
||||||
spaceAfter="0.0"/>
|
|
||||||
<paraStyle name="TITLE_CENTER" fontName="Helvetica-Bold" fontSize="9" leading="10" leftIndent="0.0" alignment="CENTER"/>
|
<paraStyle name="TITLE_CENTER" fontName="Helvetica-Bold" fontSize="9" leading="10" leftIndent="0.0" alignment="CENTER"/>
|
||||||
<paraStyle name="TITLE_CENTER_NAME" fontName="Helvetica-Bold" fontSize="12" leading="13" leftIndent="0.0" alignment="CENTER"/>
|
<paraStyle name="TITLE_CENTER_NAME" fontName="Helvetica-Bold" fontSize="12" leading="13" leftIndent="0.0" alignment="CENTER"/>
|
||||||
<paraStyle name="TITLE" alignment="CENTER" fontName="Helvetica" fontSize="18.0" leading="20" spaceBefore="-3.0" textColor="black"/>
|
<paraStyle name="TITLE" alignment="CENTER" fontName="Helvetica" fontSize="18.0" leading="20" spaceBefore="-3.0" textColor="black"/>
|
||||||
|
|
||||||
</stylesheet>
|
</stylesheet>
|
||||||
<images/>
|
<images/>
|
||||||
<story>
|
<story>
|
||||||
<para>[[setLang(user.context_lang)]]</para>
|
<para>[[setLang(user.context_lang)]]</para>
|
||||||
<blockTable colWidths="2.5cm,11.5cm,2.5cm,2.5cm" style="BODY" repeatRows="1">
|
<blockTable colWidths="2.5cm,9.5cm,3.5cm,3.5cm" style="BODY" repeatRows="1">
|
||||||
<tr noRowsplits="1">
|
<tr noRowsplits="1">
|
||||||
<td>
|
<td>
|
||||||
<para style="TITLE_LEFT_ALIGN">
|
<para style="TITLE_LEFT_ALIGN">
|
||||||
|
@ -119,7 +96,6 @@
|
||||||
<font>[[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
|
<font>[[ a['type']<>'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
|
||||||
<i>[[a['label']==True and a['code'] or '' ]]</i>
|
<i>[[a['label']==True and a['code'] or '' ]]</i>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="TITLES">
|
<para style="TITLES">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<document filename="test.pdf">
|
<document filename="test.pdf">
|
||||||
<template pageSize="(21.59cm,27.94cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
|
<template pageSize="(21.59cm,27.94cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
|
||||||
<pageTemplate id="first">
|
<pageTemplate id="first">
|
||||||
<frame id="first" x1="1cm" y1="1.0cm" width="19.0cm" height="23cm"/>
|
<frame id="first" x1="0.5cm" y1="1.0cm" width="20.5cm" height="23cm"/>
|
||||||
<pageGraphics>
|
<pageGraphics>
|
||||||
<setFont name="Helvetica" size="9"/>
|
<setFont name="Helvetica" size="9"/>
|
||||||
|
|
||||||
|
@ -15,27 +15,22 @@
|
||||||
<blockTable colWidths="9.6cm,9.4cm" style="TITLE">
|
<blockTable colWidths="9.6cm,9.4cm" style="TITLE">
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER_NAME">[[ company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE' ]]</para></td>
|
<td><para style="TITLE_CENTER_NAME">
|
||||||
|
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
|
||||||
|
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
|
||||||
|
</para></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER">[[ (company.partner_id.vat and ('RIF: %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or removeParentNode('para')) ]]</para></td>
|
<td><para style="TITLE_CENTER">[[ get_informe_text(data['form']) ]][[data['form'] and (' (Expresado en %s)'%( company.currency_id.name)) or '']]</para></td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
|
||||||
<td><para style="TITLE_CENTER">[[ get_inf_text(data['form']) ]]</para></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
<td><para style="TOP_TITLE"></para></td>
|
||||||
<td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
|
<td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><para style="TOP_TITLE"></para></td>
|
|
||||||
<td><para style="TITLE_CENTER">[[data['form'] and ('(Expresado en %s)'%(company.currency_id.symbol)) or '']]</para></td>
|
|
||||||
</tr>
|
|
||||||
</blockTable>
|
</blockTable>
|
||||||
</place>
|
</place>
|
||||||
<drawRightString x="192mm" y="5mm">[[ get_inf_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/> </drawRightString>
|
<drawRightString x="192mm" y="5mm">[[ get_informe_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/> </drawRightString>
|
||||||
</pageGraphics>
|
</pageGraphics>
|
||||||
|
|
||||||
</pageTemplate>
|
</pageTemplate>
|
||||||
|
@ -84,7 +79,7 @@
|
||||||
<images/>
|
<images/>
|
||||||
<story>
|
<story>
|
||||||
<para>[[setLang(user.context_lang)]]</para>
|
<para>[[setLang(user.context_lang)]]</para>
|
||||||
<blockTable colWidths="2.5cm,6.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="1">
|
<blockTable colWidths="2.5cm,6.5cm,2.5cm,3.5cm,3.5cm,2.5cm" style="BODY" repeatRows="1">
|
||||||
<tr noRowsplits="1">
|
<tr noRowsplits="1">
|
||||||
<td>
|
<td>
|
||||||
<para style="TITLE_LEFT_ALIGN">
|
<para style="TITLE_LEFT_ALIGN">
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
from osv import osv,fields
|
from osv import osv,fields
|
||||||
import pooler
|
import pooler
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class wizard_account_balance_gene_2(osv.osv_memory):
|
class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
_name = "wizard.report.account.balance.gene.2"
|
_name = "wizard.report.account.balance.gene.2"
|
||||||
|
|
||||||
|
@ -38,13 +39,14 @@ class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
'filter': fields.selection([('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],'Date/Period Filter'),
|
'filter': fields.selection([('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],'Date/Period Filter'),
|
||||||
'fiscalyear': fields.many2one('account.fiscalyear','Fiscal year',help='Keep empty to use all open fiscal years to compute the balance',required=True),
|
'fiscalyear': fields.many2one('account.fiscalyear','Fiscal year',help='Keep empty to use all open fiscal years to compute the balance',required=True),
|
||||||
'periods': fields.many2many('account.period','rel_wizard_period','wizard_id','period_id','Periods',help='All periods in the fiscal year if empty'),
|
'periods': fields.many2many('account.period','rel_wizard_period','wizard_id','period_id','Periods',help='All periods in the fiscal year if empty'),
|
||||||
'display_account': fields.selection([('bal_all','All'),('bal_solde', 'With balance'),('bal_mouvement','With movements')],'Display accounts'),
|
'display_account': fields.selection([('all','All'),('con_balance', 'With balance'),('con_movimiento','With movements')],'Display accounts'),
|
||||||
'display_account_level': fields.integer('Up to level',help='Display accounts up to this level (0 to show all)'),
|
'display_account_level': fields.integer('Up to level',help='Display accounts up to this level (0 to show all)'),
|
||||||
'date_from': fields.date('Start date',required=True),
|
'date_from': fields.date('Start date'),
|
||||||
'date_to': fields.date('End date',required=True),
|
'date_to': fields.date('End date'),
|
||||||
'tot_check': fields.boolean('Show Total'),
|
'tot_check': fields.boolean('Show Total'),
|
||||||
'lab_str': fields.char('Description', size= 128),
|
'lab_str': fields.char('Description', size= 128),
|
||||||
'inf_type': fields.selection([('bgen','Balance General'),('bcom','Balance Comprobacion'),('edogp','Estado Ganancias y Perdidas'),('bdl','Libro Diario Legal')],'Tipo Informe',required=True),
|
'inf_type': fields.selection([('bgen','Balance General'),('bcom','Balance Comprobacion'),('edogp','Estado Ganancias y Perdidas')],'Tipo Informe',required=True),
|
||||||
|
#~ 'type_report': fields.selection([('un_col','Una Columna'),('dos_col','Dos Columnas'),('cuatro_col','Cuatro Columnas')],'Tipo Informe',required=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
@ -54,11 +56,20 @@ class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
'display_account_level': lambda *a: 0,
|
'display_account_level': lambda *a: 0,
|
||||||
'inf_type': lambda *a:'bcom',
|
'inf_type': lambda *a:'bcom',
|
||||||
'company_id': lambda *a: 1,
|
'company_id': lambda *a: 1,
|
||||||
'fiscalyear': lambda *a: 1,
|
'fiscalyear': lambda self, cr, uid, c: self.pool.get('account.fiscalyear').find(cr, uid),
|
||||||
'display_account': lambda *a:'bal_mouvement',
|
'display_account': lambda *a:'con_movimiento',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def onchange_filter(self,cr,uid,ids,fiscalyear,filters,context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
res = {}
|
||||||
|
if filters in ("bydate","all"):
|
||||||
|
fisy = self.pool.get("account.fiscalyear")
|
||||||
|
fis_actual = fisy.browse(cr,uid,fiscalyear,context=context)
|
||||||
|
res = {'value':{'date_from': fis_actual.date_start, 'date_to': fis_actual.date_stop}}
|
||||||
|
return res
|
||||||
|
|
||||||
def _get_defaults(self, cr, uid, data, context=None):
|
def _get_defaults(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -73,7 +84,6 @@ class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
data['form']['context'] = context
|
data['form']['context'] = context
|
||||||
return data['form']
|
return data['form']
|
||||||
|
|
||||||
|
|
||||||
def _check_state(self, cr, uid, data, context=None):
|
def _check_state(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -81,32 +91,58 @@ class wizard_account_balance_gene_2(osv.osv_memory):
|
||||||
self._check_date(cr, uid, data, context)
|
self._check_date(cr, uid, data, context)
|
||||||
return data['form']
|
return data['form']
|
||||||
|
|
||||||
|
|
||||||
def _check_date(self, cr, uid, data, context=None):
|
def _check_date(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
|
if data['form']['date_from'] > data['form']['date_to']:
|
||||||
|
raise osv.except_osv(_('Error !'),('La fecha final debe ser mayor a la inicial'))
|
||||||
|
|
||||||
sql = """SELECT f.id, f.date_start, f.date_stop
|
sql = """SELECT f.id, f.date_start, f.date_stop
|
||||||
FROM account_fiscalyear f
|
FROM account_fiscalyear f
|
||||||
WHERE '%s' between f.date_start and f.date_stop """%(data['form']['date_from'])
|
WHERE '%s' = f.id """%(data['form']['fiscalyear'])
|
||||||
cr.execute(sql)
|
cr.execute(sql)
|
||||||
res = cr.dictfetchall()
|
res = cr.dictfetchall()
|
||||||
|
|
||||||
if res:
|
if res:
|
||||||
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
|
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_from'] < res[0]['date_start']):
|
||||||
raise wizard.except_wizard(_('UserError'),_('Date to must be set between %s and %s') % (res[0]['date_start'], res[0]['date_stop']))
|
raise osv.except_osv(_('UserError'),'Las fechas deben estar entre %s y %s' % (res[0]['date_start'], res[0]['date_stop']))
|
||||||
else:
|
else:
|
||||||
return 'report'
|
return 'report'
|
||||||
else:
|
else:
|
||||||
raise wizard.except_wizard(_('UserError'),_('Date not in a defined fiscal year'))
|
raise osv.except_osv(_('UserError'),'No existe periodo fiscal')
|
||||||
|
|
||||||
def print_report(self, cr, uid, ids,data, context=None):
|
def print_report(self, cr, uid, ids,data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
data['ids'] = context.get('active_ids', [])
|
data['ids'] = context.get('active_ids', [])
|
||||||
data['model'] = context.get('active_model', 'ir.ui.menu')
|
data['model'] = context.get('active_model', 'ir.ui.menu')
|
||||||
data['form'] = self.read(cr, uid, ids[0])
|
data['form'] = self.read(cr, uid, ids[0])
|
||||||
|
|
||||||
|
if data['form']['filter'] == 'byperiod':
|
||||||
|
del data['form']['date_from']
|
||||||
|
del data['form']['date_to']
|
||||||
|
elif data['form']['filter'] == 'bydate':
|
||||||
|
self._check_date(cr, uid, data)
|
||||||
|
del data['form']['periods']
|
||||||
|
elif data['form']['filter'] == 'none':
|
||||||
|
del data['form']['date_from']
|
||||||
|
del data['form']['date_to']
|
||||||
|
del data['form']['periods']
|
||||||
|
else:
|
||||||
|
self._check_date(cr, uid, data)
|
||||||
|
lis2 = str(data['form']['periods']).replace("[","(").replace("]",")")
|
||||||
|
sqlmm = """select min(p.date_start) as inicio, max(p.date_stop) as fin
|
||||||
|
from account_period p
|
||||||
|
where p.id in %s"""%lis2
|
||||||
|
cr.execute(sqlmm)
|
||||||
|
minmax = cr.dictfetchall()
|
||||||
|
if minmax:
|
||||||
|
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
|
||||||
|
raise osv.except_osv(_('Error !'),('La intersepcion entre el periodo y fecha es vacio'))
|
||||||
|
|
||||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene.2', 'datas': data}
|
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene.2', 'datas': data}
|
||||||
|
|
||||||
wizard_account_balance_gene_2()
|
wizard_account_balance_gene_2()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,35 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
###########################################################################
|
||||||
|
# Module Writen to OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
|
||||||
|
# All Rights Reserved
|
||||||
|
###############Credits######################################################
|
||||||
|
# Coded by: Humberto Arocha humberto@openerp.com.ve
|
||||||
|
# Angelica Barrios angelicaisabelb@gmail.com
|
||||||
|
# Jordi Esteve <jesteve@zikzakmedia.com>
|
||||||
|
# Javier Duran <javieredm@gmail.com>
|
||||||
|
# Planified by: Humberto Arocha
|
||||||
|
# Finance by: LUBCAN COL S.A.S http://www.lubcancol.com
|
||||||
|
# Audited by: Humberto Arocha humberto@openerp.com.ve
|
||||||
|
#############################################################################
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
from osv import osv,fields
|
from osv import osv,fields
|
||||||
import pooler
|
import pooler
|
||||||
import time
|
import time
|
||||||
|
|
||||||
class wizard_report(osv.osv_memory):
|
class wizard_report(osv.osv_memory):
|
||||||
_name = "wizard.report"
|
_name = "wizard.report"
|
||||||
|
|
||||||
|
@ -11,13 +39,14 @@ class wizard_report(osv.osv_memory):
|
||||||
'filter': fields.selection([('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],'Date/Period Filter'),
|
'filter': fields.selection([('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],'Date/Period Filter'),
|
||||||
'fiscalyear': fields.many2one('account.fiscalyear','Fiscal year',help='Keep empty to use all open fiscal years to compute the balance',required=True),
|
'fiscalyear': fields.many2one('account.fiscalyear','Fiscal year',help='Keep empty to use all open fiscal years to compute the balance',required=True),
|
||||||
'periods': fields.many2many('account.period','rel_wizard_period','wizard_id','period_id','Periods',help='All periods in the fiscal year if empty'),
|
'periods': fields.many2many('account.period','rel_wizard_period','wizard_id','period_id','Periods',help='All periods in the fiscal year if empty'),
|
||||||
'display_account': fields.selection([('bal_all','All'),('bal_solde', 'With balance'),('bal_mouvement','With movements')],'Display accounts'),
|
'display_account': fields.selection([('all','All'),('con_balance', 'With balance'),('con_movimiento','With movements')],'Display accounts'),
|
||||||
'display_account_level': fields.integer('Up to level',help='Display accounts up to this level (0 to show all)'),
|
'display_account_level': fields.integer('Up to level',help='Display accounts up to this level (0 to show all)'),
|
||||||
'date_from': fields.date('Start date',required=True),
|
'date_from': fields.date('Start date'),
|
||||||
'date_to': fields.date('End date',required=True),
|
'date_to': fields.date('End date'),
|
||||||
'tot_check': fields.boolean('Show Total'),
|
'tot_check': fields.boolean('Show Total'),
|
||||||
'lab_str': fields.char('Description', size= 128),
|
'lab_str': fields.char('Description', size= 128),
|
||||||
'inf_type': fields.selection([('bgen','Balance General'),('bcom','Balance Comprobacion'),('edogp','Estado Ganancias y Perdidas'),('bml','Libro Mayor Legal')],'Tipo Informe',required=True),
|
'inf_type': fields.selection([('bgen','Balance General'),('bcom','Balance Comprobacion'),('edogp','Estado Ganancias y Perdidas')],'Tipo Informe',required=True),
|
||||||
|
#~ 'type_report': fields.selection([('un_col','Una Columna'),('dos_col','Dos Columnas'),('cuatro_col','Cuatro Columnas')],'Tipo Informe',required=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
@ -27,11 +56,20 @@ class wizard_report(osv.osv_memory):
|
||||||
'display_account_level': lambda *a: 0,
|
'display_account_level': lambda *a: 0,
|
||||||
'inf_type': lambda *a:'bcom',
|
'inf_type': lambda *a:'bcom',
|
||||||
'company_id': lambda *a: 1,
|
'company_id': lambda *a: 1,
|
||||||
'fiscalyear': lambda *a: 1,
|
'fiscalyear': lambda self, cr, uid, c: self.pool.get('account.fiscalyear').find(cr, uid),
|
||||||
'display_account': lambda *a:'bal_mouvement',
|
'display_account': lambda *a:'con_movimiento',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def onchange_filter(self,cr,uid,ids,fiscalyear,filters,context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
res = {}
|
||||||
|
if filters in ("bydate","all"):
|
||||||
|
fisy = self.pool.get("account.fiscalyear")
|
||||||
|
fis_actual = fisy.browse(cr,uid,fiscalyear,context=context)
|
||||||
|
res = {'value':{'date_from': fis_actual.date_start, 'date_to': fis_actual.date_stop}}
|
||||||
|
return res
|
||||||
|
|
||||||
def _get_defaults(self, cr, uid, data, context=None):
|
def _get_defaults(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -46,7 +84,6 @@ class wizard_report(osv.osv_memory):
|
||||||
data['form']['context'] = context
|
data['form']['context'] = context
|
||||||
return data['form']
|
return data['form']
|
||||||
|
|
||||||
|
|
||||||
def _check_state(self, cr, uid, data, context=None):
|
def _check_state(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -54,30 +91,58 @@ class wizard_report(osv.osv_memory):
|
||||||
self._check_date(cr, uid, data, context)
|
self._check_date(cr, uid, data, context)
|
||||||
return data['form']
|
return data['form']
|
||||||
|
|
||||||
|
|
||||||
def _check_date(self, cr, uid, data, context=None):
|
def _check_date(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
|
if data['form']['date_from'] > data['form']['date_to']:
|
||||||
|
raise osv.except_osv(_('Error !'),('La fecha final debe ser mayor a la inicial'))
|
||||||
|
|
||||||
sql = """SELECT f.id, f.date_start, f.date_stop
|
sql = """SELECT f.id, f.date_start, f.date_stop
|
||||||
FROM account_fiscalyear f
|
FROM account_fiscalyear f
|
||||||
WHERE '%s' between f.date_start and f.date_stop """%(data['form']['date_from'])
|
WHERE '%s' = f.id """%(data['form']['fiscalyear'])
|
||||||
cr.execute(sql)
|
cr.execute(sql)
|
||||||
res = cr.dictfetchall()
|
res = cr.dictfetchall()
|
||||||
|
|
||||||
if res:
|
if res:
|
||||||
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
|
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_from'] < res[0]['date_start']):
|
||||||
raise wizard.except_wizard(_('UserError'),_('Date to must be set between %s and %s') % (res[0]['date_start'], res[0]['date_stop']))
|
raise osv.except_osv(_('UserError'),'Las fechas deben estar entre %s y %s' % (res[0]['date_start'], res[0]['date_stop']))
|
||||||
else:
|
else:
|
||||||
return 'report'
|
return 'report'
|
||||||
else:
|
else:
|
||||||
raise wizard.except_wizard(_('UserError'),_('Date not in a defined fiscal year'))
|
raise osv.except_osv(_('UserError'),'No existe periodo fiscal')
|
||||||
|
|
||||||
def print_report(self, cr, uid, ids,data, context=None):
|
def print_report(self, cr, uid, ids,data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
data['ids'] = context.get('active_ids', [])
|
data['ids'] = context.get('active_ids', [])
|
||||||
data['model'] = context.get('active_model', 'ir.ui.menu')
|
data['model'] = context.get('active_model', 'ir.ui.menu')
|
||||||
data['form'] = self.read(cr, uid, ids[0])
|
data['form'] = self.read(cr, uid, ids[0])
|
||||||
|
|
||||||
|
if data['form']['filter'] == 'byperiod':
|
||||||
|
del data['form']['date_from']
|
||||||
|
del data['form']['date_to']
|
||||||
|
elif data['form']['filter'] == 'bydate':
|
||||||
|
self._check_date(cr, uid, data)
|
||||||
|
del data['form']['periods']
|
||||||
|
elif data['form']['filter'] == 'none':
|
||||||
|
del data['form']['date_from']
|
||||||
|
del data['form']['date_to']
|
||||||
|
del data['form']['periods']
|
||||||
|
else:
|
||||||
|
self._check_date(cr, uid, data)
|
||||||
|
lis2 = str(data['form']['periods']).replace("[","(").replace("]",")")
|
||||||
|
sqlmm = """select min(p.date_start) as inicio, max(p.date_stop) as fin
|
||||||
|
from account_period p
|
||||||
|
where p.id in %s"""%lis2
|
||||||
|
cr.execute(sqlmm)
|
||||||
|
minmax = cr.dictfetchall()
|
||||||
|
if minmax:
|
||||||
|
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
|
||||||
|
raise osv.except_osv(_('Error !'),('La intersepcion entre el periodo y fecha es vacio'))
|
||||||
|
|
||||||
return {'type': 'ir.actions.report.xml', 'report_name': 'wizard.report.reporte', 'datas': data}
|
return {'type': 'ir.actions.report.xml', 'report_name': 'wizard.report.reporte', 'datas': data}
|
||||||
|
|
||||||
wizard_report()
|
wizard_report()
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
from osv import osv,fields
|
from osv import osv,fields
|
||||||
import pooler
|
import pooler
|
||||||
import time
|
import time
|
||||||
|
@ -40,13 +39,14 @@ class wizard_account_balance_gene(osv.osv_memory):
|
||||||
'filter': fields.selection([('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],'Date/Period Filter'),
|
'filter': fields.selection([('bydate','By Date'),('byperiod','By Period'),('all','By Date and Period'),('none','No Filter')],'Date/Period Filter'),
|
||||||
'fiscalyear': fields.many2one('account.fiscalyear','Fiscal year',help='Keep empty to use all open fiscal years to compute the balance',required=True),
|
'fiscalyear': fields.many2one('account.fiscalyear','Fiscal year',help='Keep empty to use all open fiscal years to compute the balance',required=True),
|
||||||
'periods': fields.many2many('account.period','rel_wizard_period','wizard_id','period_id','Periods',help='All periods in the fiscal year if empty'),
|
'periods': fields.many2many('account.period','rel_wizard_period','wizard_id','period_id','Periods',help='All periods in the fiscal year if empty'),
|
||||||
'display_account': fields.selection([('bal_all','All'),('bal_solde', 'With balance'),('bal_mouvement','With movements')],'Display accounts'),
|
'display_account': fields.selection([('all','All'),('con_balance', 'With balance'),('con_movimiento','With movements')],'Display accounts'),
|
||||||
'display_account_level': fields.integer('Up to level',help='Display accounts up to this level (0 to show all)'),
|
'display_account_level': fields.integer('Up to level',help='Display accounts up to this level (0 to show all)'),
|
||||||
'date_from': fields.date('Start date',required=True),
|
'date_from': fields.date('Start date'),
|
||||||
'date_to': fields.date('End date',required=True),
|
'date_to': fields.date('End date'),
|
||||||
'tot_check': fields.boolean('Show Total'),
|
'tot_check': fields.boolean('Show Total'),
|
||||||
'lab_str': fields.char('Description', size= 128),
|
'lab_str': fields.char('Description', size= 128),
|
||||||
'inf_type': fields.selection([('bgen','Balance General'),('bcom','Balance Comprobacion'),('edogp','Estado Ganancias y Perdidas')],'Tipo Informe',required=True),
|
'inf_type': fields.selection([('bgen','Balance General'),('bcom','Balance Comprobacion'),('edogp','Estado Ganancias y Perdidas')],'Tipo Informe',required=True),
|
||||||
|
#~ 'type_report': fields.selection([('un_col','Una Columna'),('dos_col','Dos Columnas'),('cuatro_col','Cuatro Columnas')],'Tipo Informe',required=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
@ -56,11 +56,20 @@ class wizard_account_balance_gene(osv.osv_memory):
|
||||||
'display_account_level': lambda *a: 0,
|
'display_account_level': lambda *a: 0,
|
||||||
'inf_type': lambda *a:'bcom',
|
'inf_type': lambda *a:'bcom',
|
||||||
'company_id': lambda *a: 1,
|
'company_id': lambda *a: 1,
|
||||||
'fiscalyear': lambda *a: 1,
|
'fiscalyear': lambda self, cr, uid, c: self.pool.get('account.fiscalyear').find(cr, uid),
|
||||||
'display_account': lambda *a:'bal_mouvement',
|
'display_account': lambda *a:'con_movimiento',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def onchange_filter(self,cr,uid,ids,fiscalyear,filters,context=None):
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
res = {}
|
||||||
|
if filters in ("bydate","all"):
|
||||||
|
fisy = self.pool.get("account.fiscalyear")
|
||||||
|
fis_actual = fisy.browse(cr,uid,fiscalyear,context=context)
|
||||||
|
res = {'value':{'date_from': fis_actual.date_start, 'date_to': fis_actual.date_stop}}
|
||||||
|
return res
|
||||||
|
|
||||||
def _get_defaults(self, cr, uid, data, context=None):
|
def _get_defaults(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -75,7 +84,6 @@ class wizard_account_balance_gene(osv.osv_memory):
|
||||||
data['form']['context'] = context
|
data['form']['context'] = context
|
||||||
return data['form']
|
return data['form']
|
||||||
|
|
||||||
|
|
||||||
def _check_state(self, cr, uid, data, context=None):
|
def _check_state(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
@ -83,34 +91,58 @@ class wizard_account_balance_gene(osv.osv_memory):
|
||||||
self._check_date(cr, uid, data, context)
|
self._check_date(cr, uid, data, context)
|
||||||
return data['form']
|
return data['form']
|
||||||
|
|
||||||
|
|
||||||
def _check_date(self, cr, uid, data, context=None):
|
def _check_date(self, cr, uid, data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
|
if data['form']['date_from'] > data['form']['date_to']:
|
||||||
|
raise osv.except_osv(_('Error !'),('La fecha final debe ser mayor a la inicial'))
|
||||||
|
|
||||||
sql = """SELECT f.id, f.date_start, f.date_stop
|
sql = """SELECT f.id, f.date_start, f.date_stop
|
||||||
FROM account_fiscalyear f
|
FROM account_fiscalyear f
|
||||||
WHERE '%s' between f.date_start and f.date_stop """%(data['form']['date_from'])
|
WHERE '%s' = f.id """%(data['form']['fiscalyear'])
|
||||||
cr.execute(sql)
|
cr.execute(sql)
|
||||||
res = cr.dictfetchall()
|
res = cr.dictfetchall()
|
||||||
|
|
||||||
if res:
|
if res:
|
||||||
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
|
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_from'] < res[0]['date_start']):
|
||||||
raise wizard.except_wizard(_('UserError'),_('Date to must be set between %s and %s') % (res[0]['date_start'], res[0]['date_stop']))
|
raise osv.except_osv(_('UserError'),'Las fechas deben estar entre %s y %s' % (res[0]['date_start'], res[0]['date_stop']))
|
||||||
else:
|
else:
|
||||||
return 'report'
|
return 'report'
|
||||||
else:
|
else:
|
||||||
raise wizard.except_wizard(_('UserError'),_('Date not in a defined fiscal year'))
|
raise osv.except_osv(_('UserError'),'No existe periodo fiscal')
|
||||||
|
|
||||||
def print_report(self, cr, uid, ids,data, context=None):
|
def print_report(self, cr, uid, ids,data, context=None):
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
data['ids'] = context.get('active_ids', [])
|
data['ids'] = context.get('active_ids', [])
|
||||||
data['model'] = context.get('active_model', 'ir.ui.menu')
|
data['model'] = context.get('active_model', 'ir.ui.menu')
|
||||||
data['form'] = self.read(cr, uid, ids[0])
|
data['form'] = self.read(cr, uid, ids[0])
|
||||||
|
|
||||||
print 'data',data
|
if data['form']['filter'] == 'byperiod':
|
||||||
|
del data['form']['date_from']
|
||||||
|
del data['form']['date_to']
|
||||||
|
elif data['form']['filter'] == 'bydate':
|
||||||
|
self._check_date(cr, uid, data)
|
||||||
|
del data['form']['periods']
|
||||||
|
elif data['form']['filter'] == 'none':
|
||||||
|
del data['form']['date_from']
|
||||||
|
del data['form']['date_to']
|
||||||
|
del data['form']['periods']
|
||||||
|
else:
|
||||||
|
self._check_date(cr, uid, data)
|
||||||
|
lis2 = str(data['form']['periods']).replace("[","(").replace("]",")")
|
||||||
|
sqlmm = """select min(p.date_start) as inicio, max(p.date_stop) as fin
|
||||||
|
from account_period p
|
||||||
|
where p.id in %s"""%lis2
|
||||||
|
cr.execute(sqlmm)
|
||||||
|
minmax = cr.dictfetchall()
|
||||||
|
if minmax:
|
||||||
|
if (data['form']['date_to'] < minmax[0]['inicio']) or (data['form']['date_from'] > minmax[0]['fin']):
|
||||||
|
raise osv.except_osv(_('Error !'),('La intersepcion entre el periodo y fecha es vacio'))
|
||||||
|
|
||||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene', 'datas': data}
|
return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.gene', 'datas': data}
|
||||||
|
|
||||||
wizard_account_balance_gene()
|
wizard_account_balance_gene()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue