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.

55 lines
2.2 KiB

11 years ago
  1. # -*- encoding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # OpenERP, Open Source Management Solution
  5. #
  6. # Copyright (c) 2014 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. class account_move_line(orm.Model):
  24. _inherit = 'account.move.line'
  25. # override list in custom module to add/drop columns or change order
  26. def _report_xls_fields(self, cr, uid, context=None):
  27. return [
  28. 'move', 'name', 'date', 'journal', 'period', 'partner', 'account',
  29. 'date_maturity', 'debit', 'credit', 'balance',
  30. 'reconcile', 'reconcile_partial', 'analytic_account',
  31. # 'ref', 'partner_ref', 'tax_code', 'tax_amount',
  32. # 'amount_residual', 'amount_currency', 'currency_name',
  33. # 'company_currency', 'amount_residual_currency',
  34. # 'product', 'product_ref', 'product_uom', 'quantity',
  35. # 'statement', 'invoice', 'narration', 'blocked',
  36. ]
  37. # Change/Add Template entries
  38. def _report_xls_template(self, cr, uid, context=None):
  39. """
  40. Template updates, e.g.
  41. my_change = {
  42. 'move':{
  43. 'header': [1, 20, 'text', _('My Move Title')],
  44. 'lines': [1, 0, 'text', _render("line.move_id.name or ''")],
  45. 'totals': [1, 0, 'text', None]},
  46. }
  47. return my_change
  48. """
  49. return {}