This repository groups modules that provide py3o templates for basic Odoo reports.
The py3o templates in this repository use the module report_py3o from the OCA report-engine repository.
It requires the following Python dependencies:
pip install py3o.template
pip install py3o.formats
py3o.template allows to create templates directly on LibreOffice, following the syntax available on the py3o.template documentation.
There are 3 available options to track changes in your .odt template :
-
Use the Compare Document native option in LibreOffice
-
Extract the .xml of your two .odt documents and compare it with classic
git diff
orgitk
tools. Be aware that the text on the header and the footer are located in a separate .xml file from the main text. -
Use classic
git diff
orgitk
tools after converting the .odt binary files to plain text formats:- Install odt2txt sudo apt-get update sudo apt-get install odt2txt
- Add
*.odt diff=odt
in your git attributes file~/.config/git/attributes
, if you want to add this attribute on a global level configuration, creating a newattributes
file if necessary.
If you want to add this attributes only on a project level configuration, add it in
<your project dir>/.gitattributes
.- In your global git config file
~/.gitconfig
add the reading option :
[diff "odt"] textconv = odt2txt binary = true
It is possible to write py3o format functions like py3o://function="lang== ' '"
or py3o://function="format_multiline_value()"
in LibreOffice input-fields instead of using the hyperlink method, using this patch.
- Copyright (C) 2015-TODAY Akretion (http://www.akretion.com).
- Alexis de Lattre [email protected]
AGPL-V3
(Work in progress)