OCA reporting engine fork for dev and update.
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.

76 lines
2.3 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. ================
  5. Base report xlsx
  6. ================
  7. This module provides a basic report class to generate xlsx report.
  8. Usage
  9. =====
  10. An example of XLSX report for partners:
  11. A python class ::
  12. from openerp.addons.report_xlsx.report.report_xlsx import ReportXlsx
  13. class partner_xlsx(ReportXlsx):
  14. def generate_xlsx_report(self, workbook, data, partners):
  15. for obj in partners:
  16. report_name = obj.name
  17. # One sheet by partner
  18. sheet = workbook.add_worksheet(report_name[:31])
  19. bold = workbook.add_format({'bold': True})
  20. sheet.write(0, 0, obj.name, bold)
  21. partner_xlsx('report.res.partner.xlsx',
  22. 'res.partner')
  23. A report XML record ::
  24. <report
  25. id="partner_xlsx"
  26. model="res.partner"
  27. string="Print to XLSX"
  28. report_type="xlsx"
  29. name="res.partner.xlsx"
  30. file="res.partner.xlsx"
  31. attachment_use="False"
  32. />
  33. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  34. :alt: Try me on Runbot
  35. :target: https://runbot.odoo-community.org/runbot/143/9.0
  36. Bug Tracker
  37. ===========
  38. Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
  39. In case of trouble, please check there if your issue has already been reported.
  40. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
  41. `here <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xlsx%0Aversion:%209.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
  42. Credits
  43. =======
  44. Contributors
  45. ------------
  46. * Adrien Peiffer <adrien.peiffer@acsone.eu>
  47. Maintainer
  48. ----------
  49. .. image:: https://odoo-community.org/logo.png
  50. :alt: Odoo Community Association
  51. :target: https://odoo-community.org
  52. This module is maintained by the OCA.
  53. OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
  54. To contribute to this module, please visit https://odoo-community.org.