Commit Graph
5921 Commits
Author SHA1 Message Date
Cédric Krier 4590287d2b Ensure to use an estimated count greater than 1 when applying log10
Closes #15038
2026-08-25 09:46:47 +02:00
Cédric Krier dc73f174bd Store only records count greater than 0 in the cache when delete records
The existing cached count may be just an estimation so it is possible that more
records are deleted.

Closes #15038
2026-08-25 09:45:59 +02:00
Nicolas Évrard 331131f111 Use Router to register URL endpoints in the pool 2026-08-28 12:06:27 +02:00
Cédric Krier c9c95f9bfd Support explicit request context in URLAccessor 2026-08-27 13:08:43 +02:00
Nicolas Évrard b54668ad94 Use Pool classes attributes to get allowed pool types 2026-06-06 16:16:47 +02:00
Cédric Krier 47dd11660d Set all attributes of transaction before connecting to the database
The connection to the database may fail and thus stop and rollback may be
called. All the attributes must be set to avoid to raise another AttributeError
exception.

Closes #15022
2026-08-17 17:32:55 +02:00
Cédric Krier 8c22828855 Register cache instance after being fully initialized
Otherwise an instance can be accessed by another thread via the registry when
it is still being initialized. And it may crash on missing attribute.

Closes #15007
2026-08-12 17:57:01 +02:00
Cédric Krier 3fa8e0464b Retry unfinished queued tasks
Closes #14949
2026-07-13 17:36:10 +02:00
Cédric Krier 25a22e3f9a Add a timer to prevent requests from lasting longer than their timeout
Closes #14946
2026-07-08 22:58:48 +02:00
Cédric Krier 53fe643e61 Limit the start id of table to 500 for tests
By using the formula `(idx * prime) % range + 1`, tables created consecutively
have start id distant by `prime` and the maximum start id is `range`.
This avoid to overflow int4 when composing unique ID for table query.

Closes #15010
2026-08-17 15:06:09 +02:00
Cédric Krier 3e3b554889 Add mixin to Database and TableHandler from configuration 2026-06-30 16:49:13 +02:00
Cédric Krier 2bbf319507 Group records written with the same values when saved 2026-07-31 12:39:47 +02:00
Nicolas Évrard 79d0493424 Reset TABLES_CREATED when dropping the database when testing
Closes #15002
2026-08-10 14:51:04 +02:00
Cédric Krier df5beb3c8f Disable buttons to upgrade/update modules if there is no action to perform
Closes #4960
2026-07-24 14:39:41 +02:00
Cédric Krier 1ebe99e62d Do not create indexes if they already exist
The `IF NOT EXISTS` clause does not prevent PostgreSQL from taking a ShareLock
on the table if the index exists.

Closes #14966
2026-07-22 14:36:17 +02:00
Nicolas Évrard 1aef4dbdae Remove required on resource ID of ir.translation 2026-07-27 11:55:35 +02:00
Nicolas Évrard ecaf40a8ee Skip translation refering to unknown XML ID or unactivated source
Closes #12969
2024-01-29 18:47:56 +01:00
Cédric Krier 8414cd718f Restrict protocols allowed for weasyprint to http(s)
Closes #14947
2026-07-24 10:49:42 +02:00
Cédric Krier 6b99dc69cc Use binary version of psycopg for tests 2026-07-17 22:11:32 +02:00
Cédric Krier a5e64fc509 Use Text field for HTML content of report record
The field must contain strings in order to allow edition with the HTML editor.

Closes #14922
2026-07-24 16:10:12 +02:00
Cédric Krier efa6379b92 Calculate the number of parameters in INSERT query using the columns list
The column names list does not contain the create_uid nor create_date columns
instead of columns list.

Closes #14800
2026-07-23 11:37:36 +02:00
Cédric Krier 0035590218 Set back XML record for English with other languages 2026-06-25 17:10:23 +02:00
Cédric Krier 6a790d3162 Add search attribute to XML record tag
Closes #13247
2026-06-25 16:50:42 +02:00
Cédric Krier f0878cb49b Do not copy vlist in ModelSQL.create
The vlist is already a copy from ModelStorage._before_create.

