Commit Graph
250 Commits
Author SHA1 Message Date
Maxime Richez d64ae06e19 Add summary to line list
A function field summary is added which takes the first line of description
field. This is useful to identify line without product (only with description)
in the list.

issue9695
review292431002
2020-12-25 17:14:57 +01:00
Cédric Krier 7f6b94610b Add sql_pairing tool
issue9606
review328091002
2020-10-08 21:34:15 +02:00
Cédric Krier e11a23deb2 Rationalize import path
We use absolute path when imported module is from a different context.
And we remove unnecessary __all__ definition.

issue9466
review323591002
2020-07-21 14:38:36 +02:00
Cédric Krier f913df040c Add escape_wildcard in tools
issue9463
review306021002
2020-07-21 14:37:01 +02:00
Cédric Krier 46995607e2 Ensure values can be sorted
The values may contain None which is not orderable so we insert a third
argument before the value to prevent to compare None value against others.

issue9381
review303881005
2020-07-21 00:36:40 +02:00
Cédric Krier 066b8f8491 Returns None when evaluating domain with None
We implement the same behavior as SQL with NULL which always returns NULL
except for IS operator. So the evaluation has the same result as the search.

issue8615
review290281002
2020-06-19 00:18:04 +02:00
Cédric Krier c6503c1a93 Add cached_property in tools
issue9277
review299951002
2020-06-17 00:33:30 +02:00
Cédric Krier 4c664bf1b1 Skip invalid branch of domain without the inverted field
Those branches of the domain should not prevent to compute a proper inverted
domain for the field as the other fields will be fixed later.

issue9200
review311191002
2020-04-12 23:21:08 +02:00
David Harper ba776f36a5 Replace memoize with functools.lru_cache
issue9081
review286781002
2020-03-25 17:34:35 +01:00
Cédric Krier 2041e4f5b8 Do not force value in OR-ed clause
When any other variable in Or-ed clause is not known, we can not force the
value of the variable.

issue9092
review272941002
2020-03-06 23:14:24 +01:00
Cédric Krier d7ed5f91f5 Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:54 +01:00
Nicolas Évrard 8fb13634ea Use direct access to backend classes
issue8836
review258421002
2019-12-06 17:33:47 +01:00
Cédric Krier cb33d326ca Add slugify tool
issue8776
review288441002
2019-11-26 22:27:36 +01:00
Cédric Krier dd1626e5cf Replace child_of target only if it is not a related field
issue8609
review285911002
2019-09-02 18:34:55 +02:00
Cédric Krier 589e27cc87 Add lazy_gettext
issue8560
review283901002
2019-08-25 13:00:28 +02:00
Cédric Krier 3c5cec7bf1 Ensure count of grouped_slice is at least 1
issue8474
review257701002
2019-07-13 00:06:22 +02:00
Cédric Krier 2d4f6766b1 Improve domain validation error from server
We add to DomainValidationError the invalid domain and the field definition so
the client can format and append it to the description of the error.

issue8288
review255351002
2019-06-16 19:04:55 +02:00
Sergi Almacellas Abellana 49b7238d3f Add strip wildcards helpers
issue7347
review64541002
2019-04-11 15:17:30 +02:00
Cédric Krier 65c896b1f0 Do not fail on importing string tools if missing python-Levenshtein
python-Levenshtein is an optional dependency so trytond.tools.string_ should
not fail on import.

issue8040
2019-03-15 13:37:17 +01:00
Cédric Krier e2318257bb Allow to extend Field string and help
Those attributes are stored as StringPartitioned and each part creates its own
translation record. The translated strings are constructed by concatenation of
each translated part.

issue8040
review46731002
2019-03-15 13:01:11 +01:00
Cédric Krier 0d15afb90e Add coroutine concurrency option
issue8010
review53501002
2019-02-05 19:09:53 +01:00
Cédric Krier 39ea946edd Remove custom strftime for year before 1900
The bug has been fixed in Python 3.3

