https://github.com/0k/report_xml_crafting_libs
OpenERP module that adds some convience shortcuts in Mako XML templates
https://github.com/0k/report_xml_crafting_libs
Last synced: over 1 year ago
JSON representation
OpenERP module that adds some convience shortcuts in Mako XML templates
- Host: GitHub
- URL: https://github.com/0k/report_xml_crafting_libs
- Owner: 0k
- Created: 2013-04-03T16:10:11.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-01-28T12:07:52.000Z (over 11 years ago)
- Last Synced: 2025-01-21T10:51:18.115Z (over 1 year ago)
- Language: Python
- Size: 156 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
OpenERP module that provides some convienient shortcuts for crafting XML Mako reports
Requirements
============
This module depends on ``report_xml`` module and will work on OpenERP v6.1 and v7.0
Functions
=========
format_date
-----------
You can use format_date to display a full date in the correct internationalized manner.
For instance::
...
${format_date(object.date_start, "en")}
...
Will output::
...
October 10, 2000
...
For more info, check the docstring of ``format_date()`` in the code.
group_by
--------
This methods allow to group a list depending on the output of a function. This could
allow you to group ``sale_order_lines`` depending on attribute ``product_id.category``
for instance::
...
<%
categs = group_by(object.abstract_line_ids,
key=lambda al: al.product_id.categ_id.complete_name)
%>
% for categ, lines in categs.iteritems():
% for line in lines:
${line.product_id.default_code}
...
%endfor
% endfor
...