- 01 Jun, 2020 3 commits
-
-
Jérome Perrin authored
This addresses the problem of https://nexedijs.erp5.net/#/bug_module/20180719-135FAA8 a KeyError raised when some categories in a subtree are modified and some are removed and the corresponding base category is also installed as a base category. The problem was that both CategoryTemplateItem, which is in charge of updating the base category and PathTemplateItem, which is in charge of updating the categories listed as path both use the same ObjectTemplateItem.install method, with the same object_to_update dict. ObjectTemplateItem.install uninstall all objects that are listed in object_to_update and not in self._objects so something like this happened when business template from test_update_business_template_with_category_having_subcategory_tree_modified is updated: 1. PathTemplateItem.install is called for the base category, portal_categories/test_category/modified/removed looks removed, so it is backed up. Because the the parent paths are not parts of self._objects, trash tool will create simple trash folder for portal_categories/test_category/modified 2. PathTemplateItem.install is called for the paths, portal_categories/test_category/modified is modified, so the previous version will be backed up. At this point trash tool looks in the trash bin and the path for portal_categories/test_category is already present, so trash tool sees that path exists and does not return subobjects, so after portal_categories/test_category/modified is modified, the subjects such as portal_categories/test_category/modified/container_in_which_child_is_added are not restored and creating 'added' caused a KeyError('container_in_which_child_is_added') The approach is to make CategoryTemplateItem.install only consider base categories - ie. objects where path is portal_categories/* and not the subobjects, because they don't belong to CategoryTemplateItem but to PathTemplateItem. Co-authored-by: Georgios Dagkakis <georgios.dagkakis@nexedi.com>
-
Jérome Perrin authored
Business template have some logic to keep uids when updating objects: during installation, when an object is modified, business template first remember the uids for this object and all its sub-objects, replaces this object with the new version then recursively set the uid on updated objects, so that updating an ERP5 document by business template does not change its uid because this would break catalog. When an object containing sub-objects is updated, it becomes a new object in ZODB and sub-objects of the previous object are set as child of the new object. This works even if the case of sub-objects being instances of ZODB Broken class, except that the step where we restore the uid fail as it's not allowed to modify a broken object. Instead of unconditionnally setting the sub-objects uids, check that we actually need to set it, because if it's already the expected value then we don't need to touch the object.
-
Jérome Perrin authored
-
- 29 May, 2020 4 commits
-
-
Sven Franck authored
erp5_corporate_identity: only images with alt attribute specified will be added to the table with images
-
Georgios Dagkakis authored
-
Georgios Dagkakis authored
-
Jérome Perrin authored
Since commit d2b20acd004441d1cb8d36f33ed7ca112dff0d17 on slapos.git we are using gcc 8.2 which seem to generate slightly faster code, so we adjust the min time because tests were failing because we are now too fast.
-
- 28 May, 2020 2 commits
-
-
Arnaud Fontaine authored
-
Xiaowu Zhang authored
-
- 27 May, 2020 9 commits
-
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
Sven Franck authored
erp5_corporate_identity: improve slideshow rendering including displaying legacy presentation as slideshow
-
Sven Franck authored
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
ERP5: Remove *Capacity and ImmobilisationMovement Documents never used since their introduction many years ago.
-
Arnaud Fontaine authored
-
Arnaud Fontaine authored
-
- 25 May, 2020 6 commits
-
-
Vincent Pelletier authored
Receiving name & password parameters does not prevent us from also receiving the authentication cookie. It must not be kept in the request. And likewise for requests also containing an HTTP authentication header. And likewise for requests for which CookieCrumbler disables itself on.
-
Vincent Pelletier authored
The reason why root document is being used as serialization_tag is to cover document which get recursively reindexed: such indexation activity would not be able to be validated against all the the serializatio_tag of documents it will process. But here, fulltext indexations are all spawned per-document anyway, so we can use such per-document values.
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
Vincent Pelletier authored
Spawn fulltext indexation activity with the same priority as the top-priority activity part of current activity group. And expose the priority of current activity (top-priority for grouped activities). Ideally, the priority of each spawned activity should be the top-priority of all activities member of this activity group for corresponding document. But there is no obvious way to achieve that through indexation API without increasing complexity significantly.
-
- 22 May, 2020 3 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
plus a few python3 fixes for problem that appeared now that we have more test coverage See merge request !1128
-
Jérome Perrin authored
and a few cleanups in test suite See merge request !1126
-
- 21 May, 2020 1 commit
-
-
Jérome Perrin authored
This removes some logs happening a lot during tests, when installing business templates or indexing documents. See merge request !1105
-
- 19 May, 2020 5 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
Updater was using this command to find the latest revision modifying a path: git log -1 -- $PATH but because of git log's history simplificiation [1] when the head of the branch is a merge commit, the considered revision was not the merge commit but its parent. Use --full-history so that git does not simplify history and return the merge commit if the latest commit is a merge. [1]: https://git-scm.com/docs/git-log#_history_simplification See also https://stackoverflow.com/a/50724301/7607763
-
Jérome Perrin authored
instead of randomly truncating the existing file, which sometimes does not cause an invalid index, create an invalid index from scratch. I used this blog post https://mincong.io/2018/04/28/git-index/#2-inside-gitindex for a description of the index format.
-
- 18 May, 2020 1 commit
-
-
Romain Courteaud authored
-
- 15 May, 2020 4 commits
-
-
Xiaowu Zhang authored
See merge request !1123
-
Jérome Perrin authored
These tests are calling runUnitTest twice, first to save then to run test. On the second run the directory is already created.
-
Nicolas Wavrant authored
Causing the browser time to be used instead of the calculated time of the server, which was incoherent with previous behavior (fix 5c4a03f6) Display the timezone (if the field is configured like that) in both editable and non-editable mode See merge request !1113
-
Jérome Perrin authored
Using the test class name was causing conflicts on some test classes. CodingStyleTest was a case, all test use CodingStyleTest class with an environment variable to control which business template is tested. In this case, we want one log directory for each business template. Introduce a getLogDirectoryPath method that's supposed to create and return the path of the directory to use for log and override this method for the special case of coding style test.
-
- 14 May, 2020 2 commits
-
-
Xiaowu Zhang authored
-
Xiaowu Zhang authored
-