- 31 Oct, 2018 5 commits
-
-
Jérome Perrin authored
We edited the HTML, but did not include the accompanying increase of modification date. See !662 (comment 65953) for more on this issue. /reviewed-on !790
-
Tristan Cavelier authored
When a workflow transition was not used by any state, calling some_module.Module_listWorkflowTransitionItemList was raising: [..] Module script, line 49, in Module_listWorkflowTransitionItemList - <PythonScript at /tsxx/Module_listWorkflowTransitionItemList used for /tsxx/some_module> - Line 49 result['listbox_parameter_dict'][transition_id] = [(state_variable, allowed_state_dict[transition_id])] Module AccessControl.ZopeGuards, line 83, in guarded_getitem v = object[index] KeyError: 'some_action' Now, pick transition among the allowed_state_dict instead of workflow.transitions. This also fixes mass change state dialog "??? ()" issue. This commit adds a transition that allows to reproduce that issue. And this line covers the case : bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testMassWorkflowTransition.zpt (line 61) /reviewed-on nexedi/erp5!788
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
Some things in support request app where working apparently a bit by chance and they no longer work with new erp5_hal_json ( 09d00cae ) This aims at using erp5_hal_json as intended and simplifying the customisations by customising "only" the header gadget and not the page gadget. /reviewed-on nexedi/erp5!787
-
- 30 Oct, 2018 12 commits
-
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
erp5_real_time_inventory_accounting: Accounting Transaction state should be 'Posted to General Ledger' (stopped), not draft.
-
Jérome Perrin authored
erp5_hal_json does not seem to allow using gadgets by page name, anymore, so instead of using a custom "page template" gadget ( disclaimer: I have not really understood this fully at this point). Instead of using a custom page gadget, just use a header gadget that "extends" the default gadget but removes the add_url
-
Jérome Perrin authored
Because the fast input should be used. Also simplify a bit the test, there's no need to add a SR in this case.
-
Jérome Perrin authored
This reverts commit 463855b6. unlike RSVP.all, RSVP.hash is not patched to support cancellation, so it's not safe to use it at the moment.
-
Arnaud Fontaine authored
Such as: - getStartTransitionDateList() and getStartTransitionDate(). - getDeliverTransitionDateList() and getDeliveryTransitionDate(). - ... Where the non-List accessors returned the last element. Use Case: Set AT.{start,stop}_date from PPL stop transition date.
-
- 29 Oct, 2018 4 commits
-
-
Arnaud Fontaine authored
Until this commit, loading a ZODB Component would add it to the current Request object to prevent its reference counter reaching 0 (thus its global being reset to None and then being later GC'ed) when a reset happens in another Request. This problem was found when investigating testFunctionalConfigurator failure when installing bt5s as requested by the Configurator: 1. Request R1 calls Zuite_waitForActivities importing extension.erp5.ERP5Zuite (M1). => Add M1 to R1._module_cache_set. => M1 ref counter equals to 2 (sys.modules and R1._module_cache_set references). 2. R1 terminates and is GC'ed. => M1 ref counter equals to 1 (sys.modules). 3. Request R2 runs Configurator configuring the Site. 4. testFunctionalConfigurator calls Zuite_waitForActivities to wait for the Configurator to finish (request R3 which may take ~15 minutes). This calls time.sleep() in a loop where 'time' module is imported at top-level. 5. R2 installs bt5 triggering reset. => M1 ref counter equals to 0. ===> M1 global variables are reset to None and thus 'time' is set to None raising an Exception in the next call of time.sleep() in the loop. The easiest way would be to have a hook on sys.modules dict lookup and thus add M1 to R2._module_cache_set when being imported, but this is not supported... Instead create a global cache on erp5.component package.
-
Jérome Perrin authored
There is no action with referecne `list` on support request module.
-
Jérome Perrin authored
-
Vincent Pelletier authored
This test alone does not define site-dependent security groups, so this change is not required as such. But in real configuration, ERP5 instance define security groups, which sometimes (often ?) depend on which site a document or user is linked to. When multiple groups apply (ex: having a certain function at a certain site), the final group is composed by joining group identifiers using underscores. This forbids using underscores in group identifiers. And group identifiers are generated from document's (here, the Category) codification if set, otherwise the reference if set, otherwise the document identifier. So set a underscore-less codification on these categories so this test can be run on tests where security is configured to include site in security groups.
-
- 26 Oct, 2018 3 commits
-
-
Georgios Dagkakis authored
as the comment (which is removed now) said: ``` XXX: This method is broken, since "total_size" field is not present in the listbox rendering any longer. It should be removed. ``` Also: - make sure that Listbox always knows how many lines are to be displayed. - add testPagerWithCustomListMethod in listbox_zuite of erp5_ui_test, which checks that listbox jumping to previous/next/first/last works correctly for a list method that returns only the elements that the listbox is to render. /reviewed-on nexedi/erp5!776
-
Jérome Perrin authored
Default method seem to work just fine and is compatible with the recent improvements in erp5_hal_jon_style ( 09d00cae )
-
Vincent Pelletier authored
set.__iadd__ does not like non-set values, but the intent of this API is to allow just any iterable (producing strings) to be returned, so use the more tolerant set.update method instead.
-
- 25 Oct, 2018 16 commits
-
-
Xiaowu Zhang authored
-
Jérome Perrin authored
This is a mix of features to help time tracking and reporting with small unrelated bug fixes and improvements. To help time tracking we show the time on support request with hour:minutes everywhere and set a stop date automatically. We also add interaction so that "user doing" is automatically added to the support request so that we can see "who did" and make reports based on this. Bug fixes/unrelated features: * when project does not have supply lines, show all services members of the support request use. Also change to pass relative URL of services, usually we don't pass IDs, but relative URLs. This is a visible/breaking change, because it's now required to configure services use. Because it's also required in erp5_crm, I expect it would not break too much. * momentjs' related time was not refreshed, so they kept displaying "a few second ago" even hours later * don't set HTML source as post title * prevent double submit of comments in support request app. /reviewed-on nexedi/erp5!780
-
Vincent Pelletier authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-
Jérome Perrin authored
-
Jérome Perrin 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.
-