Commit Graph
146 Commits
Author SHA1 Message Date
Cédric Krier 07c296fc27 Add timeout to Report.convert
issue7972
review50691002
2019-01-15 00:09:38 +01:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier 02572c1249 Define title outside the loop
If languages is empty for Report.get_email, the title is used before
assignation.

issue7499
review47501002
2018-06-11 23:15:05 +02:00
Cédric Krier aab2b6e015 Allow to call set_lang with None or language instance
This simplify code in report. When the language is None, the default language
from the configuration is used.

issue7449
review51271002
2018-05-23 23:08:44 +02:00
Cédric Krier cb29af71ad Replace unoconv by calling soffice directly
issue5907
review34341002
2018-01-12 16:25:20 +01:00
Cédric Krier dec63a577e Ensure returned records have the context from the calling time
The context may be modified between the call to Report._get_records and the
access to the record attribute.

issue7032
review44551002
2018-01-09 18:38:04 +01:00
Cédric Krier 67ec7b7bf5 Avoid cycled import between report and ir 2017-11-27 17:34:02 +01:00
Cédric Krier 473ac78eb4 Add exceptional parent language
issue6956
review40821003
2017-11-25 22:00:24 +01:00
Cédric Krier 271442d913 Simplify language formatting
* Add get method on ir.lang
* Convert format, currency and strftime of ir.lang into instance methods

issue6858
review40761002
2017-11-15 00:15:27 +01:00
Cédric Krier c83e9b51e3 Allow to use report name or instance in get_email
issue6774
review38731002
2017-09-27 18:50:07 +02:00
Cédric Krier db0b15e4e9 Add support for int and str on TranslateModel
In Python3, those methods are not resolved using __getattr__ machinery.
2017-09-03 11:53:19 +02:00
Cédric Krier f110fccf44 Add support for single record report
A single report render each record separately and return them in a zip file.
To ensure the uniqueness of the file in the zip, it uses the id of the record
but also the record name to be user-friendly.

issue6640
review37581002
2017-09-03 11:14:10 +02:00
Cédric Krier 9ad70213a3 Add get_email in trytond.report
issue6671
review36511002
2017-08-28 23:15:14 +02:00
Sergi Almacellas Abellana f29f3c0085 Replace plain extension by txt
issue6676
review41501002
2017-08-24 15:42:05 +02:00
Cédric Krier 4d5046f028 Store custom report translation in separate module
Such translations should not be linked to the original report module as they
are only available in this database.
The translations menu entry should show also those who are not linked to a
module.

issue6059
review29761002
2016-12-21 23:44:21 +01:00
Cédric Krier 16336ffeae Support derivative translations in reports
TranslateFactory must search throw all parents languages.

issue6012
review30751003
2016-11-05 19:59:51 +01:00
Ralf Peschke 4876059350 Add xlsx and docx to output document formats
review28511002
2016-10-21 13:00:19 +02:00
Cédric Krier 15b80c5dd2 Allow Report to generate text plain, XML, HTML and XHTML
It allows plain, XML, HTML and XHTML as template extension.
It changes the translation type 'odt' into the more generic keyword 'report'.
Translation for text based template are extracted using the Genshi tools.

issue5185
review24951002
2016-03-25 11:08:58 +01:00
Cédric Krier b19e93e3a9 Remove style on Report
issue4904
review18481002
2015-08-21 18:03:44 +02:00
Cédric Krier 5cfde31ed2 Use bytes and bytearray for Binary
issue4637
review11091002
2015-03-16 19:28:34 +01:00
Nicolas Évrard a8acb64a51 Report API refactorization
review8831002
2015-01-20 18:48:46 +01:00
Nicolas Évrard 6b0eac601a Use data's action_id to find report to use
issue4411
review10741002
2014-12-18 11:36:40 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier a2c8111f26 Use context to check model and field access
* Model and Field access checked only if _check_access is set
* Add check_access to RPC
* Add check_access to Wizard and Report

issue4081
review8481002
2014-09-17 21:43:53 +02:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Cédric Krier 6bd350ff02 Fallback to data model in Report
review1221002
2013-10-27 19:44:22 +01:00
Cédric Krier b03788e6db Fix duplicate translations
- Fix unique constraint by using -1 instead of NULL for res_id
- Clean duplicate entries in po file

The unique constraint was not working when res_id was NULL because SQL consider
all of them as different.

The migration could fail if there is duplicate translation in the database. So
this query must be run until no more records are deleted:

DELETE FROM ir_translation WHERE id IN (SELECT MAX(id) FROM ir_translation GROUP BY name, res_id, lang, type, src_md5, module HAVING COUNT(1) > 1);

issue3355
review1087004
2013-09-22 14:33:39 +02:00
Cédric Krier 256d2f9269 Guess date formating in format_lang by value type
review956003
2013-07-04 19:34:02 +02:00
Cédric Krier 68cdf9162b Clean old str date in format_lang
issue3135
review893002
2013-06-01 00:08:20 +02:00
Cédric Krier 8710f2fd99 Fix Pool.setup to re-allow extra_depends behavior
review898002
2013-05-27 18:47:00 +02:00
Cédric Krier 936dcca53a Store default language in database
review592004
2012-11-23 17:59:04 +01:00
Cédric Krier 0fe1b93864 Active Record 2012-09-24 22:16:53 +02:00
Giedrius Slavinskas 1ced4da95e Fix report translation
issue2586
review357001
2012-05-04 10:36:26 +03:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier f1a4414438 Fix default language code
No more need to manage translation in convert.py
Fix set of module via context in ir.translation
Use CONFIG language as fallback in report
2012-01-28 23:27:22 +01:00
Cédric Krier 7c54cb0d6c Fix str convertion of buffer if False in Report
issue2335
review198005
2011-12-09 12:18:49 +01:00
Cédric Krier 776759b876 StringIO doesn't like buffer from DB
issue2296
review171006
2011-11-26 18:05:57 +01:00
Nicolas Évrard 0a471486e0 correct pyflake errors
review164003
2011-11-02 15:49:38 +01:00
Nicolas Évrard 6093692bbe Also define MANIFEST on ImportError 2011-10-28 11:40:20 +02:00
Cédric Krier fefd67c3a5 Improve Binary fields
* Support size format in context for Binary fields
* Use buffer for Binary fields
* No more store Binary fields in base64

review74006
2011-09-17 14:43:05 +02:00
Cédric Krier d26164af74 Use unoconv and all Opendocument format in report
issue2031
review72001
2011-08-06 18:25:24 +02:00
Cédric Krier 9876c53ba9 Remove unused PARENTS in report 2011-07-21 16:31:24 +02:00
Nicolas Évrard 3ad685e892 Add function to get object base URL 2011-07-20 19:04:52 +02:00
Cédric Krier 550aae8351 Change Pool into a Singleton
review42001
2011-07-03 13:20:58 +02:00
Cédric Krier 3d51cd993a Use lxml instead of minidom in Report for issue1863 2011-03-01 11:58:34 +01:00
Cédric Krier c6307b9749 Add missing test on manifest for issue1682 2010-09-19 17:03:04 +02:00
Cédric Krier df1fd283ac New transaction management
Remove cursor, user and context from methods and use Transaction instead
2010-08-19 22:01:12 +02:00
Cédric Krier d351113a3b Update manifest with files added from style for issue1507 2010-07-02 18:41:26 +02:00
Cédric Krier c5b9ead44f Fix report to work with Genshi >= 0.6 for issue1558 2010-05-06 20:14:49 +02:00
Udo Spallek 9a95d6f992 Add symbol keyword to formatLang() for issue1518 2010-04-15 20:39:09 +02:00