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.

52 lines
2.0 KiB

  1. # -*- encoding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # OpenERP, Open Source Management Solution
  5. #
  6. # Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
  7. #
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU Affero General Public License as
  10. # published by the Free Software Foundation, either version 3 of the
  11. # License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU Affero General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU Affero General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. #
  21. ##############################################################################
  22. from openerp.osv import orm
  23. from openerp.addons.report_xls.utils import rowcol_to_cell, _render
  24. from openerp.tools.translate import _
  25. class account_move_line(orm.Model):
  26. _inherit = 'account.move.line'
  27. # override list in custom module to add/drop columns or change order
  28. def _report_xls_fields(self, cr, uid, context=None):
  29. return [
  30. 'move', 'name', 'date', 'period', 'partner', 'account',
  31. 'date_maturity', 'debit', 'credit', 'balance', 'reconcile', 'reconcile_partial',
  32. #'amount_currency', 'currency_name',
  33. ]
  34. # Change/Add Template entries
  35. def _report_xls_template(self, cr, uid, context=None):
  36. """
  37. Template updates, e.g.
  38. my_change = {
  39. 'move':{
  40. 'header': [1, 20, 'text', _('My Move Title')],
  41. 'lines': [1, 0, 'text', _render("line.move_id.name or ''")],
  42. 'totals': [1, 0, 'text', None]},
  43. }
  44. return my_change
  45. """
  46. return {}