- 02 Mar, 2023 1 commit
-
-
Rafael Monnerat authored
Rework commit 236689ba after the rebase
-
- 01 Mar, 2023 5 commits
-
-
Levin Zimmermann authored
Pandas 0.20.0 introduced a bug fix [1] which changed the behaviour of 'DataFrame.to_records()', so that the resulting Record objects dtype names are unicodes if the data frames column names were unicode. Before this bug fix the dtype names were str, no matter whether the column names were str or unicode. Unfortunately np unpickle breaks if dtype names are unicode [2]. Since many of our data frame columns are unicode, loading arrays often fails. In python3 this isn't a problem anymore, so until then we fix this by introducing a simple monkey patch to pandas, which basically reverts the mentioned bug fix. [1] https://github.com/pandas-dev/pandas/issues/11879 [2] Small example to reproduce this error: '' import os import numpy as np import pandas as pd r = pd.DataFrame({u'A':[1,2,3]}).to_records() a = np.ndarray(shape=r.shape, dtype=r.dtype.fields) p = "t" try: os.remove(p) except: pass with open(p, 'wb') as f: np.save(f, a) with open(p, 'rb') as f: np.load(f) '' /reviewed-on !1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
Add test which verifies that we can un/pickle 'pd.DataFrame' which were converted to 'np.recarray' via the '.to_records()' method. This test is necessary because it turns out that the combination of pandas >= 0.20.x + python2 doesn't support this functionality by default if the data frames column names are unicodes. Please see !1738 (comment 179298) for additional context. /reviewed-on !1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
There are newer pandas versions which still support python2. The latest one which still supports py2 (0.24.x) has initially been released in 2019 and should therefore be quite stable and better supported. We should therefore prepare ERP5 so that it support those newer versions. This patch mostly fixes movements within the internal pandas structure. The patch still supports old object locations of previous pandas versions. /reviewed-on !1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
We already use '.resample.mean()' in some projects. /reviewed-on !1738 /reviewed-by @jerome @klaus
-
Levin Zimmermann authored
In some projects we use pandas resampler inside 'portal_callables' (so with restricted Python). But we miss tests which check whether pandas resamplers are allowed inside the restricted Python. Due to this lack of tests we won't notice whether the usage of pandas resamplers still work with a newer pandas version. With this patch we can recognize if an internal change of pandas makes the resampler unusuable in restricted Python. /reviewed-on !1738 /reviewed-by @jerome @klaus
-
- 15 Feb, 2023 2 commits
-
-
Rafael Monnerat authored
By Romain
-
Rafael Monnerat authored
By Romain
-
- 30 Jan, 2023 21 commits
-
-
Rafael Monnerat authored
Allow the developer associate a Mixin on Business template level without require to overwrite the portal type itself Include mixins can be done in the same way, allowed content types or property sheets are set.
-
Rafael Monnerat authored
-
Rafael Monnerat authored
-
Rafael Monnerat authored
-
Romain Courteaud authored
-
Cédric Le Ninivin authored
erp5_administration: Add Scripts for Alarm to update validation state according to consistency state
-
Rafael Monnerat authored
If two open orders are validated on the same transaction, archivePrevious script will get the an already archived as catalog will be outdated.
-
Rafael Monnerat authored
-
Rafael Monnerat authored
This is an alternetive way to login using Certificates. Probably this format will evolve into use caucase; however this only introduce some most basic features. Use Certificate Login for store login definitions
-
Rafael Monnerat authored
Please squash me in future.
-
Rafael Monnerat authored
If the user wants actitivites, it should create multiples StandardBT5ConfiguratorItems, This should accellerate Tests based on ERP5Configurator. This should be recoded, but it should speed up bootstrap of a site, as get modified objects are not called.
-
Rafael Monnerat authored
It the user don't have fully permission on the object (already changed state), this set will fail to check if source should be defined.
-
Alain Takoudjou authored
The upgrade ordering seems buggy and requires to force reinstall it
-
Rafael Monnerat authored
This allow during a subscription process, create a user and them create all documents using that user w/o rely on proxy roles (keeping good ownership across the documents).
-
Rafael Monnerat authored
Without this (on slapos master ui) the redirection places value unquoted causing parser to fail later on when resolve {n.me}
-
Rafael Monnerat authored
-
Rafael Monnerat authored
The user can be present from diferent logins, password tool only works with ERP5LoginUserMager users.
-
Alain Takoudjou authored
-
Łukasz Nowak authored
Returning true allows to add movements to existing one, and this group shall always separate them.
-
Rafael Monnerat authored
-
Romain Courteaud authored
-
- 27 Jan, 2023 3 commits
-
-
Alain Takoudjou authored
If 2 lines have the same effective date (catalog has a 1 second precision), always return the validate and open first. Commit: 02d06501 Changes applied from history: http://git.erp5.org/gitweb/erp5.git/history/refs/heads/interaction-drop:/product/ERP5/Document/SubscriptionItem.py?js=1
-
Rafael Monnerat authored
Original commit from : Lukasz Nowak <luke@nexedi.com> 3e45ec35
-
Romain Courteaud authored
Conflicts: bt5/erp5_crm/bt/revision
-
- 26 Jan, 2023 1 commit
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!1732
-
- 25 Jan, 2023 4 commits
-
-
Xiaowu Zhang authored
See merge request nexedi/erp5!1731
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
cause by nexedi/erp5!1726
-
Jérome Perrin authored
On the way to Zope 4, the biggest change was DateTime >= 3, which has these main differences: - `DateTime` instances are new style classes - `DateTime.__eq__` now take into the timezone into account - `DateTime` supports timezone naive ( https://docs.python.org/3/library/datetime.html#aware-and-naive-objects ) - actually this is since DateTime 2.12 , but since we fully patched the method where the parsing happens, ERP5's patched DateTime never used timezone naive dates. - pickles are also different. These are changes to prepare ERP5 code base to support DateTime >= 3, while keeping compatibility with the previous behavior, this means that we keep patching to keep the same behavior as DateTime 2, so that `DateTime.__eq__` ignores timezone difference and `DateTime` does not support timezone naive dates - these two different behavior seemed to introduce too much breakages, especially in project code, with no immediate benefit for our usages. For now, while ERP5 is still based on Zope 2 / DateTime 2 the fact that DateTime are new style classes has no impact, this will only impact once we switch to Zope 4. This also change the code to adjust the part where we were depending on implementation details of DateTime and where the details changed on DateTime 3, sometimes exposing higher level API, like the new `timeZoneContext` to use in tests. See merge request nexedi/erp5!1593
-
- 24 Jan, 2023 3 commits
-
-
Roque authored
See merge request nexedi/erp5!1725
-
Roque authored
-
Roque authored
-