- 03 Apr, 2019 6 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
RefactoringTool: Warnings/messages while refactoring: RefactoringTool: ### In file bt5/erp5_accounting_l10n_in/SkinTemplateItem/portal_skins/erp5_accounting_l10n_in/AccountModule_getTrialBalanceReportSectionList.py ### RefactoringTool: Line 21: could not convert: raise 'Tree mode no longer supported' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_forge/CategoryTool_generateTranslationFile.py ### RefactoringTool: Line 27: could not convert: raise 'Redirect', '%s/view?portal_status_message=%s' % ( context.portal_categories.absolute_url(), message) RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReportModule_exportTaskReportListAsiCalendar.py ### RefactoringTool: Line 7: could not convert: raise 'Unauthorized', context RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file bt5/erp5_tiosafe_core/SkinTemplateItem/portal_skins/erp5_integration/IntegrationCategoryMapping_init.py ### RefactoringTool: Line 1: could not convert: raise "yo", context RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file product/ERP5Configurator/Document/WorkflowSecurityConfiguratorItem.py ### RefactoringTool: Line 69: could not convert: raise "NoValidName" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file product/ERP5TioSafe/Conduit/AccountingERP5IntegrationConduit.py ### RefactoringTool: Line 81: could not convert: raise "getObjectType: ERROR journal code unknow" RefactoringTool: Python 3 does not support string exceptions RefactoringTool: ### In file product/ERP5TioSafe/tests/testSaleOrderERP5Synchronization.py ### RefactoringTool: Line 275: could not convert: raise 'A line has not been checked' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 376: could not convert: raise 'A line has not been checked' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 530: could not convert: raise 'A line has not been checked' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 813: could not convert: raise 'A line has not been checked' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 915: could not convert: raise 'A line has not been checked' RefactoringTool: Python 3 does not support string exceptions RefactoringTool: Line 962: could not convert: raise 'The lines must contain VAT, Product or Delivery, nothing else.' RefactoringTool: Python 3 does not support string exceptions
-
Jérome Perrin authored
The fixer was modified to not rewrite: raise E, V, T -> raise E(V).with_traceback(T) raise E, None, T -> raise E.with_traceback(T) which is python3 only syntax
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
- 29 Mar, 2019 1 commit
-
-
Jérome Perrin authored
/reviewed-on nexedi/erp5!852
-
- 28 Mar, 2019 2 commits
-
-
Jérome Perrin authored
/reviewed-on !850
-
Jérome Perrin authored
Introduce a new ERP5Site_resetAccountingTransactionLineGroupingReference script to reset grouping reference on accounting transaction lines. This solve a problem with the way we activated on AccountingTransactionLine_resetGroupingReference the context of the line, if line was removed from OFS before activity was executed, the activity was discarded and grouping references on related lines was not reset. Also drop the unused `keep_if_valid_group` parameter, it was not making sense. /reviewed-on !849
-
- 26 Mar, 2019 3 commits
-
-
Vincent Pelletier authored
Also, make some existing sanitation happen earlier than before, to store values in a cleaner format.
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
- 25 Mar, 2019 2 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
default is to run all tests
-
- 22 Mar, 2019 1 commit
-
-
Jérome Perrin authored
When there was parallel execution of this alarm with lots of non grouped lines, it can happen that lines are grouped but not indexed yet.
-
- 20 Mar, 2019 4 commits
-
-
Julien Muchembled authored
With recent changes in CMFActivity, getServerAddress is now used when setting up the site, before the ZServer is started, which means: - getServerAddress memoized a wrong return value; - the test didn't fail with --load.
-
Aurélien Vermylen authored
The button "Subscribe/Unsubscribe from Timer Service" does not clearly explain the fact that it determines whether or not Alarms are enabled in ERP5. It is very counter-intuitive to see Alarms on "enabled" in the "Configure Alarms" screen and yet not have them being run because the Alarm Node is not subscribed to the Timer Service. /reviewed-on nexedi/erp5!539
-
Jérome Perrin authored
Since the introduction of ERP5 Login, authentication by Access Token is broken, and it is only working if `erp5_login.getReference() == person.getUserId()` The scriptable part of access token changed, now scripts must return a user object - on which the plugin will call `getUserId` (it was not clear what they should return before, maybe login, but they should return a user id, not a login, as the token plays the same role as a login). To make it clear and to intentionally break compatibility as this is now something different, these scripts have been renamed to be `getUserValue` type based methods. /reviewed-on nexedi/erp5!838
-
Jérome Perrin authored
(because my editor runs python3 pytlint)
-
- 19 Mar, 2019 9 commits
-
-
Jérome Perrin authored
/reviewed-on nexedi/erp5!839
-
Jérome Perrin authored
This fallback seems useless in this context, getClientAddr should be available.
-
Jérome Perrin authored
This test does not need to create an actual user as it just check plugin extract login & password from request. This test does not need to install the plugin in PAS, the actual check instanciate another ERP5DumbHTTPExtractionPlugin.
-
Jérome Perrin authored
- no longer needed to have same user id and logins. - upgrader activate the plugin
-
Jérome Perrin authored
This keep the current behavior. Invalidating all logins is also a way to disable login for this user without having to find all tokens and invalidate them one by one
-
Jérome Perrin authored
for compatibility with login/password
-
Jérome Perrin authored
-
Jérome Perrin authored
Because this was broken, we took the liberty to introduce a breaking change to fix naming, now type based scripts are *_getUserValue and must return a user document, with a getUserId method returning the user id. Make this plugin also an IAuthenticationPlugin which does all the job of returning the user id. It does not really make sense to delegate this to default authenticator. A side effect is that token can still authenticate users with no assignments, since tokens are scriptable, if this is a requirement, it can be implemented in scripts. also update test: - plugin must be enabled for IAuthenticationPlugin - check complete authentication sequence, not just extraction - update scripts to new names - simplify transaction management - don't set self.person, it was not used anywhere - update _createPerson to reindex, as said in docstring - merge all tests in on test component
-
Jérome Perrin authored
-
- 14 Mar, 2019 12 commits
-
-
Xiaowu Zhang authored
benefit is very small and unusable for user nexedi/erp5@1f254aa7
-
Vincent Pelletier authored
This is called when checking access permission on objects, which happens very often. CachingMethod has a hit cost which is too high for this use. Instead, generate this method as part of the portal type class, removing all call-time logic.
-
Vincent Pelletier authored
It is superseded by __self__, which (where applicable) prevents acquisition and getattr-based traversal, improving performance. Patch AccessControl.users.BasicUser._check_context to extend this change to zope code (and simplify it in the process). Also, make __ac_local_roles__ accesses consistent with other places in our own code as well as in PAS & AccessControl.
-
Vincent Pelletier authored
getRoles is called a lot (on every restricted access, so hundreds of times per transaction), it is definitely not the right place to do extra computation, especially when their result does not change from one call to the next (configuration should only change on process restart, so not during a transaction - and even if it someday did, it should be fine to wait for next transaction for it to take effect). Instead, do the extra work when creating the user (typically once per transaction). Also, modernise python syntax (simplifications & style). Also, reduce code duplication from ERP5Security.ERP5UserFactory.
-
Vincent Pelletier authored
Simplifies callers, as they then do not have to test for None. Also, use sort(key=...), which removes the need for internal 2-tuple wrapping & unwrapping of all result entries. Also, coding style (helps line-based profiling readability) & better naming.
-
Vincent Pelletier authored
Include worklist parameter generation in the scope of existing cache. Otherwise, it will be generated in pure loss if it is followed by a cache hit. Most of WorkflowTool change is just indentation change. Also, do some minor optimisations/simplifications in patchess.DCWorkflow. Some comments: - Guard_checkWithoutRoles return value is evaluated as a boolean, so no need to cast to int before returning based on boolean evaluation... - DCWorkflowDefinition.worklists is always true, even when empty. - Listing portal types per workflow requires checking all workflows, so build the whole mapping and cache it instead of caching for each workflow type individually (many more cache hits, fewer redundant computations) - getVarMatch is expensive just for a fallback and a wrap, bypass it to reduce redundant work.
-
Vincent Pelletier authored
Backward-compatibility path does not need to be fast. Optimise for sane folders.
-
Vincent Pelletier authored
This improves performance when unset protected properties are being accessed.
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
In contrary to the ParentDeliveryPropertyMovementGroup for property, it has never actually checked the parent Delivery but the current one.
-
Arnaud Fontaine authored
This also avoids KeyError exceptions when Activities have already been processed in the meantime.
-
Jérome Perrin authored
These extensions does not seem to be used. /reviewed-on nexedi/erp5!845
-