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.

586 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. })
  309. if form['inf_type'] == 'IS' and form['columns'] == 'one':
  310. res.update({
  311. 'balance': self.exchange(d-c),
  312. })
  313. else:
  314. res.update({
  315. 'balance': self.exchange(b),
  316. })
  317. elif form['columns'] == 'thirteen':
  318. pn = 1
  319. for p_id in period_ids:
  320. form['periods'] = [p_id]
  321. ctx_init = _ctx_init(self.context.copy())
  322. aa_brw_init = account_obj.browse(self.cr, self.uid, id, ctx_init)
  323. ctx_end = _ctx_end(self.context.copy())
  324. aa_brw_end = account_obj.browse(self.cr, self.uid, id, ctx_end)
  325. if form['inf_type'] == 'IS':
  326. d,c,b = map(z,[aa_brw_end.debit,aa_brw_end.credit,aa_brw_end.balance])
  327. res.update({
  328. 'dbr%s'%pn: self.exchange(d),
  329. 'cdr%s'%pn: self.exchange(c),
  330. 'bal%s'%pn: self.exchange(b),
  331. })
  332. else:
  333. i,d,c = map(z,[aa_brw_init.balance,aa_brw_end.debit,aa_brw_end.credit])
  334. b = z(i+d-c)
  335. res.update({
  336. 'dbr%s'%pn: self.exchange(d),
  337. 'cdr%s'%pn: self.exchange(c),
  338. 'bal%s'%pn: self.exchange(b),
  339. })
  340. pn +=1
  341. form['periods'] = period_ids
  342. ctx_init = _ctx_init(self.context.copy())
  343. aa_brw_init = account_obj.browse(self.cr, self.uid, id, ctx_init)
  344. ctx_end = _ctx_end(self.context.copy())
  345. aa_brw_end = account_obj.browse(self.cr, self.uid, id, ctx_end)
  346. if form['inf_type'] == 'IS':
  347. d,c,b = map(z,[aa_brw_end.debit,aa_brw_end.credit,aa_brw_end.balance])
  348. res.update({
  349. 'dbr13': self.exchange(d),
  350. 'cdr13': self.exchange(c),
  351. 'bal13': self.exchange(b),
  352. })
  353. else:
  354. i,d,c = map(z,[aa_brw_init.balance,aa_brw_end.debit,aa_brw_end.credit])
  355. b = z(i+d-c)
  356. res.update({
  357. 'dbr13': self.exchange(d),
  358. 'cdr13': self.exchange(c),
  359. 'bal13': self.exchange(b),
  360. })
  361. #
  362. # Check whether we must include this line in the report or not
  363. #
  364. to_include = False
  365. if form['columns'] != 'thirteen':
  366. if form['display_account'] == 'mov' and aa_id[3].parent_id:
  367. # Include accounts with movements
  368. if abs(d) >= 0.005 or abs(c) >= 0.005:
  369. to_include = True
  370. elif form['display_account'] == 'bal' and aa_id[3].parent_id:
  371. # Include accounts with balance
  372. if abs(b) >= 0.005:
  373. to_include = True
  374. elif form['display_account'] == 'bal_mov' and aa_id[3].parent_id:
  375. # Include accounts with balance or movements
  376. if abs(b) >= 0.005 or abs(d) >= 0.005 or abs(c) >= 0.005:
  377. to_include = True
  378. else:
  379. # Include all accounts
  380. to_include = True
  381. elif form['columns'] == 'thirteen':
  382. to_test = [False]
  383. if form['display_account'] == 'mov' and aa_id[3].parent_id:
  384. # Include accounts with movements
  385. for x in range(pn-1):
  386. to_test.append(res.get('dbr%s'%x,0.0) >= 0.005 and True or False)
  387. to_test.append(res.get('cdr%s'%x,0.0) >= 0.005 and True or False)
  388. if any(to_test):
  389. to_include = True
  390. elif form['display_account'] == 'bal' and aa_id[3].parent_id:
  391. # Include accounts with balance
  392. for x in range(pn-1):
  393. to_test.append(res.get('bal%s'%x,0.0) >= 0.005 and True or False)
  394. if any(to_test):
  395. to_include = True
  396. elif form['display_account'] == 'bal_mov' and aa_id[3].parent_id:
  397. # Include accounts with balance or movements
  398. for x in range(pn-1):
  399. to_test.append(res.get('bal%s'%x,0.0) >= 0.005 and True or False)
  400. to_test.append(res.get('dbr%s'%x,0.0) >= 0.005 and True or False)
  401. to_test.append(res.get('cdr%s'%x,0.0) >= 0.005 and True or False)
  402. if any(to_test):
  403. to_include = True
  404. else:
  405. # Include all accounts
  406. to_include = True
  407. if to_include:
  408. result_acc.append(res)
  409. #
  410. # Check whether we must sumarize this line in the report or not
  411. #
  412. if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot):
  413. if form['columns'] != 'thirteen':
  414. tot_check = True
  415. tot[res['id']] = True
  416. tot_bin += res['balanceinit']
  417. tot_deb += res['debit']
  418. tot_crd += res['credit']
  419. tot_ytd += res['ytd']
  420. tot_eje += res['balance']
  421. if form['columns'] == 'thirteen':
  422. tot_check = True
  423. tot[res['id']] = True
  424. tot_bal1 += res.get('bal1',0.0)
  425. tot_bal2 += res.get('bal2',0.0)
  426. tot_bal3 += res.get('bal3',0.0)
  427. tot_bal4 += res.get('bal4',0.0)
  428. tot_bal5 += res.get('bal5',0.0)
  429. tot_bal6 += res.get('bal6',0.0)
  430. tot_bal7 += res.get('bal7',0.0)
  431. tot_bal8 += res.get('bal8',0.0)
  432. tot_bal9 += res.get('bal9',0.0)
  433. tot_bal10 += res.get('bal10',0.0)
  434. tot_bal11 += res.get('bal11',0.0)
  435. tot_bal12 += res.get('bal12',0.0)
  436. tot_bal13 += res.get('bal13',0.0)
  437. if tot_check:
  438. str_label = form['lab_str']
  439. res2 = {
  440. 'type' : 'view',
  441. 'name': 'TOTAL %s'%(str_label),
  442. 'label': False,
  443. 'total': True,
  444. }
  445. if form['columns'] != 'thirteen':
  446. res2.update({
  447. 'balanceinit': tot_bin,
  448. 'debit': tot_deb,
  449. 'credit': tot_crd,
  450. 'ytd': tot_ytd,
  451. 'balance': tot_eje,
  452. })
  453. if form['columns'] == 'thirteen':
  454. res2.update(dict(
  455. bal1 = tot_bal1,
  456. bal2 = tot_bal2,
  457. bal3 = tot_bal3,
  458. bal4 = tot_bal4,
  459. bal5 = tot_bal5,
  460. bal6 = tot_bal6,
  461. bal7 = tot_bal7,
  462. bal8 = tot_bal8,
  463. bal9 = tot_bal9,
  464. bal10 = tot_bal10,
  465. bal11 = tot_bal11,
  466. bal12 = tot_bal12,
  467. bal13 = tot_bal13,))
  468. result_acc.append(res2)
  469. print 100 * 'FIN '
  470. return result_acc
  471. report_sxw.report_sxw('report.afr.1cols',
  472. 'wizard.report',
  473. 'account_financial_report/report/balance_full.rml',
  474. parser=account_balance,
  475. header=False)
  476. report_sxw.report_sxw('report.afr.2cols',
  477. 'wizard.report',
  478. 'account_financial_report/report/balance_full_2_cols.rml',
  479. parser=account_balance,
  480. header=False)
  481. report_sxw.report_sxw('report.afr.4cols',
  482. 'wizard.report',
  483. 'account_financial_report/report/balance_full_4_cols.rml',
  484. parser=account_balance,
  485. header=False)
  486. report_sxw.report_sxw('report.afr.5cols',
  487. 'wizard.report',
  488. 'account_financial_report/report/balance_full_5_cols.rml',
  489. parser=account_balance,
  490. header=False)
  491. report_sxw.report_sxw('report.afr.13cols',
  492. 'wizard.report',
  493. 'account_financial_report/report/balance_full_13_cols.rml',
  494. parser=account_balance,
  495. header=False)