Commit Graph
5164 Commits
Author SHA1 Message Date
Cédric Krier 51f080555b Close connection when listing or testing PostgreSQL databases
Closes #13441
(grafted from 18a811563d659b025b09973157f9d90a7dea8e6f)

--HG--
branch : 7.0
2024-08-07 17:49:10 +02:00
Cédric Krier 76dc002c4b Select only id from query of ModelSQL.search
Closes #13421
(grafted from c544661300ba3dc53db4378d4070b4aae8c5c32e)

--HG--
branch : 7.0
2024-07-26 23:00:05 +02:00
Cédric Krier 756751da00 Increase version number
--HG--
branch : 7.0
2024-08-01 21:30:14 +02:00
Cédric Krier dfd961de28 Prepare release trytond-7.0.16
--HG--
branch : 7.0
2024-08-01 21:29:57 +02:00
Cédric Krier 514fa0f6a2 Do not store empty list for MultiSelection key of Dict
Closes #13376
(grafted from 15a76a9d124c436ccbc1d9a9d9cde94731be8cde)

--HG--
branch : 7.0
2024-06-30 01:55:55 +02:00
Cédric Krier 198d1d3c31 Increase version number
--HG--
branch : 7.0
2024-07-17 23:36:11 +02:00
Cédric Krier eec8393919 Prepare release trytond-7.0.15
--HG--
branch : 7.0
2024-07-17 23:35:55 +02:00
Cédric Krier ceace63df5 Cast numeric columns for order expression on SQLite
Closes #13397
(grafted from 97e889240413ac521a15dc81453499bb888039c0)

--HG--
branch : 7.0
2024-07-13 15:35:01 +02:00
Cédric Krier a8bb16e78c Set type declaration in column names of SQLite only on top-level query
Closes #12532
(grafted from c07764f86f1655997d1271a5d2b30b9607a02a72)

--HG--
branch : 7.0
2024-06-30 16:25:41 +02:00
Cédric Krier b81d724543 Fix test_set_key of FieldDictTestCase
Closes #13314
(grafted from 00f2b092c74fd4b8974a464f7685f24e71a6e025)

--HG--
branch : 7.0
2024-06-08 17:19:40 +02:00
Cédric Krier 86b8f126b8 Increase version number
--HG--
branch : 7.0
2024-07-01 18:02:02 +02:00
Cédric Krier 1f9565a6cb Prepare release trytond-7.0.14
--HG--
branch : 7.0
2024-07-01 18:01:46 +02:00
Cédric Krier 9363eafb87 Do not test file exists when opening it
The file_open tools may be used to create a file so it may not yet exist.
Also io.open will raise the proper exception if the file can not be open.

Closes #13230
(grafted from ad09f3e55f6f7bd6767ea44d03566322fce6b487)

--HG--
branch : 7.0
2024-05-01 20:03:17 +02:00
Cédric Krier 270851ad9f Use empty string as fallback value for module path
The module path is used later to join path so it must be a string.

Closes #13229
(grafted from 1cbc97959ca439d5ac1335240863ca8104c41969)

--HG--
branch : 7.0
2024-05-01 19:59:17 +02:00
Cédric Krier 977205587b Increase version number
--HG--
branch : 7.0
2024-06-15 11:02:53 +02:00
Cédric Krier 3ac659091c Prepare release trytond-7.0.13
--HG--
branch : 7.0
2024-06-15 11:02:34 +02:00
Cédric Krier e1e251fa89 Do not convert to False when importing translated translated which is empty
Closes #13276
(grafted from 6e744a5da63179ef8f8d2bc2ed69e6188163d618)

--HG--
branch : 7.0
2024-05-22 18:07:32 +02:00
Cédric Krier e819fdb342 Fallback to normalized email if there is no ascii available
Closes #13241
(grafted from b8ab4d03b1089a1c7d59ed739cbd816a0e3da67b)

--HG--
branch : 7.0
2024-05-07 16:56:51 +02:00
Cédric Krier 791f8eb2e5 Return proper dictionary structure for instance getter with names
Closes #13136
(grafted from 750be7004ae5eb040ec870cfeea3cea762a6caa0)

