You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

578 lines
27 KiB

  1. # -*- encoding: utf-8 -*-
  2. ###########################################################################
  3. # Module Writen to OpenERP, Open Source Management Solution
  4. # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
  5. # All Rights Reserved
  6. ###############Credits######################################################
  7. # Coded by: Humberto Arocha humberto@openerp.com.ve
  8. # Angelica Barrios angelicaisabelb@gmail.com
  9. # Jordi Esteve <jesteve@zikzakmedia.com>
  10. # Javier Duran <javieredm@gmail.com>
  11. # Planified by: Humberto Arocha
  12. # Finance by: LUBCAN COL S.A.S http://www.lubcancol.com
  13. # Audited by: Humberto Arocha humberto@openerp.com.ve
  14. #############################################################################
  15. # This program is free software: you can redistribute it and/or modify
  16. # it under the terms of the GNU General Public License as published by
  17. # the Free Software Foundation, either version 3 of the License, or
  18. # (at your option) any later version.
  19. #
  20. # This program is distributed in the hope that it will be useful,
  21. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. # GNU General Public License for more details.
  24. #
  25. # You should have received a copy of the GNU General Public License
  26. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  27. ##############################################################################
  28. import xml
  29. import copy
  30. from operator import itemgetter
  31. import time
  32. import datetime
  33. from report import report_sxw
  34. from tools import config
  35. from tools.translate import _
  36. class account_balance(report_sxw.rml_parse):
  37. def __init__(self, cr, uid, name, context):
  38. super(account_balance, self).__init__(cr, uid, name, context)
  39. self.sum_debit = 0.00
  40. self.sum_credit = 0.00
  41. self.sum_balance = 0.00
  42. self.sum_debit_fy = 0.00
  43. self.sum_credit_fy = 0.00
  44. self.sum_balance_fy = 0.00
  45. self.date_lst = []
  46. self.date_lst_string = ''
  47. self.localcontext.update({
  48. 'time': time,
  49. 'lines': self.lines,
  50. 'get_fiscalyear_text': self.get_fiscalyear_text,
  51. 'get_periods_and_date_text': self.get_periods_and_date_text,
  52. 'get_informe_text': self.get_informe_text,
  53. 'get_month':self.get_month,
  54. 'exchange_name':self.exchange_name,
  55. })
  56. self.context = context
  57. def get_fiscalyear_text(self, form):
  58. """
  59. Returns the fiscal year text used on the report.
  60. """
  61. fiscalyear_obj = self.pool.get('account.fiscalyear')
  62. fiscalyear = None
  63. if form.get('fiscalyear'):
  64. fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, form['fiscalyear'])
  65. return fiscalyear.name or fiscalyear.code
  66. else:
  67. fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear_obj.find(self.cr, self.uid))
  68. return "%s*" % (fiscalyear.name or fiscalyear.code)
  69. def get_informe_text(self, form):
  70. """
  71. Returns the header text used on the report.
  72. """
  73. inf_type = {
  74. 'bgen' : 'Balance General',
  75. 'IS' : 'Income Statement',
  76. 'bcom' : 'Balance de Comprobacion',
  77. 'edogp': 'Estado de Ganancias y Perdidas',
  78. 'bml' : 'Libro Mayor Legal',
  79. 'bdl' : 'Diario Legal'
  80. }
  81. return inf_type[form['inf_type']]
  82. def get_month(self, form):
  83. '''
  84. return day, year and month
  85. '''
  86. if form['filter'] in ['bydate', 'all']:
  87. months=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]
  88. mes = months[time.strptime(form['date_to'],"%Y-%m-%d")[1]-1]
  89. ano = time.strptime(form['date_to'],"%Y-%m-%d")[0]
  90. dia = time.strptime(form['date_to'],"%Y-%m-%d")[2]
  91. return 'Período del '+self.formatLang(form['date_from'], date=True)+' al '+self.formatLang(form['date_to'], date=True)
  92. elif form['filter'] in ['byperiod', 'all']:
  93. aux=[]
  94. period_obj = self.pool.get('account.period')
  95. for period in period_obj.browse(self.cr, self.uid, form['periods']):
  96. aux.append(period.date_start)
  97. aux.append(period.date_stop)
  98. sorted(aux)
  99. return _('Período del ')+self.formatLang(aux[0], date=True)+_(' al ')+self.formatLang(aux[-1], date=True)
  100. def get_periods_and_date_text(self, form):
  101. """
  102. Returns the text with the periods/dates used on the report.
  103. """
  104. period_obj = self.pool.get('account.period')
  105. periods_str = None
  106. fiscalyear_id = form['fiscalyear'] or fiscalyear_obj.find(self.cr, self.uid)
  107. period_ids = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear_id),('special','=',False)])
  108. if form['filter'] in ['byperiod', 'all']:
  109. period_ids = form['periods']
  110. periods_str = ', '.join([period.name or period.code for period in period_obj.browse(self.cr, self.uid, period_ids)])
  111. dates_str = None
  112. if form['filter'] in ['bydate', 'all']:
  113. dates_str = self.formatLang(form['date_from'], date=True) + ' - ' + self.formatLang(form['date_to'], date=True) + ' '
  114. return {'periods':periods_str, 'date':dates_str}
  115. def special_period(self, periods):
  116. period_obj = self.pool.get('account.period')
  117. period_brw = period_obj.browse(self.cr, self.uid, periods)
  118. period_counter = [True for i in period_brw if not i.special]
  119. if not period_counter:
  120. return True
  121. return False
  122. def exchange_name(self, form):
  123. self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
  124. if not form['currency_id']:
  125. self.to_currency_id = self.from_currency_id
  126. else:
  127. self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
  128. return self.pool.get('res.currency').browse(self.cr, self.uid, self.to_currency_id).name
  129. def exchange(self, from_amount):
  130. if self.from_currency_id == self.to_currency_id:
  131. return from_amount
  132. curr_obj = self.pool.get('res.currency')
  133. return curr_obj.compute(self.cr, self.uid, self.from_currency_id, self.to_currency_id, from_amount)
  134. def get_company_currency(self, company_id):
  135. rc_obj = self.pool.get('res.company')
  136. return rc_obj.browse(self.cr, self.uid, company_id).currency_id.id
  137. def get_company_accounts(self, company_id, acc='credit'):
  138. rc_obj = self.pool.get('res.company')
  139. if acc=='credit':
  140. return [brw.id for brw in rc_obj.browse(self.cr, self.uid, company_id).credit_account_ids]
  141. else:
  142. return [brw.id for brw in rc_obj.browse(self.cr, self.uid, company_id).debit_account_ids]
  143. def lines(self, form, level=0):
  144. """
  145. Returns all the data needed for the report lines
  146. (account info plus debit/credit/balance in the selected period
  147. and the full year)
  148. """
  149. account_obj = self.pool.get('account.account')
  150. period_obj = self.pool.get('account.period')
  151. fiscalyear_obj = self.pool.get('account.fiscalyear')
  152. def _get_children_and_consol(cr, uid, ids, level, context={},change_sign=False):
  153. aa_obj = self.pool.get('account.account')
  154. ids2=[]
  155. for aa_brw in aa_obj.browse(cr, uid, ids, context):
  156. if aa_brw.child_id and aa_brw.level < level and aa_brw.type !='consolidation':
  157. if not change_sign:
  158. ids2.append([aa_brw.id,True, False,aa_brw])
  159. ids2 += _get_children_and_consol(cr, uid, [x.id for x in aa_brw.child_id], level, context,change_sign=change_sign)
  160. if change_sign:
  161. ids2.append(aa_brw.id)
  162. else:
  163. ids2.append([aa_brw.id,False,True,aa_brw])
  164. else:
  165. if change_sign:
  166. ids2.append(aa_brw.id)
  167. else:
  168. ids2.append([aa_brw.id,True,True,aa_brw])
  169. return ids2
  170. #############################################################################
  171. # CONTEXT FOR ENDIND BALANCE #
  172. #############################################################################
  173. def _ctx_end(ctx):
  174. ctx_end = ctx
  175. ctx_end['filter'] = form.get('filter','all')
  176. ctx_end['fiscalyear'] = fiscalyear.id
  177. #~ ctx_end['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('special','=',False)])
  178. if ctx_end['filter'] not in ['bydate','none']:
  179. special = self.special_period(form['periods'])
  180. else:
  181. special = False
  182. if form['filter'] in ['byperiod', 'all']:
  183. if special:
  184. ctx_end['periods'] = period_obj.search(self.cr, self.uid, [('id','in',form['periods'] or ctx_end.get('periods',False))])
  185. else:
  186. ctx_end['periods'] = period_obj.search(self.cr, self.uid, [('id','in',form['periods'] or ctx_end.get('periods',False)),('special','=',False)])
  187. if form['filter'] in ['bydate','all','none']:
  188. ctx_end['date_from'] = form['date_from']
  189. ctx_end['date_to'] = form['date_to']
  190. return ctx_end.copy()
  191. def missing_period(ctx_init):
  192. ctx_init['fiscalyear'] = fiscalyear_obj.search(self.cr, self.uid, [('date_stop','<',fiscalyear.date_start)],order='date_stop') and \
  193. fiscalyear_obj.search(self.cr, self.uid, [('date_stop','<',fiscalyear.date_start)],order='date_stop')[-1] or []
  194. ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',ctx_init['fiscalyear']),('date_stop','<',fiscalyear.date_start)])
  195. return ctx_init
  196. #############################################################################
  197. # CONTEXT FOR INITIAL BALANCE #
  198. #############################################################################
  199. def _ctx_init(ctx):
  200. ctx_init = self.context.copy()
  201. ctx_init['filter'] = form.get('filter','all')
  202. ctx_init['fiscalyear'] = fiscalyear.id
  203. if form['filter'] in ['byperiod', 'all']:
  204. ctx_init['periods'] = form['periods']
  205. if not ctx_init['periods']:
  206. ctx_init = missing_period(ctx_init.copy())
  207. date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx_init['periods'])])
  208. ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',date_start)])
  209. elif form['filter'] in ['bydate']:
  210. ctx_init['date_from'] = fiscalyear.date_start
  211. ctx_init['date_to'] = form['date_from']
  212. ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_stop','<=',ctx_init['date_to'])])
  213. elif form['filter'] == 'none':
  214. ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('special','=',True)])
  215. date_start = min([period.date_start for period in period_obj.browse(self.cr, self.uid, ctx_init['periods'])])
  216. ctx_init['periods'] = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('date_start','<=',date_start),('special','=',True)])
  217. return ctx_init.copy()
  218. def z(n):
  219. return abs(n) < 0.005 and 0.0 or n
  220. self.from_currency_id = self.get_company_currency(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'])
  221. if not form['currency_id']:
  222. self.to_currency_id = self.from_currency_id
  223. else:
  224. self.to_currency_id = form['currency_id'] and type(form['currency_id']) in (list, tuple) and form['currency_id'][0] or form['currency_id']
  225. if form.has_key('account_list') and form['account_list']:
  226. account_ids = form['account_list']
  227. del form['account_list']
  228. credit_account_ids = self.get_company_accounts(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'],'credit')
  229. print 'Primer print de credit_account_ids ', credit_account_ids
  230. debit_account_ids = self.get_company_accounts(form['company_id'] and type(form['company_id']) in (list,tuple) and form['company_id'][0] or form['company_id'],'debit')
  231. print 'Primer print de debit_account_ids ', debit_account_ids
  232. if form.get('fiscalyear'):
  233. if type(form.get('fiscalyear')) in (list,tuple):
  234. fiscalyear = form['fiscalyear'] and form['fiscalyear'][0]
  235. elif type(form.get('fiscalyear')) in (int,):
  236. fiscalyear = form['fiscalyear']
  237. fiscalyear = fiscalyear_obj.browse(self.cr, self.uid, fiscalyear)
  238. ################################################################
  239. # Get the accounts #
  240. ################################################################
  241. account_ids = _get_children_and_consol(self.cr, self.uid, account_ids, form['display_account_level'] and form['display_account_level'] or 100,self.context)
  242. credit_account_ids = _get_children_and_consol(self.cr, self.uid, credit_account_ids, 100,self.context,change_sign=True)
  243. print 'credit_account_ids ', credit_account_ids
  244. debit_account_ids = _get_children_and_consol(self.cr, self.uid, debit_account_ids, 100,self.context,change_sign=True)
  245. print 'debit_account_ids ', debit_account_ids
  246. credit_account_ids = list(set(credit_account_ids) - set(debit_account_ids))
  247. print 'Segundo print de credit_account_ids ', credit_account_ids
  248. #
  249. # Generate the report lines (checking each account)
  250. #
  251. tot_check = False
  252. if form['columns'] != 'thirteen':
  253. ctx_init = _ctx_init(self.context.copy())
  254. ctx_end = _ctx_end(self.context.copy())
  255. tot_bin = 0.0
  256. tot_deb = 0.0
  257. tot_crd = 0.0
  258. tot_ytd = 0.0
  259. tot_eje = 0.0
  260. elif form['columns'] == 'thirteen':
  261. tot_bal1 = 0.0
  262. tot_bal2 = 0.0
  263. tot_bal3 = 0.0
  264. tot_bal4 = 0.0
  265. tot_bal5 = 0.0
  266. tot_bal6 = 0.0
  267. tot_bal7 = 0.0
  268. tot_bal8 = 0.0
  269. tot_bal9 = 0.0
  270. tot_bal10 = 0.0
  271. tot_bal11 = 0.0
  272. tot_bal12 = 0.0
  273. tot_bal13 = 0.0
  274. res = {}
  275. result_acc = []
  276. tot = {}
  277. print 'TIPO DE INFORME ',form['inf_type']
  278. if form['columns'] == 'thirteen':
  279. period_ids = period_obj.search(self.cr, self.uid, [('fiscalyear_id','=',fiscalyear.id),('special','=',False)],order='date_start asc')
  280. print 'TODOS LOS PERIODS ',period_ids
  281. for aa_id in account_ids:
  282. id = aa_id[0]
  283. #
  284. # Check if we need to include this level
  285. #
  286. if not form['display_account_level'] or aa_id[3].level <= form['display_account_level']:
  287. res = {
  288. 'id' : id,
  289. 'type' : aa_id[3].type,
  290. 'code' : aa_id[3].code,
  291. 'name' : (aa_id[2] and not aa_id[1]) and 'TOTAL %s'%(aa_id[3].name.upper()) or aa_id[3].name,
  292. 'parent_id' : aa_id[3].parent_id and aa_id[3].parent_id.id,
  293. 'level' : aa_id[3].level,
  294. 'label' : aa_id[1],
  295. 'total' : aa_id[2],
  296. 'change_sign' : credit_account_ids and (id in credit_account_ids and -1 or 1) or 1
  297. }
  298. if form['columns'] != 'thirteen':
  299. aa_brw_init = account_obj.browse(self.cr, self.uid, id, ctx_init)
  300. aa_brw_end = account_obj.browse(self.cr, self.uid, id, ctx_end)
  301. i,d,c = map(z,[aa_brw_init.balance,aa_brw_end.debit,aa_brw_end.credit])
  302. b = z(i+d-c)
  303. res.update({
  304. 'balanceinit': self.exchange(i),
  305. 'debit': self.exchange(d),
  306. 'credit': self.exchange(c),
  307. 'ytd': self.exchange(d-c),
  308. 'balance': self.exchange(b),
  309. })
  310. elif form['columns'] == 'thirteen':
  311. pn = 1
  312. for p_id in period_ids:
  313. form['periods'] = [p_id]
  314. ctx_init = _ctx_init(self.context.copy())
  315. aa_brw_init = account_obj.browse(self.cr, self.uid, id, ctx_init)
  316. ctx_end = _ctx_end(self.context.copy())
  317. aa_brw_end = account_obj.browse(self.cr, self.uid, id, ctx_end)
  318. if form['inf_type'] == 'IS':
  319. d,c,b = map(z,[aa_brw_end.debit,aa_brw_end.credit,aa_brw_end.balance])
  320. res.update({
  321. 'dbr%s'%pn: self.exchange(d),
  322. 'cdr%s'%pn: self.exchange(c),
  323. 'bal%s'%pn: self.exchange(b),
  324. })
  325. else:
  326. i,d,c = map(z,[aa_brw_init.balance,aa_brw_end.debit,aa_brw_end.credit])
  327. b = z(i+d-c)
  328. res.update({
  329. 'dbr%s'%pn: self.exchange(d),
  330. 'cdr%s'%pn: self.exchange(c),
  331. 'bal%s'%pn: self.exchange(b),
  332. })
  333. pn +=1
  334. form['periods'] = period_ids
  335. ctx_init = _ctx_init(self.context.copy())
  336. aa_brw_init = account_obj.browse(self.cr, self.uid, id, ctx_init)
  337. ctx_end = _ctx_end(self.context.copy())
  338. aa_brw_end = account_obj.browse(self.cr, self.uid, id, ctx_end)
  339. if form['inf_type'] == 'IS':
  340. d,c,b = map(z,[aa_brw_end.debit,aa_brw_end.credit,aa_brw_end.balance])
  341. res.update({
  342. 'dbr13': self.exchange(d),
  343. 'cdr13': self.exchange(c),
  344. 'bal13': self.exchange(b),
  345. })
  346. else:
  347. i,d,c = map(z,[aa_brw_init.balance,aa_brw_end.debit,aa_brw_end.credit])
  348. b = z(i+d-c)
  349. res.update({
  350. 'dbr13': self.exchange(d),
  351. 'cdr13': self.exchange(c),
  352. 'bal13': self.exchange(b),
  353. })
  354. #
  355. # Check whether we must include this line in the report or not
  356. #
  357. to_include = False
  358. if form['columns'] != 'thirteen':
  359. if form['display_account'] == 'mov' and aa_id[3].parent_id:
  360. # Include accounts with movements
  361. if abs(d) >= 0.005 or abs(c) >= 0.005:
  362. to_include = True
  363. elif form['display_account'] == 'bal' and aa_id[3].parent_id:
  364. # Include accounts with balance
  365. if abs(b) >= 0.005:
  366. to_include = True
  367. elif form['display_account'] == 'bal_mov' and aa_id[3].parent_id:
  368. # Include accounts with balance or movements
  369. if abs(b) >= 0.005 or abs(d) >= 0.005 or abs(c) >= 0.005:
  370. to_include = True
  371. else:
  372. # Include all accounts
  373. to_include = True
  374. elif form['columns'] == 'thirteen':
  375. to_test = [False]
  376. if form['display_account'] == 'mov' and aa_id[3].parent_id:
  377. # Include accounts with movements
  378. for x in range(pn-1):
  379. to_test.append(res.get('dbr%s'%x,0.0) >= 0.005 and True or False)
  380. to_test.append(res.get('cdr%s'%x,0.0) >= 0.005 and True or False)
  381. if any(to_test):
  382. to_include = True
  383. elif form['display_account'] == 'bal' and aa_id[3].parent_id:
  384. # Include accounts with balance
  385. for x in range(pn-1):
  386. to_test.append(res.get('bal%s'%x,0.0) >= 0.005 and True or False)
  387. if any(to_test):
  388. to_include = True
  389. elif form['display_account'] == 'bal_mov' and aa_id[3].parent_id:
  390. # Include accounts with balance or movements
  391. for x in range(pn-1):
  392. to_test.append(res.get('bal%s'%x,0.0) >= 0.005 and True or False)
  393. to_test.append(res.get('dbr%s'%x,0.0) >= 0.005 and True or False)
  394. to_test.append(res.get('cdr%s'%x,0.0) >= 0.005 and True or False)
  395. if any(to_test):
  396. to_include = True
  397. else:
  398. # Include all accounts
  399. to_include = True
  400. if to_include:
  401. result_acc.append(res)
  402. #
  403. # Check whether we must sumarize this line in the report or not
  404. #
  405. if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
  406. if form['columns'] != 'thirteen':
  407. tot_check = True
  408. tot[res['id']] = True
  409. tot_bin += res['balanceinit']
  410. tot_deb += res['debit']
  411. tot_crd += res['credit']
  412. tot_ytd += res['ytd']
  413. tot_eje += res['balance']
  414. if form['columns'] == 'thirteen':
  415. tot_check = True
  416. tot[res['id']] = True
  417. tot_bal1 += res.get('bal1',0.0)
  418. tot_bal2 += res.get('bal2',0.0)
  419. tot_bal3 += res.get('bal3',0.0)
  420. tot_bal4 += res.get('bal4',0.0)
  421. tot_bal5 += res.get('bal5',0.0)
  422. tot_bal6 += res.get('bal6',0.0)
  423. tot_bal7 += res.get('bal7',0.0)
  424. tot_bal8 += res.get('bal8',0.0)
  425. tot_bal9 += res.get('bal9',0.0)
  426. tot_bal10 += res.get('bal10',0.0)
  427. tot_bal11 += res.get('bal11',0.0)
  428. tot_bal12 += res.get('bal12',0.0)
  429. tot_bal13 += res.get('bal13',0.0)
  430. if tot_check:
  431. str_label = form['lab_str']
  432. res2 = {
  433. 'type' : 'view',
  434. 'name': 'TOTAL %s'%(str_label),
  435. 'label': False,
  436. 'total': True,
  437. }
  438. if form['columns'] != 'thirteen':
  439. res2.update({
  440. 'balanceinit': tot_bin,
  441. 'debit': tot_deb,
  442. 'credit': tot_crd,
  443. 'ytd': tot_ytd,
  444. 'balance': tot_eje,
  445. })
  446. if form['columns'] == 'thirteen':
  447. res2.update(dict(
  448. bal1 = tot_bal1,
  449. bal2 = tot_bal2,
  450. bal3 = tot_bal3,
  451. bal4 = tot_bal4,
  452. bal5 = tot_bal5,
  453. bal6 = tot_bal6,
  454. bal7 = tot_bal7,
  455. bal8 = tot_bal8,
  456. bal9 = tot_bal9,
  457. bal10 = tot_bal10,
  458. bal11 = tot_bal11,
  459. bal12 = tot_bal12,
  460. bal13 = tot_bal13,))
  461. result_acc.append(res2)
  462. print 100 * 'FIN '
  463. return result_acc
  464. report_sxw.report_sxw('report.afr.1cols',
  465. 'wizard.report',
  466. 'account_financial_report/report/balance_full.rml',
  467. parser=account_balance,
  468. header=False)
  469. report_sxw.report_sxw('report.afr.2cols',
  470. 'wizard.report',
  471. 'account_financial_report/report/balance_full_2_cols.rml',
  472. parser=account_balance,
  473. header=False)
  474. report_sxw.report_sxw('report.afr.4cols',
  475. 'wizard.report',
  476. 'account_financial_report/report/balance_full_4_cols.rml',
  477. parser=account_balance,
  478. header=False)
  479. report_sxw.report_sxw('report.afr.5cols',
  480. 'wizard.report',
  481. 'account_financial_report/report/balance_full_5_cols.rml',
  482. parser=account_balance,
  483. header=False)
  484. report_sxw.report_sxw('report.afr.13cols',
  485. 'wizard.report',
  486. 'account_financial_report/report/balance_full_13_cols.rml',
  487. parser=account_balance,
  488. header=False)