Commit Graph
5679 Commits
Author SHA1 Message Date
Cédric Krier 4859bedaaf Convert max_tasks_per_child to None when the value is 0
The ProcessPoolExecutor supports only a positive integer or None.

Closes #14349
2025-11-05 14:38:52 +01:00
Nicolas Évrard 622457ba33 Merge security.check_session and security.check
That way we won't use the pool when the database is not already initialized.

Closes #14316
2025-10-24 18:16:51 +02:00
Nicolas Évrard ecc3e152d1 Apply SQLite types in check_session query
Closes #14315
2025-10-24 18:13:01 +02:00
Cédric Krier 0d677b4f74 Add an option to trytond-console to run a script file 2025-10-21 16:05:39 +02:00
Cédric Krier ac39a44d3b Remove outdated comment about converting Decimal into float for XML-RPC 2025-11-26 21:53:24 +01:00
Nicolas Évrard 3ed88c83c5 Register a MappingProxyType marshalling function for both JSON-RPC and XML-RPC
Closes #14387
2025-11-26 21:50:01 +01:00
Cédric Krier 518e5f3f69 Store only immutable structure or make a shallow copy in MemoryCache
Closes #14347
2025-11-03 23:08:31 +01:00
Cédric Krier b7ee37bb0a Replace clean_days with log_size in the cron configuration
Closes #14319
2025-10-27 19:20:23 +01:00
Cédric Krier b2d45c11cd Enforce access check in export_data
As the method is using instances to construct the exported data, the access
must be checked explicitly.

Closes #14366
2025-11-17 12:26:57 +01:00
Cédric Krier 95dc47a24f Include the traceback only in RPC responses in development mode
Closes #14354
2025-11-12 14:56:34 +01:00
Cédric Krier 41cc370e99 Enforce access check in HTML editor route
Use .read and .write instead of .browse and .save when editing field via the
HTML editor.

Closes #14364
2025-11-17 10:28:49 +01:00
Cédric Krier 4b9ec5939e Set TRYTOND_APPNAME and TRYTOND_TZ only if they are not set or empty
Closes #14322
2025-10-31 12:11:02 +01:00
Cédric Krier a735ea7a2b Make target ids unique when reading related fields
The result is converted into a dict based on the id so we must ensure that the
ids read are unique in case the same id appears after size limit.

Closes #14304
2025-10-21 12:07:40 +02:00
Cédric Krier 817936ef58 Fallback to id as record name when _rec_name value is empty
It happens that the _rec_name is not required so a fallback value is needed to
ensure to always have a name for the record.

Closes #14275
2025-10-21 12:18:02 +02:00
Cédric Krier a9ce6df05d Escape record name used in testing regex 2025-10-21 13:13:23 +02:00
Nicolas Évrard f70d515905 Add a clear cache method to the Database
ExtensionTestCase uses this new method to clear all the caches of the Database.
2025-10-28 10:57:07 +01:00
Cédric Krier 00e52f4a43 Update anchor for if-then-else link on Wikipedia
Closes #14267
2025-10-01 08:45:36 +02:00
Cédric Krier cf1ce07e9b Fix parameter name for check_modification in the documentation 2025-07-31 23:47:59 +02:00
Nicolas Évrard 58428d09b9 Do not allow translations to be set or exported unless the default language is English 2025-10-24 10:22:38 +02:00
Nicolas Évrard 6daccef092 Clarify the documentation about digits 2025-10-09 12:36:54 +02:00
Cédric Krier ecfad8ea81 Return the closest language instance for the code
When the language code is provided by an external source, a best effort
strategy must be used to always return a language.

Closes #14258
2025-09-26 08:45:49 +02:00
Cédric Krier 4f0c8ada7c Use a MagicMock with a return value when patching ModelStorage copy for testing
Closes #14300
2025-10-19 10:43:23 +02:00
Cédric Krier 5188badcfc Add support for null ordering on SQLite
The support was added in SQLite 3.30.0
2025-10-08 17:09:29 +02:00
Cédric Krier a772f1915a Limit SQLite version to feature release 2025-10-08 16:59:26 +02:00
Nicolas Évrard f1e71692db Use SQL queries to restore history
Restoring a fields.Dict value failed before using this pure SQL solution.
Also such a solution will be more efficient by minimizing the amount of python
code run.

