mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
Add demo CSV report on res.users
This commit is contained in:
committed by
Daniel Reis
parent
584d9433b6
commit
862441a656
@@ -16,7 +16,9 @@ To add a text report, you should develop an Odoo module that contains:
|
||||
* a Qweb template,
|
||||
* a Qweb report definition with *report_type = qweb-txt*.
|
||||
|
||||
The module *purchase_dilicom_csv* available on the `dilicom Github repository <https://github.com/akretion/dilicom>`_ (branch *10.0*) is a good example: it adds a report *Dilicom CSV Order* on purchase orders. This report is a CSV file with one line per order line and 2 columns: EAN13 and order quantity.
|
||||
This module provides a small demo report on *Users* called *CSV List*.
|
||||
|
||||
The module *purchase_dilicom_csv* available on the `dilicom Github repository <https://github.com/akretion/dilicom>`_ (branch *10.0*) is a better example: it adds a report *Dilicom CSV Order* on purchase orders. This report is a CSV file with one line per order line and 2 columns: EAN13 and order quantity.
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
'author': 'Akretion,Odoo Community Association (OCA)',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['report'],
|
||||
'demo': ['demo/report.xml', 'demo/res_users_report.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
13
report_qweb_txt/demo/report.xml
Normal file
13
report_qweb_txt/demo/report.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<odoo>
|
||||
|
||||
<report id="res_users_csv"
|
||||
model="res.users"
|
||||
name="report_qweb_txt.report_res_users_csv"
|
||||
string="CSV List"
|
||||
report_type="qweb-txt"
|
||||
file="report_qweb_txt.report_res_users_csv"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
9
report_qweb_txt/demo/res_users_report.xml
Normal file
9
report_qweb_txt/demo/res_users_report.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_res_users_csv">name;login;last_login_date;lang
|
||||
<t t-foreach="docs" t-as="o"><t t-esc="o.name"/>;<t t-esc="o.login"/>;<t t-esc="o.login_date"/>;<t t-esc="o.lang"/>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user