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.

60 lines
1.6 KiB

  1. # Copyright 2009-2020 Noviat.
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import api, models
  4. from odoo.addons.report_xlsx_helper.report.report_xlsx_abstract import (
  5. ReportXlsxAbstract,
  6. )
  7. _render = ReportXlsxAbstract._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",
  15. "name",
  16. "date",
  17. "journal",
  18. "partner",
  19. "account",
  20. "date_maturity",
  21. "debit",
  22. "credit",
  23. "balance",
  24. "full_reconcile",
  25. "reconcile_amount",
  26. # 'analytic_account_name', 'analytic_account',
  27. # 'ref', 'partner_ref',
  28. # 'amount_residual', 'amount_currency', 'currency_name',
  29. # 'company_currency', 'amount_residual_currency',
  30. # 'product', 'product_ref', 'product_uom', 'quantity',
  31. # 'statement', 'invoice', 'narration', 'blocked',
  32. # 'id', 'matched_debit_ids', 'matched_credit_ids',
  33. ]
  34. # Change/Add Template entries
  35. @api.model
  36. def _report_xlsx_template(self):
  37. """
  38. Template updates, e.g.
  39. my_change = {
  40. 'move': {
  41. 'header': {
  42. 'value': 'My Move Title',
  43. },
  44. 'lines': {
  45. 'value': _render("line.move_id.name or ''"),
  46. },
  47. 'width': 20,
  48. },
  49. }
  50. return my_change
  51. """
  52. return {}