$ 29.00
Base report csv
This module provides a basic report class to generate csv report.
Table of contents
Usage
An example of CSV report for partners on a module called module_name:
A python class
from tulio import models
class PartnerCSV(models.AbstractModel):
_name = 'report.report_csv.partner_csv'
_inherit = 'report.report_csv.abstract'
def generate_csv_report(self, writer, data, partners):
writer.writeheader()
for obj in partners:
writer.writerow({
'name': obj.name,
'email': obj.email,
})
def csv_report_options(self):
res = super().csv_report_options()
res['fieldnames'].append('name')
res['fieldnames'].append('email')
res['delimiter'] = ';'
res['quoting'] = csv.QUOTE_ALL
return res
A report XML record
<report
id="partner_csv"
model="res.partner"
string="Print to CSV"
report_type="csv"
name="module_name.report_name"
file="res_partner"
attachment_use="False"
/>
| Technical name | report_csv |
|---|---|
| Module version | 12.0.1.0.1 |
| Tulio versions | 1.0 |
| Category | Productivity |
| Publisher | Contaura LLC
Ported to Tulio, tested and supported by Contaura LLC. |
| Original authors | Creu Blanca, OCA |
| License | AGPL-3
Open source: you may use, change and share
this module under its license. The price covers the Tulio port, its testing on Tulio
1.0 and the download. |
| Requires (Tulio core) | base, web |
| Lines of code | 338 |
| Downloads | 0 |
| Released | 12/06/2026 |