Closes #14953
2026-07-13 15:56:31 +02:00
Nicolas Évrard b167bd1e77 Do not fetch sub fields definition when prefetching views
Closes #14941
2026-07-08 14:59:40 +02:00
Sergi Almacellas Abellana 1d6b88afaa Test column_ methods in tests_fields_methods 2026-07-06 20:05:23 +02:00
Cédric Krier 907c6a49fe Remove entry_points_selectable backport
Since c0f49db907fc the minimal Python version is 3.10 which supports selectable
entry-points.
2026-07-07 19:19:25 +02:00
Cédric Krier 278896eac3 Add documentation for DatabaseTimeoutError 2026-07-08 23:01:08 +02:00
Cédric Krier e317c87911 Return Gateway Timeout instead of Request Timeout for database timeout
Closes #14945
2026-07-08 22:12:42 +02:00
Cédric Krier 0c29a67c06 Add missing duration argument to database timeout warning
Closes #14944
2026-07-08 22:23:38 +02:00
Sergi Almacellas Abellana 99b6830032 Add cache on import_module tool
Closes #14936
2026-07-07 17:16:02 +02:00
Cédric Krier fca02700e9 Re-raise transaction error from sub-test of button
Since a05fa06b3a4c the test of button is executed under the subTest context
manager but if the method is raising a TransactionError, it is considered as a
failure for the test.
But we need this exception to be raised up to the with_transaction decorator in
order to fix the transaction and execute fully the method of the button.
2026-07-07 19:16:08 +02:00
Cédric Krier fca6a120f0 Use NullConnectionPool for the default database
The default database is template1 which is usually used to create new database.
Keeping a pool of connection open on it prevents the creation of new database
because exclusive access is needed on the template.

Closes #14935
2026-07-06 19:34:24 +02:00
Cédric Krier 4ddc5340b8 Permit __url__ and __href__ attribute usage in Genshi evaluation
Closes #14932
2026-07-06 09:07:08 +02:00
Nicolas Évrard 2743c2abaa Use subtest for each button method tested 2026-07-07 07:31:32 +02:00
Cédric Krier aacc97f905 Add support for reducing size of char if all rows are lower 2026-06-26 00:09:48 +02:00
Cédric Krier 91434daade Define index using COALESCE for nullable Char fields
Closes #14909
2026-06-24 22:07:52 +02:00
Cédric Krier 23d9c20172 Do not apply COALESCE on required Char
Closes #14909
2026-06-24 22:06:59 +02:00
Adrià Tarroja Caubet 232822d251 Add a comma between 'set' and 'slice' in the Genshi allowed builtins
Closes #14928
2026-07-04 00:17:12 +02:00
Cédric Krier 67239eb9b4 Use rule check to enforce read access on report ids 2026-06-23 22:03:36 +02:00
Cédric Krier 2e84b60e75 Enforce access right on the email template record
Closes #14907
2026-06-30 09:48:33 +02:00
Cédric Krier 8df60185f5 Add ModelAccessProxy
#14907
2026-06-25 13:31:30 +02:00
Cédric Krier d1aba4dbb5 Restrict Genshi evaluation
Closes #14869 #5160
2026-06-08 23:44:10 +02:00
Cédric Krier c8b75d6c5e Resolve Tryton modules using entrypoints
The Pool tries to resolve registered string using the path `trytond.modules.`
which can not always be imported if the module is using an entry pointing to
another package.

Closes #14914
2026-06-26 15:17:14 +02:00
Cédric Krier 5a7976bea6 Update module tutorial to match with the cookiecutter output 2026-06-18 19:11:04 +02:00
Cédric Krier 1e053eb4c6 Convert exception value into string when used as HTTPException description 2026-06-18 16:28:03 +02:00
Cédric Krier 078dbf0e11 Let the WSGI dispatcher handling exception raised within with_pool decorator 2026-06-18 16:26:59 +02:00
Cédric Krier a57ea670a8 Write traceback of unexpected Exception in wsgi.errors 2026-06-18 16:24:23 +02:00
Cédric Krier e525eeb1cd Log unexpected Exception using exception level 2026-06-18 16:23:15 +02:00
Cédric Krier 9c7bb8d712 Support ModelStorage.search API in ResourceAccessMixin
ResourceAccessMixin inherits from ModelStorage so it should support the
ModelStorage.search API.

Closes #14900
2026-06-18 11:04:10 +02:00