--HG--
branch : 7.0
2024-05-20 23:16:39 +02:00
Cédric Krier 5b1569191a Do not commit readonly transaction even with channel
Even if the backend allows NOTIFY query on readonly transaction, it is strange
to commit readonly transaction because the backend may not enforce the
readonly.
Also commit performs other actions that may not be wanted like commit
datamanager or clear cache.
A procedure that requires to perform a NOTIFY should have a non-readonly
transaction.

Closes #12542
(grafted from 03611153e9bc9a0d169447c4ca946ad49c81ad47)

--HG--
branch : 7.0
2024-05-23 14:22:42 +02:00
Cédric Krier 73e0fd78c8 Use a readonly transaction to load module without update
Closes #12542
(grafted from 62775217456fe35fcc19a49d527f3baba67b0149)

--HG--
branch : 7.0
2024-05-23 14:18:51 +02:00
Cédric Krier 7e045a28d1 Increase version number
--HG--
branch : 7.0
2024-06-02 17:57:04 +02:00
Cédric Krier fce3011ad0 Prepare release trytond-7.0.12
--HG--
branch : 7.0
2024-06-02 17:56:49 +02:00
Nicolas Évrard 2e1bf05ff7 Use English when fetching records from the database
Closes #13204
(grafted from f4d5c22dd02905eb6007b5661d720147ee6ce1fe)

--HG--
branch : 7.0
2024-04-18 19:00:34 +02:00
Cédric Krier 1463aa57e8 Increase version number
--HG--
branch : 7.0
2024-05-01 11:09:20 +02:00
Cédric Krier a2a61fb5dc Prepare release trytond-7.0.11
--HG--
branch : 7.0
2024-05-01 11:09:03 +02:00
Cédric Krier d92c741136 Compute cache key for record rules using all models
As model can inherit the access rules from another, the key must include the
keys of those other models.

Closes #13162
(grafted from b04f36d27c78663851f6859e266aac203afd7600)

--HG--
branch : 7.0
2024-04-17 20:22:10 +02:00
Adrià Tarroja Caubet 8d9773f85b Clear view toolbar cache when email templates are modified
Closes #13072
(grafted from aaced85022248371ebea50482914d5df13bb477e)

--HG--
branch : 7.0
2024-04-21 17:29:41 +02:00
Cédric Krier 29c8790c40 Prevent to get user_id from request without view_args
If user_id is accessed before view_args has been setup, we should not cache
`None` as value but instead raise an exception.
The `user_id` may be accessed before the mapping if the request is logged
because the representation of the request used the `rpc_method` which needs to
parse the request data. But since 1923117e935d parsing compressed content is
only allowed for request with `user_id`.
So we can no more include the `rpc_method` is the request has not yet been
mapped and so it has a `view_args`.

Closes #13203
(grafted from 0630029c1d5a0a2c7bd45086957f2e0fbed4c427)

--HG--
branch : 7.0
2024-04-18 19:28:04 +02:00
Cédric Krier e41c237bc0 Use function to not copy custom report content
The Function fields are not copied so it is the storage field that must have a
default value.

Closes #13170
(grafted from 96d629fe11a710b395d9981881c5dfda1674becf)

--HG--
branch : 7.0
2024-04-13 15:00:52 +02:00
Cédric Krier 2cf3c4a317 Test if queue batch is boolean
In Python bool type is a subtype of integer so it must be tested first.
Also by converting other types to int, we catch any other wrong types.

Closes #13133
(grafted from 2c7c6983eecc716cddc3dcfce7c417e902257df0)

--HG--
branch : 7.0
2024-04-13 14:20:21 +02:00
Cédric Krier 4c1cb2a9d3 Remove ending commit when loading modules
The commit call was added by a6624f31ff20 to release lock because Cache.resets
was called inside the transaction.
But Cache.resets was removed in a83631f4ba67 and Cache does not create any new
transaction since.
And since 2fd8c5f88265 the transaction is even committed only on module
update.
(grafted from 0548d73c7ce3b4e07b6b76007f2592ed2be945ff)

