Browse Source

Add demo CSV report on res.users

pull/90/head
Alexis de Lattre 8 years ago
parent
commit
54f53e13fe
  1. 4
      report_qweb_txt/README.rst
  2. 1
      report_qweb_txt/__manifest__.py
  3. 13
      report_qweb_txt/demo/report.xml
  4. 9
      report_qweb_txt/demo/res_users_report.xml

4
report_qweb_txt/README.rst

@ -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

1
report_qweb_txt/__manifest__.py

@ -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

@ -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

@ -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>
Loading…
Cancel
Save