issue7814
review48671002
2018-10-31 18:15:57 +01:00
Cédric Krier d2a461390a Remove support for Python 2.7
issue7497
review53261002
2018-06-26 19:11:19 +02:00
Cédric Krier 473ac78eb4 Add exceptional parent language
issue6956
review40821003
2017-11-25 22:00:24 +01:00
Sergi Almacellas Abellana e702a4368e Correctly import get_smtp_server on misc tools
issue6914
review40801002
2017-11-07 09:27:53 +01:00
Sergi Almacellas Abellana 010043fbe0 Ensure egg modules path is absolute
Paths defined on sys.path may contain a relative path, so it must
be converted to absoulte path otherwise the starting comparison will
fail

issue6607
review39471002
2017-07-03 18:13:27 +02:00
Cédric Krier 2d1143fd26 Sanitize path in file_open against suffix
issue6361
review33191002
2017-04-03 18:23:41 +02:00
Cédric Krier a908e8cc74 Add MultiValueMixin and ValueMixin and remove Propery
issue2349
review23351002
2017-04-01 00:24:55 +02:00
Sergi Almacellas Abellana 1029de47c6 Raise valueError when no date is supplied in datetime_strftime
issue6053
review31731002
2016-12-07 12:36:05 +01:00
Cédric Krier d305c26e54 Add support for derivative translations
This is done by calling first the getter method for the parent language for the
terms that are not yet cached. After existing translations are set for the
language. And finally the result is stored in the cache.
The synchronisation wizard remove also the translations that are identical to
their parent language.
The method load_module_graph adds all parent languages to be loaded for
derivation.

issue5443
review25581002
2016-09-10 23:25:03 +02:00
Cédric Krier f4e14d65cc Sanitize path in file_open
file_open did not prevent to use up-level reference in file name.
A forged Report name could be used to open file outside the trytond root.

CVE-2016-1242
issue5808
review28691002
2016-08-30 12:15:25 +02:00
Cédric Krier 8d5c562740 Remove unused tools
issue5811
review27581002
2016-08-23 18:45:26 +02:00
Cédric Krier 065d1b7bb6 Add filestore module
Replace custom Attachment setter/getter by a generic module that can be used by
others.

issue5686
review22141003
2016-07-29 10:46:52 +02:00
Cédric Krier ba1faa1a76 Add sendmail datamanager
issue5431
review17981002
2016-03-28 22:40:37 +02:00
Cédric Krier a94627b160 Remove LocalDict from tools
issue5364
review21781002
2016-03-05 17:31:25 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier 70827fe06b XML files must be open in binary mode for sax parser
The sax parser expect a byte stream, so we must open the file with the binary
mode. Also file_open should have a default encoding to None because encoding
should not be set in binary mode.

issue5313
2016-02-09 22:45:44 +01:00
Cédric Krier 8eeb0140ed Add encoding to file_open
For Python3, we must define the encoding when opening a file.

issue5313
review21671002
2016-02-09 21:04:39 +01:00
Cédric Krier 29129855ec Add support for Python 3
issue3211
review7311002
2016-02-07 16:46:16 +01:00
Sharoon Thomas 89de660c52 Move webdav into a separate module
issue4703
review7101002
2016-01-16 19:20:30 +01:00
Cédric Krier ad0189bb56 Avoid circular import between Transaction and tools
issue4724
review12161002
2015-06-01 22:47:08 +02:00
Cédric Krier 87ea42c126 Unquote username and password from URI
issue4747
review7131002
2015-05-19 09:48:07 +02:00
Cédric Krier 18808832d7 Add missing import of types in tools/misc.py
issue3211
2015-03-18 23:36:24 +01:00
Cédric Krier 611b96c5f0 Add is_instance_method tool compatible with Python3
issue3211
2015-03-18 23:34:55 +01:00
Cédric Krier bcd28ca071 Remove safe_eval
We convert all the fields that were storing python code into PYSON.
We add a pyson attribute on field tag to store PYSON value.

issue4416
review6971002
2015-03-09 19:40:41 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier 4cf1624a91 Make decistmt a tool
issue4273
review9801002
2014-10-27 23:12:45 +01:00
Cédric Krier ccda215615 Prevent double underscore in safe_eval
CVE-2014-6633
issue4155
review5601002
2014-09-29 17:23:37 +02:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Sergi Almacellas Abellana fd7c510ce4 Add grouped_slice helper and use it.
issue3516
review10301002
2014-07-17 18:53:05 +02:00