--HG--
branch : 7.0
2024-03-13 08:42:10 +01:00
Cédric Krier c1a2c5d09b Increase version number
--HG--
branch : 7.0
2024-04-17 12:27:55 +02:00
Cédric Krier 602eb45e07 Prepare release trytond-7.0.10
--HG--
branch : 7.0
2024-04-17 12:27:38 +02:00
Cédric Krier 16d36f2390 Do not accept compressed content from unauthenticated request
Closes #13142
(grafted from 1923117e935de62276352585185ced6d854bcb3d)

--HG--
branch : 7.0
2024-04-17 10:19:58 +02:00
Cédric Krier ab9d451c40 Do not commit new transaction for database error processing
(grafted from 15d80de804c51a5557fae817f697201f08abfa99)

--HG--
branch : 7.0
2024-04-02 00:34:25 +02:00
Nicolas Évrard 87b1e66f67 Use PYSON's Bool evaluation for PYSON's Not evaluation
Closes #13096
(grafted from 009133813b11f264b5e038dc9c5912dc9e0101cb)

--HG--
branch : 7.0
2024-03-11 16:35:39 +01:00
Cédric Krier 3a579caff2 Catch exception before the cron transaction is ended
To rollback the transaction must be done before the context manager calls stop
on exit.

Closes #13149
(grafted from 02ef3e349808c73a260ab7e83fea4eb66f37bd02)

--HG--
branch : 7.0
2024-04-01 16:18:13 +02:00
Cédric Krier c52843b183 Setup a database for CacheTestCase
Since 8616fb62c5e9 some tests are decorated with transaction so the test case
needs a database to run.
(grafted from b2b78cdd6c19340652eb27ceaac620c940030a5d)

--HG--
branch : 7.0
2024-04-01 12:27:33 +02:00
Cédric Krier 50c9dd34e0 Do not round Decimal to validate digits
Decimal may raise an InvalidOperation error if the context does not allow the
needed precision.
But rounding is not necessary for Decimal as we can just test the exponent
from the tuple version.

Closes #13138
(grafted from 776889be97e4c1b8917a9090338511d8008c625b)

--HG--
branch : 7.0
2024-03-28 09:25:55 +01:00
Cédric Krier 05da1a327a Increase version number
--HG--
branch : 7.0
2024-04-04 09:37:49 +02:00
Cédric Krier e0ff82e073 Prepare release trytond-7.0.9
--HG--
branch : 7.0
2024-04-04 09:37:31 +02:00
Cédric Krier 358e305c13 Do not stop pool on refresh if modules list is empty
A Pool.refresh may be triggered on Pool.init if a cache listener is started by
the new transaction of load_modules. In such cache the pool is empty just
after the init.

Closes #13101

--HG--
branch : 7.0
2024-03-17 18:10:19 +01:00
Cédric Krier c4d4951525 Remove readthedocs
(grafted from 2f67994e59b0bca29d7b0632a51540774b109140)

--HG--
branch : 7.0
2024-02-18 18:35:54 +01:00
Cédric Krier d3caafdf78 Increase version number
--HG--
branch : 7.0
2024-03-03 12:59:44 +01:00
Cédric Krier 0b4f9bdb5a Prepare release trytond-7.0.8
--HG--
branch : 7.0
2024-03-03 12:59:24 +01:00
Cédric Krier ae84e0a539 Test number of dots in name before computing unique value from a domain
The type of value may not correspond with the single_value parameter if the
domain does not apply directly to the field but to a nested field.

Closes #12843
(grafted from 411d5752ff2a1283d65fb457a5c9ac2f399dafb0)

--HG--
branch : 7.0
2024-02-12 11:59:13 +01:00
Cédric Krier 577aceda8d Clear transaction tasks on retry of with_transaction decorator
Closes #13008
(grafted from 6ba5facee41af77e391409382d9aef7a6b4b576a)

--HG--
branch : 7.0
2024-02-06 13:26:34 +01:00
Cédric Krier 7b651a5e51 Lock table at transaction start for with_transaction decorator
Since c8771e45b861 TransactionError is raised if a table is not locked at the
transaction start. The decorator must manage such exception in case the
decorated route needs to lock a table.

Closes #12962
(grafted from bced72f6282bbb1ec2c58e7af25ca1e5a941b82f)

--HG--
branch : 7.0
2024-02-06 12:59:00 +01:00
Cédric Krier 78a5739426 Increase version number
--HG--
branch : 7.0
2024-02-15 19:25:43 +01:00