137 Commits
Author SHA1 Message Date
Cédric Krier 35a7e696cf Add ModelAccessProxy
#14907
(grafted from dafef28a1d65032628809acbfa130a2f2e74474f)

--HG--
branch : 8.0
2026-06-25 13:31:30 +02:00
Cédric Krier 0e25c97f45 Add REST API 2026-04-04 23:03:18 +02:00
Cédric Krier 03655a335a Add notify_user to ModelStorage
Closes #14667
2026-03-11 10:01:51 +01:00
Cédric Krier 27dff955f1 Add missing log_records attribute to Transaction documentation 2026-03-11 10:01:22 +01:00
Nicolas Évrard 475e68df76 Remove the files of Binary fields from the Filestore
Closes #13861
2026-03-24 09:30:17 +01:00
Nicolas Évrard b44c004825 Add deletion on FileStore
We're identifying each file in the filestore with a UUID4 in order to avoid
collisions. It has the drawback that we will store twice the same file but on
the other hand we can now remove each file from the store as there is no more
collision.

In order to identify files named previously we're using textual representation
of the UUID with the hyphens. Previous IDs do not have hyphens.
2025-01-09 18:53:09 +01:00
Cédric Krier 5310b00496 Remove grouped_slice per IN_MAX
The usage of ``grouped_slice`` without size is deprecated since `=
ANY(ARRAY[%s])` is used for PostgreSQL and SQLite is used only for tests.

The ``Database.IN_MAX`` is replaced by ``backend.MAX_QUERY_PARAMS`` which is a
more accurate limit of the backend.
The SQLite limits is indeed SQLITE_MAX_EXPR_DEPTH so we use a empirical value.
2026-03-22 21:05:26 +01:00
Nicolas Évrard 299dd6b1c9 Update to Psycopg 3
Closes #10901
2026-03-22 19:53:32 +01:00
Cédric Krier 33856ac2a1 Add model attribute to table handler 2026-03-14 18:12:02 +01:00
Cédric Krier 2b626f1708 Document history attribute of table handler 2026-03-14 18:11:34 +01:00
Cédric Krier 57aabfb14e Support Function field without getter but SQL expression
Closes #4369
2026-01-30 18:06:45 +01:00
Cédric Krier 52326c4b08 Allow customizing SQL expression of field 2026-01-29 15:24:10 +01:00
Cédric Krier dfe58aa125 Use tables and Model as arguments for sql_column of the Field 2026-01-29 12:42:56 +01:00
Cédric Krier 2989e66585 Lazy import html2text and weasyprint 2025-12-11 17:57:01 +01:00
Cédric Krier b034e23e91 Support the conversion of MJML reports to HTML
Closes #12597
2025-12-11 16:31:51 +01:00
Cédric Krier 1623885d46 Add options to trytond.config
Closes #14483
2026-01-13 20:08:43 +01:00
Cédric Krier aefd12642a Use always the immutable value from the cache
This prevents issues like #14433 from being missed.
2025-12-19 09:39:32 +01:00
Cédric Krier 476065cf11 Use creation position to format warning key for new records
The opposite position in the creation order is used instead of the id (which is
not stable over transaction retries) to format the warning key when the record
has been created during the transaction.
This ensures that the formatting of the warning key is stable over transaction
retries.

Closes #10591
2025-11-27 16:26:20 +01:00
Nicolas Évrard fa19c6226f Notify subscribed users of new message in chat 2025-12-02 18:11:10 +01:00
Cédric Krier 4dce4ec167 Add documentation for chat 2025-12-02 14:38:58 +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
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 cf1ce07e9b Fix parameter name for check_modification in the documentation 2025-07-31 23:47:59 +02:00
Nicolas Évrard 6daccef092 Clarify the documentation about digits 2025-10-09 12:36:54 +02:00
Cédric Krier 9f95b28eaf Add sequence_reorder to model order
Closes #14251
2025-09-23 16:04:29 +02:00
Nicolas Évrard 818f26253a Remove has_window_functions on Database 2025-10-04 22:45:53 +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 a72adf0fdc Restrict sessions to the client's IP address
Closes #13909
2025-10-05 17:17:14 +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 15f2650954 Redact sensitive values from the log
Closes #14220
2025-09-09 15:17:31 +02:00
Cédric Krier 16cbeeee2c Use rfc role in documentation and ignore checking datatracker.ietf.org links 2025-05-03 17:10:58 +02:00
Cédric Krier b0f7d45254 Manage readonly wizard
readonly wizards do not check for write access on the active model.

Closes #13989
2025-04-29 09:31:05 +02:00
Cédric Krier 0ad9570070 Document preferred languages order for get_email 2025-05-23 17:13:37 +02:00
Cédric Krier 301982d6f2 Add pair/unpair in tools 2025-04-30 15:12:49 +02:00
Cédric Krier e45be331a7 Lock records on transaction start
Same as c8771e45b861 but when locking only records instead of the table.

Closes #13943
2025-03-27 13:39:04 +01:00
Cédric Krier 854562ad6e Add default value to user in set_user testing tool 2025-03-30 15:21:11 +02:00
Cédric Krier fff5663ae1 Add DecimalNull as tools 2025-04-08 09:59:33 +02:00
Nicolas Évrard 26f7c7142b Add process local objects ala threading.local 2025-02-14 17:16:55 +01:00
Nicolas Évrard cd5a54cb2f Delete warnings at the end of the Transaction
Closes #13686
2025-04-10 19:21:50 +02:00
Cédric Krier 45122b77c0 Add on_write to ModelStorage 2025-02-24 13:39:52 +01:00
Cédric Krier e9fe355663 Add on_delete to ModelStorage 2025-02-19 17:52:22 +01:00
Cédric Krier 4b7b5a4739 Add check_modification to ModelStorage 2025-03-01 16:10:13 +01:00
Cédric Krier 72c96ec778 Add on_modification to ModelStorage 2025-02-19 23:01:52 +01:00
Cédric Krier defc4c46c5 Add preprocess_values to ModelStorage 2025-02-24 12:58:37 +01:00
Cédric Krier 121c279f47 Add before/after methods for CWRD methods of ModelStorage 2025-04-05 16:33:40 +02:00
Cédric Krier 027384000b Add compute fields to ModelStorage 2025-01-15 21:37:11 +01:00
Cédric Krier 093fb115ff Add color widget to form view
Closes #13800
2025-01-08 16:53:34 +01:00
Cédric Krier 1edefbeae5 Limit access to database from the same series as the server
The last series to which the database was updated is stored in
ir.configuration.
With this information, the list of databases is filtered for the same series.
Remote access to a database is restricted to databases available in the list.

Closes #13791
2025-01-06 15:54:02 +01:00
Cédric Krier 611198f9f1 Add size limit for RPC arguments
Closes #10301
2024-11-28 09:31:43 +01:00
Cédric Krier 77bb47a3a4 Make field_names optional in Model.default_get 2024-12-26 16:08:18 +01:00