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.

49 lines
1.6 KiB

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2009-2018 Noviat.
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from odoo import api, models
  5. from odoo.addons.report_xlsx_helper.report.abstract_report_xlsx \
  6. import AbstractReportXlsx
  7. _render = AbstractReportXlsx._render
  8. class AccountMoveLine(models.Model):
  9. _inherit = 'account.move.line'
  10. # Change list in custom module e.g. to add/drop columns or change order
  11. @api.model
  12. def _report_xlsx_fields(self):
  13. return [
  14. 'move', 'name', 'date', 'journal', 'partner', 'account',
  15. 'date_maturity', 'debit', 'credit', 'balance',
  16. 'full_reconcile', 'reconcile_amount',
  17. # 'analytic_account_name', 'analytic_account',
  18. # 'ref', 'partner_ref',
  19. # 'amount_residual', 'amount_currency', 'currency_name',
  20. # 'company_currency', 'amount_residual_currency',
  21. # 'product', 'product_ref', 'product_uom', 'quantity',
  22. # 'statement', 'invoice', 'narration', 'blocked',
  23. # 'id', 'matched_debit_ids', 'matched_credit_ids',
  24. ]
  25. # Change/Add Template entries
  26. @api.model
  27. def _report_xlsx_template(self):
  28. """
  29. Template updates, e.g.
  30. my_change = {
  31. 'move': {
  32. 'header': {
  33. 'value': 'My Move Title',
  34. },
  35. 'lines': {
  36. 'value': _render("line.move_id.name or ''"),
  37. },
  38. 'width': 20,
  39. },
  40. }
  41. return my_change
  42. """
  43. return {}