An error occurred fetching the project authors.
- 23 Jul, 2024 1 commit
-
-
Jérome Perrin authored
The methods used in indexing did not make a difference between the case where the price is None (ie. price is not set) or where the price is set to 0 - in both cases this was saved as NULL in stock.total_price column. This is incorrect, we need to keep the distinction between these two cases also for inventory calculation. We had some places where we select IFNULL(stock.total_price, 0) to work around this, we don't plan to change the existing ones for now, but while discussing on !1974 we concluded that a newly idenfified case of a problem consequence of these NULL should be handled by fixing the indexation. To benefit from the fix, impacted instances will have to reindex documents present in the stock table with stock.total_price is null.
-
- 31 May, 2024 1 commit
-
-
Jérome Perrin authored
The default manager user (ERP5TypeTestCase) now have a random password generated at the beginning of test. The password is stored as a class attribute of the test case instance. Many tests have been updated to not generate manager user and use the existing one instead. When tests need to create users (for example users in the root acl_users), we try to give them a random password and to delete the users afterward. For functional tests, the approach is that ERP5TypeFunctionalTestCase sets cookies with manager username and password before running zelenium tests, so that in case tests want to log in again as manager, they can read the username and password from cookies. Another significant changes is that we no longer have the same user in ERP5/acl_users and /acl_users, some tests were logging in as the root user in ways that never seemed intentional. This also revealed (through test_manager_actions_on_portal from testERP5Core) that some tests were running with a user without all the expected permissions and the "Manager Components" actions was not visible for the default manager user. Fixing this also revealed that two actions ("Manage Components" and "Manage Callables") had the same priority, so the later was modified to use a different priority.
-
- 05 Mar, 2024 1 commit
-
-
Kazuhiko Shiozaki authored
otherwise edit is called with both (new) resource_uid and (old) resource_value.
-
- 21 Feb, 2024 1 commit
-
-
Jérome Perrin authored
-
- 17 May, 2023 1 commit
-
-
Sebastien Robin authored
-
- 02 May, 2023 1 commit
-
-
Jérome Perrin authored
This can be useful when making a report on movements and when we list properties of the movements that depend on the side but are not directly exposed on MovementHistoryListBrain. One use case was `Movement_getSpecificReference`, which shows `source_reference` when the brain is for the source and `destination_reference` otherwise. With this new approach, instead of guessing we record the "is_source" information at indexing time, when we know this for sure. This also simplifies `MovementHistoryListBrain.date` and `MovementHistoryListBrain.mirror_date` which no longer need to guess the side and fix a problem that because this guessing was done using `movement.getSourceUid()` - which cause security errors when users can not access the source of the movement.
-
- 03 Mar, 2023 1 commit
-
-
Aurel authored
* Emtpy parameter. * No argument.
-
- 19 Dec, 2022 1 commit
-
-
Jérome Perrin authored
The add-hoc assertin filter: -- from typing import List import lib2to3 from lib2to3.fixer_base import BaseFix from lib2to3.fixer_util import Comma, Name class FixAssertIn(BaseFix): PATTERN = """ power< any+ trailer< '.' meth=("assertTrue" | "assertFalse")> trailer< '(' comparison< (needle=any ( comp_op<'not' 'in'> | 'in' ) haystack=any) > ')' > > """ def transform(self, node: lib2to3.pytree.Node, results: List[lib2to3.pytree.Base]): needle = results['needle'] haystack = results['haystack'] meth = results["meth"][0] method_map = {True: 'assertIn', False: 'assertNotIn'} method_in = meth.value == 'assertTrue' if 'not' in str(needle.parent.children[1]): method_in = not method_in meth.replace(Name(method_map[method_in], prefix=meth.prefix)) needle.parent.children = [needle, Comma(), haystack]
-
- 21 Sep, 2022 1 commit
-
-
Jérome Perrin authored
a modified version from nexedi/erp5$366 that supports patterns like DateTime(2001, 02, 03) => DateTime(2001, 2, 3) and not DateTime(2001, 0o2, 0o3)
-
- 04 May, 2022 1 commit
-
-
Arnaud Fontaine authored
Done through various 2to3 fixers (zope.fixers, modernize, future) and manual changes. This is a single commit so that we have a clearer picture of how code converted with my2to3 should look like. Except straightforward @implementer decorator 2to3 fixer, only product/ folder was considered as the goal was to be able to create an ERP5Site. * Use @implementer decorator introduced in zope.interface 3.6.0 (2010): The implements syntax used under Python 2.X does not work under 3.X, since it depends on how metaclasses are implemented and this has changed. Instead it now supports a decorator syntax (also under Python 2.X). Applied thanks to 2to3 `zope.fixers` package. * Use `six.moves` rather than `future` install_aliases() feature because the latter use unicode_literals and "wraps" module aliases so that unicode() are returned for text rather than str() (Python2 standard library). This notably breaks BusinessTemplate code which uses urllib quote() for filesystem paths... * No more unbound methods in python3 so use six.get_unbound_function(). * dict.(iteritems,iterkeys,itervalues)() => six.\1(dict) thanks to `dict_six` 2to3 fixer from `modernize`: $ python-modernize -w -f dict_six product/ * Manually make sure that dict.{items,values,keys}() returns a real list when it is latter modified rather than a dict_{items,values,keys} (ensure_list()). By default, 2to3 blindly does list(dict.{items,values,keys}()) which is not acceptable from performances point of view. With my2to3, this will be possible to handle such case automatically. * Replace cStringIO.StringIO() by six.moves.cStringIO() (a module alias for cStringIO.StringIO() on py2 and io.StringIO() on py3). * Use six.text_type which maps to unicode() on py2 and str() on py3. This also makes a clearer difference between text and binary strings. * Replace map()/filter() with lambda function by list comprehension (this has the benefit to avoid casting to list for py3 as it returns iterators).
-
- 29 Apr, 2021 1 commit
-
-
Aurel authored
-
- 16 Sep, 2020 1 commit
-
-
Arnaud Fontaine authored
-
- 07 May, 2020 1 commit
-
-
Arnaud Fontaine authored
ZODB Components: erp5_core: Migrate SimulationTool, AppliedRule and Simulation Movement (and their Interfaces/Mixins) (MRs !1093, !1111).
-
- 30 Sep, 2019 1 commit
-
-
Nicolas Wavrant authored
-
- 29 Apr, 2019 1 commit
-
-
Georgios Dagkakis authored
/reviewed-on nexedi/erp5!859
-
- 03 Oct, 2017 1 commit
-
-
Georgios Dagkakis authored
Previously, this could only be node_uid. In future we should find a more generic approach to make this configurable. Also, add two tests to testInventoryAPI to check queries with selection_domain for getInventoryList and getMovementHistoryList.
-
- 11 Sep, 2017 1 commit
-
-
Jérome Perrin authored
Currently, the domain selection is implictly on node_category
-
- 06 Jan, 2017 1 commit
-
-
Vincent Pelletier authored
Without this change, "source/a/b" in non-strict mode indexes: (document.uid, source.uid, b.uid, 1) (document.uid, source.uid, a.uid, 0) (document.uid, source.uid, source.uid, 0) This last line does not contain anything which cannot be found by looking at the base category uid column, so it is wasting disk (and index) space, costing performance. But keep indexing a Base Category document if is it not the base category for considered relation. It is not clear whether stopping indexation at the first encountered Base Category document is intentional, or if recursion should only stop when reaching the base category of considered relation. With this change, "source/a/b" in non-strict mode indexes: (document.uid, source.uid, b.uid, 1) (document.uid, source.uid, a.uid, 0) removing the redundancy.
-
- 23 Dec, 2016 1 commit
-
-
Vincent Pelletier authored
Verify there is a single line per use. Test summary lines on per-category level. Always compare use by uid available on lines, not by fetching a random document on each aggregate line.
-
- 22 Jun, 2016 1 commit
-
-
Nicolas Wavrant authored
A new column ledger in the stock table and some related keys (stored in erp5_mysql_innodb_catalog) have also been created Adds tests for inventory queries based on ledger in testInventoryAPI
-
- 09 Jun, 2016 1 commit
-
-
Romain Courteaud authored
-
- 08 Jun, 2016 1 commit
-
-
Romain Courteaud authored
Mark the test as expected failure for now.
-
- 19 Oct, 2015 1 commit
-
-
Vincent Pelletier authored
Update callers which could not be fixed so they disable the exception. Reviewed-by:
Jerôme Perrin <jerome@nexedi.com>
-
- 17 Feb, 2015 1 commit
-
-
Sebastien Robin authored
This avoid differences like 07:55:27 != 07:55:26 in tests
-
- 02 Feb, 2015 1 commit
-
-
Jérome Perrin authored
-
- 31 Dec, 2014 1 commit
-
-
Jérome Perrin authored
-
- 12 Dec, 2014 1 commit
-
-
Gabriel Monnerat authored
Avoid pass next_item_simulation_state to _generateSQLKeywordDict because it will always ignore this parameter and display messages in logs Add test to parameter with output=1 in getTrackingList method
-
- 06 Nov, 2014 1 commit
-
-
Jérome Perrin authored
-
- 16 Oct, 2014 2 commits
-
-
Julien Muchembled authored
-
Julien Muchembled authored
-
- 30 Jan, 2014 1 commit
-
-
- 13 Sep, 2013 3 commits
-
-
Tatuya Kamada authored
This is not a new feature, this behavior is compatible with the old caching implementation that was using inventory_stock table. In other words, this brings backs the backward compatibility in inventory caching. (This commit fixes the incomplete tests that was reverted just before.)
-
Tatuya Kamada authored
Needs more tests. This reverts commit 74db4d39.
-
Tatuya Kamada authored
This is not a new feature, this behavior is compatible with the old caching implementation that was using inventory_stock table. In other words, this brings backs the backword compatibility in invetory caching.
-
- 16 Aug, 2013 1 commit
-
-
Jérome Perrin authored
-
- 09 Apr, 2013 1 commit
-
-
Jérome Perrin authored
We were joining catalog for section, node and resource, mainly in order to expose _title and _relative_url in brains. We just need to select the corresponding uids and let brains do another catalog search to get the object when accessed. Note that erp5_banking_core is not updated
-
- 01 Mar, 2013 1 commit
-
-
Aurel authored
-
- 28 Feb, 2013 1 commit
-
-
Jérome Perrin authored
-
- 26 Feb, 2013 1 commit
-
-
Aurel authored
Create a sql cache for getInventory call Remove full-inventory optimisation as it now useless Implement full-inventory feature directly into stock Make erp5_pdm depends on this optimisation Install optimisation for all unit tests
-
- 21 Feb, 2013 1 commit
-
-
Jérome Perrin authored
-