Commit Graph
5689 Commits
Author SHA1 Message Date
Nicolas Évrard 9d4966e41f Filter Many2Many group fields on active = True
When the field is used in a domain adding this filter ensure that comparison
with None will succeed when there are only inactive groups in the field.

Closes #14369
2025-12-03 08:47:20 +01:00
Cédric Krier 72d637cec9 Test if field_names is None instead of empty in ModelStorage hooks
Closes #14382
2025-11-21 11:50:54 +01:00
Cédric Krier 98941a588e Allow users to subscribe to notification cron jobs
Closes #13988
2025-12-02 19:24:36 +01:00
Cédric Krier 8ab505205d Allow users to subscribe to chats 2025-12-02 13:08:05 +01:00
Nicolas Évrard fa19c6226f Notify subscribed users of new message in chat 2025-12-02 18:11:10 +01:00
Nicolas Évrard 48dcd6ffdd Add user notification 2025-12-02 13:08:54 +01:00
Cédric Krier 4dce4ec167 Add documentation for chat 2025-12-02 14:38:58 +01:00
Nicolas Évrard 784eba9791 Correctly get model and id of resource when checking the Channel access rights 2025-10-02 09:44:58 +02:00
Nicolas Évrard 929b3545cd Add support for materializing ModelSQL based on a table query 2025-12-02 00:12:08 +01:00
Cédric Krier 4d8a1cd837 Do not update key value of user application on write
Closes #14353
2025-11-06 11:34:07 +01:00
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