Closes #14031
2025-05-20 18:28:23 +02:00
Nicolas Évrard 12185cc3bf Test the restoration of history after a DELETE 2025-06-14 03:21:40 +02:00
Nicolas Évrard 90f3c2f030 Compare the default fields used in copy with those of the calling class
Closes #14298
2025-10-17 16:27:11 +02:00
Nicolas Évrard 0c6b0399a9 Set default value of src_plural to NULL when setting translations
Adding the new translations to the internal language should set the value of
src_plural to NULL as this is the default value we use when importing from the
PO files. Moreover it might happen that an empty string could be a valid value
for src_plural.

Closes #14289
2025-10-17 10:33:06 +00:00
Cédric Krier 9f95b28eaf Add sequence_reorder to model order
Closes #14251
2025-09-23 16:04:29 +02:00
Cédric Krier 53919112df Add tests for __eq__ and __lt__ of Model 2025-09-24 09:29:03 +02:00
Cédric Krier 34056386bb Implement __hash__ on Model using xor 2025-09-24 09:28:39 +02:00
Cédric Krier 2f6b492e8b Remove unnecessary __bool__ implementation on Model
In standard Python already consider object as True if they do not implement
__bool__ nor __len__.
2025-09-24 09:27:26 +02:00
Cédric Krier 0414c1cc7f Remove unnecessary __ne__ implementation on Model
In standard Python already implement __ne__ as not __eq__.
2025-09-24 09:25:49 +02:00
Nicolas Évrard 9839c0902d Add test that fields in __access__ are required
Closes #14261
2025-09-29 13:16:49 +02:00
Cédric Krier da6b14a99b Decode the SQL query logged by the Postgresql backend
This makes it easier to copy and paste the query when debugging.
2025-08-27 10:00:14 +02:00
Cédric Krier f6c86bf30a Use sub-test when testing search domain with deactivable mixin 2025-08-23 20:29:51 +02:00
Nicolas Évrard 818f26253a Remove has_window_functions on Database 2025-10-04 22:45:53 +02:00
Nicolas Évrard fb57dd9a25 Set a minimal supported version of sqlite 2025-10-06 17:36:06 +02:00
Cédric Krier 74ee169c54 Refactor of trytond.config to add cache
This removes the need to store configuration in global variable and so make it
easier to update for example for testing.

Closes #14249
2025-10-07 08:19:57 +02:00
Nicolas Évrard 736eda2333 Handle URL host of the bus on login instead of using a redirect
Browsers remove authorization header upon cross-origin redirect.

Closes #12329
2025-10-06 17:03:41 +02:00
Nicolas Évrard f0199c149b Validate the session without using the pool on bus requests 2025-10-04 15:53:18 +02:00
Nicolas Évrard a72adf0fdc Restrict sessions to the client's IP address
Closes #13909
2025-10-05 17:17:14 +02:00
Cédric Krier 8b283d14a0 Use cache functools to cache entry points 2025-09-18 10:19:13 +02:00
Cédric Krier d80a166f2a Add cache to find_path tool 2025-09-18 10:18:54 +02:00
Cédric Krier 33d85882ad Compute root path of trytond only once 2025-09-18 10:18:21 +02:00
Cédric Krier ee18ba3924 Cache the module configuration 2025-09-18 10:17:27 +02:00
Cédric Krier 8e1c951e1e Add test for register conditionals in extras depend of module 2025-09-09 14:22:28 +02:00
Cédric Krier 95456d6f92 Use tryton.cfg to register in the Pool 2025-09-18 16:42:29 +02:00
Cédric Krier da9cc4bb87 Patch global PATH variable of filestore in test
Changing the configuration value is not enough as its value is cached in the
global variable.

Closes #14248
2025-09-20 09:07:18 +02:00
Cédric Krier 80eaf304d1 Remove padding in base64 converter 2025-08-27 12:35:31 +02:00