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.

57 lines
2.2 KiB

  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 import models, api
  23. class account_move_line(models.Model):
  24. _inherit = 'account.move.line'
  25. # override list in custom module to add/drop columns or change order
  26. @api.model
  27. def _report_xls_fields(self):
  28. return [
  29. 'move', 'name', 'date', 'journal', 'period', 'partner', 'account',
  30. 'date_maturity', 'debit', 'credit', 'balance',
  31. 'reconcile', 'reconcile_partial', 'analytic_account',
  32. # 'ref', 'partner_ref', 'tax_code', 'tax_amount',
  33. # 'amount_residual', 'amount_currency', 'currency_name',
  34. # 'company_currency', 'amount_residual_currency',
  35. # 'product', 'product_ref', 'product_uom', 'quantity',
  36. # 'statement', 'invoice', 'narration', 'blocked',
  37. ]
  38. # Change/Add Template entries
  39. @api.model
  40. def _report_xls_template(self):
  41. """
  42. Template updates, e.g.
  43. my_change = {
  44. 'move':{
  45. 'header': [1, 20, 'text', _('My Move Title')],
  46. 'lines': [1, 0, 'text', _render("line.move_id.name or ''")],
  47. 'totals': [1, 0, 'text', None]},
  48. }
  49. return my_change
  50. """
  51. return {}