Commit Graph

218 Commits

Author SHA1 Message Date
Denis Ledoux e9d1d7aac0 [MERGE] forward port of branch saas-3 up to c5775e5 2015-01-22 14:45:16 +01:00
Denis Ledoux c5775e56d3 [MERGE] forward port of branch 7.0 up to 25f5329 2015-01-22 14:43:06 +01:00
Denis Ledoux 25f5329deb [FIX] report: break lines and splitted words with reportlab > 3.0
From reportlab 3.0, empty plaintext paragraphs do not lead to a break line anymore.
Before release 3.0, paragraphs having tags but no plaintext leaded to a break line.
This patch aims to recover the behavior of reportlab releases < 3.0, as
<para><font color="white"> </font></para> is used in allmost all rml reports
The current patch is not considered as clean, but we did not find any better solution.
If someone find a parameter to pass to reportlab in order to bring back the old behavior of reportlab
he is welcome to provide the better patch.

Besides, in reportlab 3.0, splitlongwords has been introduced as parameter,
to allow to break long words. The default value is True.
This parameter seems to break the columns headers
(it splits the text within the column header)
We therefore take the choice to not activate it, as it was not present anyway in reportlab < 3.0

To test the good behavior of this patch:
While having reportlab < 3.0 (2.5 for instance), print a draft invoice
Then, upgrade to reportlab > 3.0 (3.1.8 for instance), print the same draft invoice.
The generated pdf must be (allmost) identical, in particular concerning spaces.
Specifically, the space between the partner address and his phone.
2015-01-22 14:23:38 +01:00
youring be8ee97c44 [IMP] Look for TTC font files as well as TTF
TTC fonts is widely used in CJK font. Odoo should support ttc fonts recognition.
2015-01-12 15:16:10 +01:00
Christophe Simonis 562272d9a0 [MERGE] forward port of branch saas-3 up to c89d1a0 2014-10-23 13:08:44 +02:00
Denis Ledoux 0e4216361b [MERGE] forward port of branch 7.0 up to 3a0af6a 2014-10-22 19:26:27 +02:00
Martin Trigaux 354b82bee0 [FIX] report: page numbering rml reports
Save the NumberedCanvas state before doing a page reset.
The order of execution when rendering an rml report is the following:
1. init canevas (_pageNumber = 1)
2. render the page element
3. if still pages to render, afterPage method
4. if still pages to render, showPage method (_pageNumber += 1)
5. back to step 2 for each page
6. draw the ResetPage element (setting flag _doPageReset=True)
7. end the document build with afterPage & showPage method

The PageReset element should be executed at the end of the rendering of a story (subdocument) to reinitialize the page numbers to 0 (for new story) and insert the pageCount element for that story with the total number of pages (needed if want to use tag <pageCount/> in rml).

In case of NumberedCanvas (e.g. used in Trial Balance report), the numbering is generated at the end of the build using the _saved_page_states dict in the canevas.
To have an accurate _saved_page_states content, it needs to be saved before the pageReset.

Fixes #2225
2014-10-21 15:36:01 +02:00
ssh-odoo acdb43b6cb [REM] report: remove openerp/report/pyPdf
Distributing our version of pyPdf is not required anymore since we
introduced the new reporting tool.

