- 13 Jul, 2022 2 commits
-
-
Jérome Perrin authored
security.declareProtected(Permissions.AccessContentsInformation, 'debug') def debug(self): "" from zodbpickle.pickle_2 import Unpickler from ZODB.serialize import ObjectWriter from ZODB.ExportImport import persistent_id from io import BytesIO from StringIO import StringIO from zodbpickle.pickletools_2 import dis from Acquisition import aq_base ow = ObjectWriter(aq_base(self.getPortalObject())) ow._p.dump(aq_base(self).__getstate__()) pkl = ow._file.getvalue() disf = StringIO() dis(pkl, disf) msg = "pickle size: %s\n %s" % (len(pkl), disf.getvalue()) print(msg) return msg ** Before ** pickle size: 756 0: } EMPTY_DICT 1: q BINPUT 1 3: ( MARK 4: U SHORT_BINSTRING 'default_reference' 23: q BINPUT 2 25: U SHORT_BINSTRING 'XXXX635' 34: q BINPUT 3 36: U SHORT_BINSTRING 'uid' 41: q BINPUT 4 43: L LONG 59161L 51: U SHORT_BINSTRING 'workflow_history' 69: q BINPUT 5 71: ( MARK 72: U SHORT_BINSTRING '\x00\x00\x00\x00\x00\x07|,' 82: q BINPUT 6 84: c GLOBAL 'Persistence.mapping PersistentMapping' 123: q BINPUT 7 125: t TUPLE (MARK at 71) 126: Q BINPERSID 127: U SHORT_BINSTRING '_Add_portal_content_Permission' 159: q BINPUT 8 161: ( MARK 162: U SHORT_BINSTRING 'Assignee' 172: q BINPUT 9 174: U SHORT_BINSTRING 'Assignor' 184: q BINPUT 10 186: U SHORT_BINSTRING 'Manager' 195: q BINPUT 11 197: U SHORT_BINSTRING 'Owner' 204: q BINPUT 12 206: t TUPLE (MARK at 161) 207: q BINPUT 13 209: U SHORT_BINSTRING '_owner' 217: q BINPUT 14 219: ( MARK 220: ] EMPTY_LIST 221: q BINPUT 15 223: U SHORT_BINSTRING 'acl_users' 234: q BINPUT 16 236: a APPEND 237: U SHORT_BINSTRING 'ERP5TypeTestCase' 255: q BINPUT 17 257: t TUPLE (MARK at 219) 258: q BINPUT 18 260: U SHORT_BINSTRING 'portal_type' 273: q BINPUT 19 275: U SHORT_BINSTRING 'Visa File' 286: q BINPUT 20 288: U SHORT_BINSTRING '_Modify_portal_content_Permission' 323: q BINPUT 21 325: ( MARK 326: U SHORT_BINSTRING 'Assignee' 336: q BINPUT 22 338: U SHORT_BINSTRING 'Assignor' 348: q BINPUT 23 350: U SHORT_BINSTRING 'Manager' 359: q BINPUT 24 361: U SHORT_BINSTRING 'Owner' 368: q BINPUT 25 370: t TUPLE (MARK at 325) 371: q BINPUT 26 373: U SHORT_BINSTRING '_Access_contents_information_Permission' 414: q BINPUT 27 416: ( MARK 417: U SHORT_BINSTRING 'Assignee' 427: q BINPUT 28 429: U SHORT_BINSTRING 'Assignor' 439: q BINPUT 29 441: U SHORT_BINSTRING 'Auditor' 450: q BINPUT 30 452: U SHORT_BINSTRING 'Manager' 461: q BINPUT 31 463: U SHORT_BINSTRING 'Owner' 470: q BINPUT 32 472: t TUPLE (MARK at 416) 473: q BINPUT 33 475: U SHORT_BINSTRING '__ac_local_roles__' 495: q BINPUT 34 497: } EMPTY_DICT 498: q BINPUT 35 500: ( MARK 501: h BINGET 17 503: ] EMPTY_LIST 504: q BINPUT 36 506: U SHORT_BINSTRING 'Owner' 513: q BINPUT 37 515: a APPEND 516: U SHORT_BINSTRING 'IS-ERPAD*_XXXFR*' 534: q BINPUT 38 536: ] EMPTY_LIST 537: q BINPUT 39 539: U SHORT_BINSTRING 'Assignor' 549: q BINPUT 40 551: a APPEND 552: U SHORT_BINSTRING 'DSO*' 558: q BINPUT 41 560: ] EMPTY_LIST 561: q BINPUT 42 563: U SHORT_BINSTRING 'Auditor' 572: q BINPUT 43 574: a APPEND 575: U SHORT_BINSTRING 'XXXFR*' 583: q BINPUT 44 585: ] EMPTY_LIST 586: q BINPUT 45 588: U SHORT_BINSTRING 'Auditor' 597: q BINPUT 46 599: a APPEND 600: U SHORT_BINSTRING 'AF*_XXXFR*' 612: q BINPUT 47 614: ] EMPTY_LIST 615: q BINPUT 48 617: U SHORT_BINSTRING 'Auditor' 626: q BINPUT 49 628: a APPEND 629: u SETITEMS (MARK at 500) 630: U SHORT_BINSTRING 'id' 634: q BINPUT 50 636: U SHORT_BINSTRING '20220624-57DF4' 652: q BINPUT 51 654: U SHORT_BINSTRING '_View_Permission' 672: q BINPUT 52 674: ( MARK 675: U SHORT_BINSTRING 'Assignee' 685: q BINPUT 53 687: U SHORT_BINSTRING 'Assignor' 697: q BINPUT 54 699: U SHORT_BINSTRING 'Auditor' 708: q BINPUT 55 710: U SHORT_BINSTRING 'Manager' 719: q BINPUT 56 721: U SHORT_BINSTRING 'Owner' 728: q BINPUT 57 730: t TUPLE (MARK at 674) 731: q BINPUT 58 733: U SHORT_BINSTRING 'quantity' 743: q BINPUT 59 745: G BINFLOAT 1.0 754: u SETITEMS (MARK at 3) 755: . STOP ** After ** pickle size: 596 0: } EMPTY_DICT 1: q BINPUT 1 3: ( MARK 4: U SHORT_BINSTRING 'default_reference' 23: q BINPUT 2 25: U SHORT_BINSTRING 'XXXX636' 34: q BINPUT 3 36: U SHORT_BINSTRING 'uid' 41: q BINPUT 4 43: L LONG 59700L 51: U SHORT_BINSTRING 'workflow_history' 69: q BINPUT 5 71: ( MARK 72: U SHORT_BINSTRING '\x00\x00\x00\x00\x00\x07|.' 82: q BINPUT 6 84: c GLOBAL 'Persistence.mapping PersistentMapping' 123: q BINPUT 7 125: t TUPLE (MARK at 71) 126: Q BINPERSID 127: U SHORT_BINSTRING '_Add_portal_content_Permission' 159: q BINPUT 8 161: ( MARK 162: U SHORT_BINSTRING 'Assignee' 172: q BINPUT 9 174: U SHORT_BINSTRING 'Assignor' 184: q BINPUT 10 186: U SHORT_BINSTRING 'Manager' 195: q BINPUT 11 197: U SHORT_BINSTRING 'Owner' 204: q BINPUT 12 206: t TUPLE (MARK at 161) 207: q BINPUT 13 209: U SHORT_BINSTRING '_owner' 217: q BINPUT 14 219: ( MARK 220: ] EMPTY_LIST 221: q BINPUT 15 223: U SHORT_BINSTRING 'acl_users' 234: q BINPUT 16 236: a APPEND 237: U SHORT_BINSTRING 'ERP5TypeTestCase' 255: q BINPUT 17 257: t TUPLE (MARK at 219) 258: q BINPUT 18 260: U SHORT_BINSTRING 'portal_type' 273: q BINPUT 19 275: U SHORT_BINSTRING 'Visa File' 286: q BINPUT 20 288: U SHORT_BINSTRING '_Modify_portal_content_Permission' 323: q BINPUT 21 325: ( MARK 326: h BINGET 9 328: h BINGET 10 330: h BINGET 11 332: h BINGET 12 334: t TUPLE (MARK at 325) 335: q BINPUT 22 337: U SHORT_BINSTRING '_Access_contents_information_Permission' 378: q BINPUT 23 380: ( MARK 381: h BINGET 9 383: h BINGET 10 385: U SHORT_BINSTRING 'Auditor' 394: q BINPUT 24 396: h BINGET 11 398: h BINGET 12 400: t TUPLE (MARK at 380) 401: q BINPUT 25 403: U SHORT_BINSTRING '__ac_local_roles__' 423: q BINPUT 26 425: } EMPTY_DICT 426: q BINPUT 27 428: ( MARK 429: h BINGET 17 431: ] EMPTY_LIST 432: q BINPUT 28 434: h BINGET 12 436: a APPEND 437: U SHORT_BINSTRING 'IS-ERPAD*_XXXFR*' 455: q BINPUT 29 457: ] EMPTY_LIST 458: q BINPUT 30 460: h BINGET 10 462: a APPEND 463: U SHORT_BINSTRING 'DSO*' 469: q BINPUT 31 471: ] EMPTY_LIST 472: q BINPUT 32 474: h BINGET 24 476: a APPEND 477: U SHORT_BINSTRING 'XXXFR*' 485: q BINPUT 33 487: ] EMPTY_LIST 488: q BINPUT 34 490: h BINGET 24 492: a APPEND 493: U SHORT_BINSTRING 'AF*_XXXFR*' 505: q BINPUT 35 507: ] EMPTY_LIST 508: q BINPUT 36 510: h BINGET 24 512: a APPEND 513: u SETITEMS (MARK at 428) 514: U SHORT_BINSTRING 'id' 518: q BINPUT 37 520: U SHORT_BINSTRING '20220624-1203CE' 537: q BINPUT 38 539: U SHORT_BINSTRING '_View_Permission' 557: q BINPUT 39 559: ( MARK 560: h BINGET 9 562: h BINGET 10 564: h BINGET 24 566: h BINGET 11 568: h BINGET 12 570: t TUPLE (MARK at 559) 571: q BINPUT 40 573: U SHORT_BINSTRING 'quantity' 583: q BINPUT 41 585: G BINFLOAT 1.0 594: u SETITEMS (MARK at 3) 595: . STOP highest protocol among opcodes = 1
-
Jérome Perrin authored
In xhtml_style, just after clicking next or previous page in the listbox buttons, the values selected in 'Section Category' and 'Section Category Strict' were not used, because they were used from request and not from as normal script parameters. This fixes only the xhtml_style version, ERP5JS has another problem that dialog fields values are reset when going to next page, so it would also need this problem to be fixed.
-
- 12 Jul, 2022 1 commit
-
-
Jérome Perrin authored
-
- 07 Jul, 2022 2 commits
-
-
Valentin Benozillo authored
-
Valentin Benozillo authored
-
- 01 Jul, 2022 1 commit
-
-
Romain Courteaud authored
-
- 27 Jun, 2022 1 commit
-
-
Xiaowu Zhang authored
-
- 24 Jun, 2022 1 commit
-
-
Xiaowu Zhang authored
-
- 23 Jun, 2022 2 commits
-
-
Xiaowu Zhang authored
-
Yusei Tahara authored
Use correct portal type.
-
- 22 Jun, 2022 3 commits
-
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
- 21 Jun, 2022 4 commits
-
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Jérome Perrin authored
- Display the editor in ERP5 language, not browser language - Use PDF viewer for Drawing preview - Supports password protected PDFs - Others small changes See merge request nexedi/erp5!1639
-
Jérome Perrin authored
and several small fixes or changes to make this easier See merge request nexedi/erp5!1642
-
- 20 Jun, 2022 2 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
This was a workaround for ChromeOS, but we realized it was not really good. Disable it for the same reasons as nexedi/slapos!1196 : - not everybody use ChromeOS - this breaks the ctrl+click shortcut to go to definition/follow link - it makes ERP5 monaco editor behaves differently from others monaco editor - ChromeOS users can use chrome://flags/#use-search-click-for-right-click
-
- 15 Jun, 2022 10 commits
-
-
Levin Zimmermann authored
When cleaning up Wendelin from restricted python pandas code (see https://lab.nexedi.com/levin.zimmermann/wendelin/tree/remove-redundant-pandas), it turned out that there was one line still missing in erp5. This missing line caused a failed test in wendelin functional tests: https://erp5js.nexedi.net/#/test_result_module/20220614-1B46817BD/6 Readding the line fixed the test.
-
Jérome Perrin authored
create_server returns either a BaseWSGIServer or a MultiSocketServer, but add_task only exists in BaseWSGIServer - and the implementation is simply [1]: def add_task(self, task): self.task_dispatcher.add_task(task) by using self.task_dispatcher.add_task directly, we are compatible with both cases. This is relevant when running timerserver with runUnitTest, where we create multiple sockets, one for http and one for web-dav. 1: https://github.com/Pylons/waitress/blob/v1.4.4/src/waitress/server.py#L290-L291
-
Jérome Perrin authored
The default TestCase.__call__ collects errors in a test result that was never retrieved, so errors were silently ignored. By using TestCase.debug , we let errors propagate. --- Minimal reproduction is running directly (ie. not with python -m unittest) a script like this: import unittest class T(unittest.TestCase): def method(self): print('ah ?') boom print('oh') t = T("method") t() # no error t.debug() # NameError: name 'boom' is not defined
-
Jérome Perrin authored
This helps debugging concurrency problems
-
Jérome Perrin authored
-
Jérome Perrin authored
This allows running tests using a timer server loop, that will invoke process timer on all subscribers. The need for this is to test a custom tool using timer server.
-
Jérome Perrin authored
It was enough for 2 nodes, but with 4 nodes I sometimes saw errors.
-
Jérome Perrin authored
This was a deprecated method that no longer exists since ZEO 4 https://github.com/zopefoundation/ZEO/commit/5423f110ddc1034ea0954495957894c60f6da78c
-
Jérome Perrin authored
_setUpDummyMailHost is also used to prevent accidentally sending "real" emails, so we also like to have it enabled for other nodes.
-
Roque authored
See merge request nexedi/erp5!1641
-
- 14 Jun, 2022 4 commits
-
-
Roque authored
-
Julien Muchembled authored
-
Jérome Perrin authored
This happens in project related task report dialog ( testProjectRelatedTaskReport from erp5_report_renderjs_ui_test:testFunctionalRJSReportLanguage )
-
Jérome Perrin authored
jslint complain about trailing commas
-
- 13 Jun, 2022 7 commits
-
-
Jérome Perrin authored
It does not make any sense to open PDF files from this gadget. Also remove duplicate line with documentProperties
-
Jérome Perrin authored
This is intended to store sensitive documents that users will only be able to view from ERP5, but not to easily print or download. To use this, some customization is needed. First, PDF needs to be saved with a password. Then, PDF_getContentPassword type based method needs to be customized to return the password. When using this, we use different password for each document, by deriving a password from a master key using document properties (such as document reference for example)
-
Jérome Perrin authored
A new option render option, "language" is passed to the gadget. It is a two letter code as used by Localier. Both CKEditor and pdf.js have support for translations and already include translations for many languages. Before this change, they were auto detecting the browser language and displaying in the browser language, ignoring the language that was selected in ERP5. With this change, they use the language selected in ERP5. For CKEditor, we need to set the language only it is actually supported, otherwise CKEditor crash. pdf.js does not this, but we had to call ourselves initialize - which is probably better, because it was a promise not awaited.
-
Jérome Perrin authored
I'm not sure what was the problem from this comment, but we render the gadget in an iframe so there's no need to change the DOM like this. Probably this was a problem in early versions when it was in the same page.
-
Jérome Perrin authored
also change the content type in so that they are exported as text in business template
-
Jérome Perrin authored
This is the URL to download, it currently does not support range requests, but it sets cache headers properly, unlike /getData which is an accessor
-
Jérome Perrin authored
For drawings the layout is usually important, but HTML preview do not preserve layout correctly. Use PDF instead, which keeps layout
-