- 25 Oct, 2018 15 commits
-
-
Georgios Dagkakis authored
Also, make sure that Listbox always knows how many lines are to be displayed. Commit adds also testPagerWithCustomListMethod in listbox_zuite of erp5_ui_test, which checks that listbox jumping to previous/next/first/last works correctly in displaying the elements
-
Vincent Pelletier authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Arnaud Fontaine authored
predecessor, successor and trade_phase ListBox fields didn't have their own fields and thus only the title was displayed (eg 'Ordered' for 'Manufacturing/Ordered').
-
Vincent Pelletier authored
This allows breaking a circular dependency of catalog on itself: to index a local role, catalog must tell whether it's granted to a group or to a user, which used to happen using a catalog lookup (via PAS API), preventing catalog from being rebuilt from scratch. With this change, ERP5Site_filterUserIdSet must be implemented when custom role columns are used (viewable_owner is not concerned by this change). If it is implemented in a way which does not rely on catalog, catalog become rebuildable from a lone ZODB, without double-indexation of users nor security_uid explosion. Nothing prevents relying on catalog (which mayu be desired for backward-compatibility purposes), but such script will not be provided by generic ERP5, as the impossibility of recreating catalog from ZODB is considered a bug, and introducing such script amounts to introducing this bug. Create ERP5Site_filterUserIdList in tests which add custom viewable_* columns.
-
Vincent Pelletier authored
Use Owner role to help filling user_set: owners must be users, never groups. Only look for users among group_ids when they are candidate for indexation into a catalog_role column. This should very significantly reduce the number of user lookups, even bringing it to zero on instance with default catalog setting of catalog_role_set = set(["viewable_owner"]) . Also, only look for users if there are candidates for lookup. Also, rename local variable to better describe its content. Also, use set.__iadd__ instead of set.update (shorter).
-
Vincent Pelletier authored
Test loop invariant outside of loop. Use clearer and more consistent variable names. Avoid iterating twice when once is enough, allowing removal of "local_role_dict" local and simplification of corresponding dict structure. Avoid creating new instances when the existing one can be mutated. Evaluate dict as boolean instead of constructing an empty dict to compare against. Avoid using %-operator just to concatenate strings (allows en-passant typechecking). Drop unused locals. Do not use a dict when a set would be sufficient.
-
Vincent Pelletier authored
So that it can be reused outside of group manager without having to duplicate the backward-compatibility order. Also, simplify code.
-
Vincent Pelletier authored
Move variable initialisations closer to where they are actually used. Do not initialise a variable which will always be initilised again before its first use. Reduce argument indentation. Drop unhelpful comments. User document may not be a Person instance, use a more neutral variable name. Avoid single-use locals. Take advantage of zLOG.LOG's "error=True" idiom to not have to pull exception information ourselves.
-
Vincent Pelletier authored
-
- 24 Oct, 2018 7 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
Speed up JSON calculation by dropping not needed info for rendering. Render a listfield to select the relation field listboxes on the 'relation_form' page template.
-
Romain Courteaud authored
This remove the requirement to add an action for every form.
-
Romain Courteaud authored
No need to keep many references on the gadget itself. Javascript can calculate the length of an array... Reduce not needed DOM modification. Stop writing in the DOM when changing the template value. This keeps the focus on the select.
-
Romain Courteaud authored
-
Romain Courteaud authored
Fixup nexedi/erp5@bf57228a This reduces the number of logs.
-
Jérome Perrin authored
When editing components, this warning is displayed on the console: ``` Ambiguous name for method of Products.ERP5.Document.SQLMethod.SQLMethod: 'manage_main' != 'manage' ``` fix by adding the same `_setName` that the [parent class does](https://github.com/zopefoundation/Products.ZSQLMethods/blob/2.13/src/Products/ZSQLMethods/SQL.py#L143). While looking a this, I realized that clicking on the breadcrumb in the ZMI, any part of ![image](/uploads/5e42659d8124b7566fb09cc76958a345/image.png) would redirect to the ERP5 xhtml style view. /reviewed-on nexedi/erp5!782
-
- 23 Oct, 2018 1 commit
-
-
Vincent Pelletier authored
It is extremely slow for some reason on large BTreeFolders inside BTreeFolder2's has_key (even on warm caches). Using get instead is significantly faster. Found by chance, calling getAcquiredCategoryList on a random Person when person_module contains of the order of magnitude of a million documents.
-
- 22 Oct, 2018 6 commits
-
-
Romain Courteaud authored
Do the calculations while ERP5 renders the form in JSON
-
Romain Courteaud authored
-
Tristan Cavelier authored
Web Illustration was duplicated in erp5_officejs and erp5_dms before nexedi/erp5@c838767b. After being removed, update erp5_officejs will uninstall this portal type /reviewed-on nexedi/erp5!783
-
Georgios Dagkakis authored
we used to add this value because ```select``` without ```option``` (that happens in MultiListField only) is invalid on XHTML. But it was not at all required for other cases like MultiCheckboxField or RadioField. Also, ```select``` without ```option``` is no longer invalid on HTML5. Considering that showing dummy unselectable <option> is anyway meaningless for users, we drop it for all cases. /reviewed-on nexedi/erp5!777
-
Jérome Perrin authored
-
Jérome Perrin authored
The warning is: ``` Ambiguous name for method of Products.ERP5.Document.SQLMethod.SQLMethod: 'manage_main' != 'manage' ``` It happens when components are reloaded
-
- 20 Oct, 2018 2 commits
-
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
erp5_mrp: Manufacturing Order Portal Type must have its own init script so that it can be customized independently of Production Order.
-
- 19 Oct, 2018 1 commit
-
-
Jérome Perrin authored
This is needed when running livetests in a runUnitTest instance, in the following scenario: - `runUnitTest --save test_bt:testXXX` - `runUnitTest --save --load` - run the live test from the browser because livetest way of processing activities is to unsubscribe at the beginning of the test and subscribe at the end to have control of activities when running .tic, if ProcessingNodeTestCase also process the activities automatically, they interfere and test often fail with errors like: ``` File "ERP5Type/tests/ProcessingNodeTestCase.py", line 249, in tic raise RuntimeError(error_message) RuntimeError: tic is looping forever. These messages are pending: [('/erp5/portal_components/test.erp5.testSupportRequest', 'immediateReindexObject', 1, 0), ('/erp5/support_request_module/2617', 'immediateReindexObject', -1, 0)] ``` /reviewed-on nexedi/erp5!779
-
- 17 Oct, 2018 2 commits
-
-
Jérome Perrin authored
This step just checks that multi relation field listbox shows a list of related document and that clicking on any item of the list leads to the related document. The order of related documents in the list has always been unspecified, but the first one was always 1 until recently. Because this test does not really care which one of the two related document was clicked, just assert that it's a document from foo_module. /reviewed-on nexedi/erp5!774
-
Jérome Perrin authored
89115b88 is great, but with "testFunctionalAnonymousSelection" the result HTML is more than 40Mo. /reviewed-on nexedi/erp5!772
-
- 16 Oct, 2018 6 commits
-
-
Ayush Tiwari authored
This will insure that the URL created for diff by `Base_redirect` will have the paramters `your_first_path` and `your_second_path` in it, thus making it unique and hence sharable. Before, we only used to have the name of selection in the URL which returned different result for different users.
-
Sven Franck authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
also use '>' instead of image
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-