In order to keep reports working, the standard python library
`python-pypdf` has to be installed instead (through pip or your
distribution's package manager)
2014-09-16 15:42:02 +02:00
Christophe Simonis 8046b7367d [MERGE] forward port of branch saas-5 up to 7e117b1 2014-08-28 16:51:11 +02:00
Christophe Simonis 7e117b18a0 [MERGE] forward port of branch saas-3 up to ada9724 2014-08-28 16:21:27 +02:00
Christophe Simonis ada9724655 [MERGE] forward port of branch 7.0 up to 3509e15 2014-08-28 16:12:55 +02:00
Leonardo Donelli 3509e15cc9 [IMP] report_sxw: missing parameter without_company for display_address
Fixes #811
2014-08-27 16:55:02 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 7c647ec876 [MERGE] forward port of branch saas-4 up to 0a1e4a0 2014-08-08 17:27:29 +02:00
Denis Ledoux 0a1e4a05b2 [MERGE] forward port of branch saas-3 up to 81a902a 2014-08-08 17:06:39 +02:00
Denis Ledoux 02bf0fd9c8 [MERGE] forward port of branch 7.0 up to a86dfb8 2014-08-07 18:20:13 +02:00
Denis Ledoux ea05a21938 [FIX] report: allow using 0 decimal precision in rml reports 2014-08-07 14:50:14 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Olivier Dony d9cda97cf4 [MERGE] Forward-port saas-4 up to 5ceded9 2014-07-05 01:28:19 +02:00
Olivier Dony 5ceded9d69 [MERGE] Forward-port saas-3 up to 4fa30f5 2014-07-05 01:04:19 +02:00
Olivier Dony f3880a8a09 [MERGE] Forward-port of 7.0 up to 64ac1b0 2014-07-04 17:07:53 +02:00
Richard Mathot 04eff4fe3d [TYPO] Stupid typo... 2014-07-03 09:36:46 +02:00
Richard Mathot fbbc3a54e9 [FIX] RML reporting: understandable crash message
When tag <drawString> is misused in an RML report, logs a more explicit
error
2014-07-02 17:30:32 +02:00
Olivier Dony 5b83e88c25 [MERGE] Fwd-port of 7.0 up to 3d31341 2014-07-01 12:28:55 +02:00
Martin Trigaux f825b6043b [FIX] rml: avoid reports ending by zero (opw 608073)
Commit b6a7402 (reverted at f8671cb) was almost correct, the PageReset should be added at the end of each stories but only if we have one more stories.
The PageReset will force the page count to be reseted at zero which means that last page of report would have been at zero.
2014-07-01 11:29:22 +02:00
Christophe Simonis 8dfd5eab01 [MERGE] forward port of branch saas-4 up to a4bc65c 2014-06-27 16:08:09 +02:00
Christophe Simonis a4bc65cdba [MERGE] forward port of branch saas-3 up to bdc4dd4 2014-06-27 16:06:37 +02:00
Christophe Simonis bdc4dd4a65 [MERGE] forward port of branch 7.0 up to 95cff0b 2014-06-27 16:00:28 +02:00
fka-odoo d16c57035d [FIX] improved date format in fiche de paie report 2014-06-26 14:44:11 +05:30
Olivier Dony 04211015fc [MERGE] Forward-port of latest saas-4 fixes, up to 0452851 2014-05-27 20:49:49 +02:00
Olivier Dony fd21abd847 [MERGE] Forward-port latest saas-3 bugfixes, up to 30f43da 2014-05-27 17:18:43 +02:00
Olivier Dony 2af03e1b6e [MERGE] Forward-port latest 7.0 bugfixes, up to f8671cb 2014-05-22 16:44:33 +02:00
Denis Ledoux f8671cb48a [REVERT] b6a7402fdb, pagereset seems to be useful in some cases. Need to check deeper 2014-05-22 16:17:04 +02:00
Denis Ledoux c0e9a15960 [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. a096ae0080 2014-05-22 09:35:26 +02:00
Denis Ledoux 2cc28ce65b [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. b6a7402fdb 2014-05-21 13:46:10 +02:00
Denis Ledoux b6a7402fdb [FIX] report: correct page numbering 2014-05-21 11:20:37 +02:00
cysnake4713 bd36f36281 [FIX] report localcontext setHtmlImage Method error #24 #36 2014-05-18 18:20:51 +08:00
Christophe Simonis 0161666e8b [MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Kersten Jeremy c65ae9f055 [FIX] rml2pdf : fix loading of font where mode are not strict. Now we compare always a lower and with serveral mode similar. That fix the usage of some font in report where accent and bold was ignored
bzr revid: jke@openerp.com-20140401094556-h1ybpqf989qt5h60
2014-04-01 11:45:56 +02:00
Denis Ledoux b9d9e781d5 [MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 4955.1.67 revid:dle@openerp.com-20140326092548-bu4bqinhvco8j5wj
bzr revid: dle@openerp.com-20140326093011-pwhsfeippg4cgodj
2014-03-26 10:30:11 +01:00
Christophe Simonis 1c3ee251f0 [MERGE] forward port of branch 7.0 up to revid 5270 chs@openerp.com-20140403084524-9rb174osjrbmhgwc
bzr revid: chs@openerp.com-20140402083506-w4cywcf0kxxx9xmk
bzr revid: chs@openerp.com-20140312174526-a5rhh83g0fw8djuc
bzr revid: chs@openerp.com-20140318105837-53vsx5g7fm517cuc
bzr revid: dle@openerp.com-20140326092548-bu4bqinhvco8j5wj
bzr revid: chs@openerp.com-20140402092735-3a23yjl169vvt0iv
bzr revid: chs@openerp.com-20140402112825-ky8rcb3p467ikitc
bzr revid: chs@openerp.com-20140403084808-slnj7uis17kwi9js
2014-04-03 10:48:08 +02:00
Denis Ledoux c0103c387d [MERGE][FIX] OPW 591344 : internal reports don't show images
Cleaner method, and shows images.

bzr revid: dle@openerp.com-20140326091529-g7rlqc8tfxlk5u3b
2014-03-26 10:15:29 +01:00
openerp-sle 5e535ee4f3 [IMP] Renamed paper_format to rml_paperformat and moved report's related configuration into a tab in the company form
bzr revid: openerp-sle@openerp-sle.home-20140212115350-2p9ky7ei2t9q99xs
2014-02-12 12:53:50 +01:00
Christophe Simonis a69f789b41 [MERGE] forward port of branch 7.0 up to revid 5224 chs@openerp.com-20140206105141-7e8bv8ordqqsswh7
bzr revid: dle@openerp.com-20140205105045-j95kduyjiq83e57z
bzr revid: dle@openerp.com-20140114173613-ruxye1m7fxtcjfim
bzr revid: dle@openerp.com-20140116161158-u95vcs3os4tk2zob
bzr revid: dle@openerp.com-20140121172737-gzawfi3ssg7xifef
bzr revid: chs@openerp.com-20140129094554-c3abc8x3qz9mpszr
bzr revid: chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140206110220-myn57cryam1y4k9v
2014-02-06 12:02:20 +01:00
Christophe Simonis 378c908d4c [MERGE] forward port of branch saas-2 up to revid 5006 chs@openerp.com-20140129140159-9vwkpr078shoonum
bzr revid: chs@openerp.com-20140129094847-4rsg0kjio0ed0rjk
bzr revid: chs@openerp.com-20140129141002-4p8fttm8ii0ogsse
2014-01-29 15:10:02 +01:00
Denis Ledoux f8ef34511c [IMP] report: performance improvment in reports. Use cached method to get decimal precision
bzr revid: dle@openerp.com-20140117171634-ohtydts70hjiqss7
2014-01-17 18:16:34 +01:00
Martin Trigaux f3e7afaaca [MERGE] [FIX] res_font: make it works in multiworker environment
res_font model gains family, path and mode field
Basic fonts embedded in pdf (Helvetica, Times and Courier) are data
Fix reports using font names to be valid (eg: DejaVu Sans Bold -> DejaVuSans-Bold)
default_get of res_company does not scan the filesystem anymore
family field is new name_get font for res_font (more user friendly)
Domain on displayed font to only 'normal ones' (not bold or italic)
Handle fonts in 'book' mode as normal in setTTFontMapping
Relax constraint on res_font to unique family and name ('name' was actually family before)
font_scan is called on 'reload fonts' action button and for each report rendering
font_scan is lazy when loaded from report and scanning the filesystem only if no font recorded in filesystem
'/dev/null' in font path is used to add fonts in the list but not loaded by reportlab
Scanning the filesystem triggers clear_caches
clear_cache resets the list of found fonts to empty list to make font_scan call to reload the full list (when redering a report on any worker, will always get the updated font list after a scan)
Add access rights for fonts (read everybody, create admin, call font_scan as superuser in report rendering)
Remove font hack with BaseCustomTTFonts, rely fully on the system fonts
Use glob instead of listdir (needed for path like '/usr/share/fonts/TTF/*')
Make warning message from reportlab more self-explaining.

Also make the runbot green (which is nice)

bzr revid: mat@openerp.com-20131209171338-o796pldia9da3kt2
2013-12-09 18:13:38 +01:00
Martin Trigaux aac5c9d6eb [IMP] font: better handeling of multiworker environement
bzr revid: mat@openerp.com-20131209151454-5rylu5alldd3ixmh
2013-12-09 16:14:54 +01:00
Martin Trigaux 5f1f44401f [FIX] font: revert previous (use name and not familly in reportlab), fix reports using spaces
bzr revid: mat@openerp.com-20131209133742-7u1sesoinrmfpwf0
2013-12-09 14:37:42 +01:00